mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 14:13:35 +00:00
c9baba9212
(My OCD kicked in today...) Remove repeated package names, capitalize first word, remove trailing periods and move overlong descriptions to longDescription. I also simplified some descriptions as well, when they were particularly long or technical, often based on Arch Linux' package descriptions. I've tried to stay away from generated expressions (and I think I succeeded). Some specifics worth mentioning: * cron, has "Vixie Cron" in its description. The "Vixie" part is not mentioned anywhere else. I kept it in a parenthesis at the end of the description. * ctags description started with "Exuberant Ctags ...", and the "exuberant" part is not mentioned elsewhere. Kept it in a parenthesis at the end of description. * nix has the description "The Nix Deployment System". Since that doesn't really say much what it is/does (especially after removing the package name!), I changed that to "Powerful package manager that makes package management reliable and reproducible" (borrowed from nixos.org). * Tons of "GNU Foo, Foo is a [the important bits]" descriptions is changed to just [the important bits]. If the package name doesn't contain GNU I don't think it's needed to say it in the description either.
67 lines
1.9 KiB
Nix
67 lines
1.9 KiB
Nix
{ stdenv, fetchurl, gyp, readline, python, which, icu }:
|
|
|
|
assert readline != null;
|
|
|
|
let
|
|
arch = if stdenv.is64bit then "x64" else "ia32";
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "v8-${version}";
|
|
version = "3.26.8";
|
|
|
|
src = fetchurl {
|
|
url = "https://commondatastorage.googleapis.com/chromium-browser-official/"
|
|
+ "${name}.tar.bz2";
|
|
sha256 = "0w8mfy8jlqvp958c0zhsfwf0s3m6kw53jhcyg6aiwh877g6s21iz";
|
|
};
|
|
|
|
configurePhase = ''
|
|
PYTHONPATH="tools/generate_shim_headers:$PYTHONPATH" \
|
|
${gyp}/bin/gyp \
|
|
-f make \
|
|
--generator-output="out" \
|
|
-Dflock_index=0 \
|
|
-Dv8_enable_i18n_support=1 \
|
|
-Duse_system_icu=1 \
|
|
-Dconsole=readline \
|
|
-Dcomponent=shared_library \
|
|
-Dv8_target_arch=${arch} \
|
|
--depth=. -Ibuild/standalone.gypi \
|
|
build/all.gyp
|
|
'';
|
|
|
|
nativeBuildInputs = [ which ];
|
|
buildInputs = [ readline python icu ];
|
|
|
|
buildFlags = [
|
|
"LINK=g++"
|
|
"-C out"
|
|
"builddir=$(CURDIR)/Release"
|
|
"BUILDTYPE=Release"
|
|
];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
installPhase = ''
|
|
install -vD out/Release/d8 "$out/bin/d8"
|
|
${if stdenv.system == "x86_64-darwin" then ''
|
|
install -vD out/Release/lib.target/libv8.dylib "$out/lib/libv8.dylib"
|
|
'' else ''
|
|
install -vD out/Release/lib.target/libv8.so "$out/lib/libv8.so"
|
|
''}
|
|
cp -vr include "$out/"
|
|
'';
|
|
|
|
postFixup = if stdenv.isDarwin then ''
|
|
install_name_tool -change /usr/local/lib/libv8.dylib $out/lib/libv8.dylib -change /usr/lib/libgcc_s.1.dylib ${stdenv.gcc.gcc}/lib/libgcc_s.1.dylib $out/bin/d8
|
|
install_name_tool -id $out/lib/libv8.dylib -change /usr/lib/libgcc_s.1.dylib ${stdenv.gcc.gcc}/lib/libgcc_s.1.dylib $out/lib/libv8.dylib
|
|
'' else null;
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "Google's open source JavaScript engine";
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
license = licenses.bsd3;
|
|
};
|
|
}
|