From 665918c24a33d6a9c46d036352ee2b0c85c8d6ac Mon Sep 17 00:00:00 2001 From: Stefan Siegl Date: Sat, 8 Jul 2017 21:12:33 +0200 Subject: [PATCH 01/10] gn: init at 0.0.0.20170629 --- .../tools/build-managers/gn/default.nix | 73 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 75 insertions(+) create mode 100644 pkgs/development/tools/build-managers/gn/default.nix diff --git a/pkgs/development/tools/build-managers/gn/default.nix b/pkgs/development/tools/build-managers/gn/default.nix new file mode 100644 index 000000000000..99215c0818d4 --- /dev/null +++ b/pkgs/development/tools/build-managers/gn/default.nix @@ -0,0 +1,73 @@ +{ stdenv, lib, fetchgit, fetchurl, libevent, ninja, python }: + +let + depsGit = { + "tools/gn" = fetchgit { + url = "https://chromium.googlesource.com/chromium/src/tools/gn"; + rev = "d0c518db129975ce88ff1de26c857873b0619c4b"; + sha256 = "0l15vzmjyx6bwlz1qhn3fy7yx3qzzxr3drnkj3l0p0fmyxza52vx"; + }; + "base" = fetchgit { + url = "https://chromium.googlesource.com/chromium/src/base"; + rev = "bc6e3ce8ca01b894751e1f7b22b561e3ae2e7f17"; + sha256 = "1yl49v6nxbrfms52xf7fiwh7d4301m2aj744pa3hzzh989c5j6g5"; + }; + "build" = fetchgit { + url = "https://chromium.googlesource.com/chromium/src/build"; + rev = "e934a19ae908081fba13769924e4ea45a7a451ce"; + sha256 = "0jhy418vaiin7djg9zvk83f8zhasigki4442x5j7gkmgmgmyc4am"; + }; + "config" = fetchgit { + url = "https://chromium.googlesource.com/chromium/src/build/config"; + rev = "df16c6a2c070704b0a25efe46ee9af16de1e65b3"; + sha256 = "1x18syzz1scwhd8lf448hy5lnfpq118l403x9qmwm0np318w09wg"; + }; + "testing/gtest" = fetchgit { + url = "https://chromium.googlesource.com/chromium/testing/gtest"; + rev = "585ec31ea716f08233a815e680fc0d4699843938"; + sha256 = "0csn1cza66851nmxxiw42smsm3422mx67vcyykwn0a71lcjng6rc"; + }; + }; + +in + stdenv.mkDerivation rec { + name = "gn"; + version = "0.0.0.20170629"; + sourceRoot = "."; + + unpackPhase = '' + ${lib.concatStringsSep "\n" ( + lib.mapAttrsToList (n: v: '' + mkdir -p $sourceRoot/${n} + cp -r ${v}/* $sourceRoot/${n} + '') depsGit)} + ''; + + postPatch = '' + # Patch out Chromium-bundled libevent + chmod u+w tools/gn/bootstrap tools/gn/bootstrap/bootstrap.py + sed -i -e '/static_libraries.*libevent/,/^ *\]\?[})]$/d' \ + tools/gn/bootstrap/bootstrap.py + ''; + + NIX_LDFLAGS = "-levent"; + + nativeBuildInputs = [ ninja python ]; + buildInputs = [ libevent ]; + + buildPhase = '' + python tools/gn/bootstrap/bootstrap.py -s + ''; + + installPhase = '' + install -vD out/Release/gn "$out/bin/gn" + ''; + + meta = with stdenv.lib; { + description = "A meta-build system that generates NinjaBuild files"; + homepage = https://chromium.googlesource.com/chromium/src/tools/gn; + license = licenses.bsd3; + platforms = platforms.linux; + maintainers = [ maintainers.stesie ]; + }; + } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2b05d1d345c9..31c5219b0f15 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7283,6 +7283,8 @@ with pkgs; ninja = callPackage ../development/tools/build-managers/ninja { }; + gn = callPackage ../development/tools/build-managers/gn { }; + nixbang = callPackage ../development/tools/misc/nixbang { pythonPackages = python3Packages; }; From 44a3f688571c98ad93ccb36405294b5b197a76d2 Mon Sep 17 00:00:00 2001 From: Stefan Siegl Date: Tue, 18 Jul 2017 20:33:52 +0200 Subject: [PATCH 02/10] v8_6_x: init at 6.2.414.15 --- pkgs/development/libraries/v8/6_x.nix | 167 ++++++++++++++++++++++++ pkgs/development/libraries/v8/update.sh | 47 +++++++ pkgs/top-level/all-packages.nix | 4 + 3 files changed, 218 insertions(+) create mode 100644 pkgs/development/libraries/v8/6_x.nix create mode 100755 pkgs/development/libraries/v8/update.sh diff --git a/pkgs/development/libraries/v8/6_x.nix b/pkgs/development/libraries/v8/6_x.nix new file mode 100644 index 000000000000..8a48e224530e --- /dev/null +++ b/pkgs/development/libraries/v8/6_x.nix @@ -0,0 +1,167 @@ +{ stdenv, lib, fetchgit, fetchFromGitHub, gn, ninja, python, glib, pkgconfig +, doCheck ? false +, snapshot ? true +}: + +let + arch = if stdenv.isArm + then if stdenv.is64bit + then"arm64" + else "arm" + else if stdenv.is64bit + then"x64" + else "ia32"; + git_url = "https://chromium.googlesource.com"; + + deps = { + "base/trace_event/common" = fetchgit { + url = "${git_url}/chromium/src/base/trace_event/common.git"; + rev = "65d1d42a5df6c0a563a6fdfa58a135679185e5d9"; + sha256 = "0ikk0dj12adzr0138jrmwzhx8n9sl5qzs86a3mc3gva08a8wc84p"; + }; + "build" = fetchgit { + url = "${git_url}/chromium/src/build.git"; + rev = "48a2b7b39debc7c77c868c9ddb0a360af1ebc367"; + sha256 = "0aj554dfdbwnikwaapznfq55wkwbvg4114h7qamixy8ryjkaiy0k"; + }; + "buildtools" = fetchgit { + url = "${git_url}/chromium/buildtools.git"; + rev = "5af0a3a8b89827a8634132080a39ab4b63dee489"; + sha256 = "1841803m40w1hmnmm7qzdpk4b6q1m8cb7q4hsflqfpddpf4lp3v1"; + }; + "test/benchmarks/data" = fetchgit { + url = "${git_url}/v8/deps/third_party/benchmarks.git"; + rev = "05d7188267b4560491ff9155c5ee13e207ecd65f"; + sha256 = "0ad2ay14bn67d61ks4dmzadfnhkj9bw28r4yjdjjyzck7qbnzchl"; + }; + "test/mozilla/data" = fetchgit { + url = "${git_url}/v8/deps/third_party/mozilla-tests.git"; + rev = "f6c578a10ea707b1a8ab0b88943fe5115ce2b9be"; + sha256 = "0rfdan76yfawqxbwwb35aa57b723j3z9fx5a2w16nls02yk2kqyn"; + }; + "test/test262/data" = fetchgit { + url = "${git_url}/external/github.com/tc39/test262.git"; + rev = "1b911a8f8abf4cb63882cfbe72dcd4c82bb8ad91"; + sha256 = "1hbp7vv41k7jka8azc78hhw4qng7gckr6dz1van7cyd067znwvr4"; + }; + "test/test262/harness" = fetchgit { + url = "${git_url}/external/github.com/test262-utils/test262-harness-py.git"; + rev = "0f2acdd882c84cff43b9d60df7574a1901e2cdcd"; + sha256 = "00brj5avp43yamc92kinba2mg3a2x1rcd7wnm7z093l73idprvkp"; + }; + "test/wasm-js" = fetchgit { + url = "${git_url}/external/github.com/WebAssembly/spec.git"; + rev = "17b4a4d98c80b1ec736649d5a73496a0e6d12d4c"; + sha256 = "03nyrrqffzj6xrmqi1v7f9m9395bdk53x301fy5mcq4hhpq6rsjr"; + }; + "testing/gmock" = fetchgit { + url = "${git_url}/external/googlemock.git"; + rev = "0421b6f358139f02e102c9c332ce19a33faf75be"; + sha256 = "1xiky4v98maxs8fg1avcd56y0alv3hw8qyrlpd899zgzbq2k10pp"; + }; + "testing/gtest" = fetchgit { + url = "${git_url}/external/github.com/google/googletest.git"; + rev = "6f8a66431cb592dad629028a50b3dd418a408c87"; + sha256 = "0bdba2lr6pg15bla9600zg0r0vm4lnrx0wqz84p376wfdxra24vw"; + }; + "third_party/icu" = fetchgit { + url = "${git_url}/chromium/deps/icu.git"; + rev = "08cb956852a5ccdba7f9c941728bb833529ba3c6"; + sha256 = "0vn2iv068kmcjqqx5cgyha80x9iraz11hpx3q4n3rkvrlvbb3d7b"; + }; + "third_party/instrumented_libraries" = fetchgit { + url = "${git_url}/chromium/src/third_party/instrumented_libraries.git"; + rev = "644afd349826cb68204226a16c38bde13abe9c3c"; + sha256 = "0d1vkwilgv1a4ghazn623gwmm7h51padpfi94qrmig1y748xfwfa"; + }; + # templates of code generator require jinja2 2.8 (while nixpkgs has 2.9.5, which breaks the template) + "third_party/jinja2" = fetchgit { + url = "${git_url}/chromium/src/third_party/jinja2.git"; + rev = "d34383206fa42d52faa10bb9931d6d538f3a57e0"; + sha256 = "0d9hyw0bvp3p0dbwy833cm9vdqxcam0qbm9jc561ynphddxlkmgd"; + }; + "third_party/markupsafe" = fetchgit { + url = "${git_url}/chromium/src/third_party/markupsafe.git"; + rev = "8f45f5cfa0009d2a70589bcda0349b8cb2b72783"; + sha256 = "168ppjmicfdh4i1l0l25s86mdbrz9fgxmiq1rx33x79mph41scfz"; + }; + "tools/clang" = fetchgit { + url = "${git_url}/chromium/src/tools/clang.git"; + rev = "40f69660bf3cd407e72b8ae240fdd6c513dddbfe"; + sha256 = "1plkb9dcn34yd6lad7w59s9vqwmcc592dasgdk232spkafpg8qcf"; + }; + }; + +in + +stdenv.mkDerivation rec { + name = "v8-${version}"; + version = "6.2.414.15"; + + inherit doCheck; + + src = fetchFromGitHub { + owner = "v8"; + repo = "v8"; + rev = version; + sha256 = "1c1pjj72mj097rak2zsmm2iqn00iw93dc6gvxd89p4lbfaiilsn8"; + }; + + postUnpack = '' + ${lib.concatStringsSep "\n" ( + lib.mapAttrsToList (n: v: '' + mkdir -p $sourceRoot/${n} + cp -r ${v}/* $sourceRoot/${n} + '') deps)} + ''; + + prePatch = '' + # use our gn, not the bundled one + sed -i -e 's#gn_path = .*#gn_path = "${gn}/bin/gn"#' tools/mb/mb.py + + # disable tests + if [ "$doCheck" = "" ]; then sed -i -e '/"test:gn_all",/d' BUILD.gn; fi + + chmod u+w build/config build/config/sysroot.gni + sed -i build/config/sysroot.gni \ + -e '/use_sysroot =/ { s#\(use_sysroot =\).*#\1 false#; :a n; /current_cpu/ { s/^/#/; ba }; }' + ''; + + configurePhase = '' + tools/dev/v8gen.py -vv ${arch}.release -- \ + is_component_build=true \ + ${if snapshot then "v8_use_external_startup_data=false" else "v8_use_snapshot=false" } \ + is_clang=false \ + linux_use_bundled_binutils=false \ + treat_warnings_as_errors=false + ''; + + nativeBuildInputs = [ gn ninja pkgconfig ]; + buildInputs = [ python glib ]; + + buildPhase = '' + ninja -C out.gn/x64.release/ + ''; + + enableParallelBuilding = true; + + installPhase = '' + install -vD out.gn/x64.release/d8 "$out/bin/d8" + install -vD out.gn/x64.release/mksnapshot "$out/bin/mksnapshot" + mkdir -p "$out/lib" + for f in libicui18n.so libicuuc.so libv8_libbase.so libv8_libplatform.so libv8.so; do + install -vD out.gn/${arch}.release/$f "$out/lib/$f" + done + install -vD out.gn/${arch}.release/icudtl.dat "$out/lib/icudtl.dat" + mkdir -p "$out/include" + cp -vr include/*.h "$out/include" + cp -vr include/libplatform "$out/include" + ''; + + meta = with lib; { + description = "Google's open source JavaScript engine"; + maintainers = with maintainers; [ cstrahan proglodyte ]; + platforms = platforms.linux; + license = licenses.bsd3; + }; +} diff --git a/pkgs/development/libraries/v8/update.sh b/pkgs/development/libraries/v8/update.sh new file mode 100755 index 000000000000..f046bb8e6885 --- /dev/null +++ b/pkgs/development/libraries/v8/update.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env nix-shell +#! nix-shell -i bash -p curl -p nix-prefetch-git +VERSION_OVERVIEW=https://omahaproxy.appspot.com/all?os=linux +TARGET_CHANNEL=beta +FILE_PATH=6_x.nix + +set -eo pipefail + +v8_version=$(curl -s "$VERSION_OVERVIEW" | awk -F "," "\$2 ~ /${TARGET_CHANNEL}/ { print \$11 }") + +echo "Using V8 version --> $v8_version" +sed -e "s#\\(version = \\)\"[0-9\.]*\"#\1\"$v8_version\"#" -i ${FILE_PATH} + +sha256=$(nix-prefetch-git --no-deepClone https://github.com/v8/v8.git "refs/tags/${v8_version}" \ + | sed -ne '/sha256/ { s#.*: "\(.*\)".*#\1#; p }') +sed -e "/repo = \"v8\"/ { n;n; s#\".*\"#\"${sha256}\"# }" -i ${FILE_PATH} + +deps="$(mktemp)" + +curl -s -o "$deps" "https://raw.githubusercontent.com/v8/v8/${v8_version}/DEPS" +echo $deps + +sed -ne '/= fetchgit {/ { s/.*"\(.*\)".*/\1/; p }' < ${FILE_PATH} | while read dep; do + echo "Processing dependency --> $dep" + escaped_dep=$(echo "$dep" | sed -e 's#/#\\/#g') + dep_rev=$(sed -ne "/\"v8\/${escaped_dep}\":/ { n; s#.*+ \"##; s#\".*##; p }" "$deps") + + if [ "$dep_rev" = "" ]; then + echo "Failed to resolve dependency $dep, not listed in DEPS file" + rm -f "$deps" + exit 2 + fi + + repo_url=$(sed -ne "/\"${escaped_dep}\" = fetchgit/ { n; s/.*\"\(.*\)\".*/\1/; s#\${git_url}#https://chromium.googlesource.com#; p }" ${FILE_PATH}) + sha256=$(nix-prefetch-git --no-deepClone "$repo_url" "$dep_rev" 2>/dev/null | sed -ne '/sha256/ { s#.*: "\(.*\)".*#\1#; p }') + + if [ "$sha256" = "" ]; then + echo "Failed to get sha256 via nix-prefetch-git $repo_url $dep_rev" + rm -f "$deps" + exit 2 + fi + + sed -e "/\"${escaped_dep}\" = fetchgit/ { n; n; s/\".*\"/\"${dep_rev}\"/; n; s/\".*\"/\"${sha256}\"/ }" -i ${FILE_PATH} +done + +rm -f "$deps" +echo done. diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 31c5219b0f15..8ada3c6169e2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10726,6 +10726,10 @@ with pkgs; stdenv = overrideCC stdenv gcc5; }; + v8_6_x = callPackage ../development/libraries/v8/6_x.nix { + inherit (python2Packages) python; + }; + v8 = callPackage ../development/libraries/v8 { inherit (python2Packages) python gyp; cctools = darwin.cctools; From 6c196e37995869de365ddda6c39e2cc59616041a Mon Sep 17 00:00:00 2001 From: Stefan Siegl Date: Sun, 24 Sep 2017 11:30:55 +0200 Subject: [PATCH 03/10] php71Packages.v8js: 1.3.2 -> 1.4.1 --- pkgs/top-level/php-packages.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/top-level/php-packages.nix b/pkgs/top-level/php-packages.nix index d7ad2eb85b6e..56586cc20e00 100644 --- a/pkgs/top-level/php-packages.nix +++ b/pkgs/top-level/php-packages.nix @@ -300,13 +300,13 @@ let }; v8js = assert isPhp7; buildPecl rec { - version = "1.3.2"; + version = "1.4.1"; name = "v8js-${version}"; - sha256 = "1x7gxi70zgj3vaxs89nfbnwlqcxrps1inlyfzz66pbzdbfwvc8z8"; + sha256 = "0k5dc395gzva4l6n9mzvkhkjq914460cwk1grfandcqy73j6m89q"; - buildInputs = [ pkgs.v8 ]; - configureFlags = [ "--with-v8js=${pkgs.v8}" ]; + buildInputs = [ pkgs.v8_6_x ]; + configureFlags = [ "--with-v8js=${pkgs.v8_6_x}" ]; }; composer = pkgs.stdenv.mkDerivation rec { From 676c12356d65eb1aa2ff4bf55640368d06362f99 Mon Sep 17 00:00:00 2001 From: Stefan Siegl Date: Sun, 24 Sep 2017 11:36:55 +0200 Subject: [PATCH 04/10] php71Packages.v8: 0.1.0 -> 0.1.9 --- pkgs/top-level/php-packages.nix | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/pkgs/top-level/php-packages.nix b/pkgs/top-level/php-packages.nix index 56586cc20e00..4e25e8710a65 100644 --- a/pkgs/top-level/php-packages.nix +++ b/pkgs/top-level/php-packages.nix @@ -269,34 +269,13 @@ let }; v8 = assert isPhp7; buildPecl rec { - version = "0.1.0"; + version = "0.1.9"; name = "v8-${version}"; - src = pkgs.fetchurl { - url = "https://github.com/pinepain/php-v8/archive/v${version}.tar.gz"; - sha256 = "18smnxd34b486f5n8j0wk9z7r5x1w84v89mgf76z0bn7gxdxl0xj"; - }; + sha256 = "0bj77dfmld5wfwl4wgqnpa0i4f3mc1mpsp9dmrwqv050gs84m7h1"; - buildInputs = [ pkgs.v8 ]; - configureFlags = [ "--with-v8=${pkgs.v8}" ]; - - patches = [ - (builtins.toFile "link-libv8_libbase.patch" '' - Index: php-v8/config.m4 - =================================================================== - --- php-v8.orig/config.m4 - +++ php-v8/config.m4 - @@ -69,7 +69,7 @@ if test "$PHP_V8" != "no"; then - #static_link_extra="libv8_base.a libv8_libbase.a libv8_libplatform.a libv8_snapshot.a" - ;; - * ) - - static_link_extra="libv8_libplatform.a" - + static_link_extra="libv8_libplatform.a libv8_libbase.a" - #static_link_extra="libv8_base.a libv8_libbase.a libv8_libplatform.a libv8_snapshot.a" - ;; - esac - '' - )]; + buildInputs = [ pkgs.v8_6_x ]; + configureFlags = [ "--with-v8=${pkgs.v8_6_x}" ]; }; v8js = assert isPhp7; buildPecl rec { From e14ac35238c8733add6d785cae64d6e8fbfc469e Mon Sep 17 00:00:00 2001 From: Stefan Siegl Date: Sun, 24 Sep 2017 18:10:31 +0200 Subject: [PATCH 05/10] v8_6_x: fix hard-coded architecture --- pkgs/development/libraries/v8/6_x.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/v8/6_x.nix b/pkgs/development/libraries/v8/6_x.nix index 8a48e224530e..384c6d7d9841 100644 --- a/pkgs/development/libraries/v8/6_x.nix +++ b/pkgs/development/libraries/v8/6_x.nix @@ -140,14 +140,14 @@ stdenv.mkDerivation rec { buildInputs = [ python glib ]; buildPhase = '' - ninja -C out.gn/x64.release/ + ninja -C out.gn/${arch}.release/ ''; enableParallelBuilding = true; installPhase = '' - install -vD out.gn/x64.release/d8 "$out/bin/d8" - install -vD out.gn/x64.release/mksnapshot "$out/bin/mksnapshot" + install -vD out.gn/${arch}.release/d8 "$out/bin/d8" + install -vD out.gn/${arch}.release/mksnapshot "$out/bin/mksnapshot" mkdir -p "$out/lib" for f in libicui18n.so libicuuc.so libv8_libbase.so libv8_libplatform.so libv8.so; do install -vD out.gn/${arch}.release/$f "$out/lib/$f" From 6e8b89157fcb935400e74ff32a2cb197896c31e9 Mon Sep 17 00:00:00 2001 From: Stefan Siegl Date: Sun, 24 Sep 2017 18:10:58 +0200 Subject: [PATCH 06/10] v8_6_x: fix sandbox build (/usr/bin/env dependency) --- pkgs/development/libraries/v8/6_x.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/libraries/v8/6_x.nix b/pkgs/development/libraries/v8/6_x.nix index 384c6d7d9841..dc6a559d287e 100644 --- a/pkgs/development/libraries/v8/6_x.nix +++ b/pkgs/development/libraries/v8/6_x.nix @@ -122,9 +122,13 @@ stdenv.mkDerivation rec { # disable tests if [ "$doCheck" = "" ]; then sed -i -e '/"test:gn_all",/d' BUILD.gn; fi + # disable sysroot usage chmod u+w build/config build/config/sysroot.gni sed -i build/config/sysroot.gni \ -e '/use_sysroot =/ { s#\(use_sysroot =\).*#\1 false#; :a n; /current_cpu/ { s/^/#/; ba }; }' + + # patch shebangs (/usr/bin/env) + patchShebangs tools/dev/v8gen.py ''; configurePhase = '' From 24ab22bea89f5a522c81ca5a7c78e73023ab4d30 Mon Sep 17 00:00:00 2001 From: Stefan Siegl Date: Sun, 24 Sep 2017 19:23:20 +0200 Subject: [PATCH 07/10] gn: fix sandbox build --- pkgs/development/tools/build-managers/gn/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/tools/build-managers/gn/default.nix b/pkgs/development/tools/build-managers/gn/default.nix index 99215c0818d4..5e7dd5214a04 100644 --- a/pkgs/development/tools/build-managers/gn/default.nix +++ b/pkgs/development/tools/build-managers/gn/default.nix @@ -44,6 +44,10 @@ in ''; postPatch = '' + # Patch shebands (for sandbox build) + chmod u+w -R build + patchShebangs build + # Patch out Chromium-bundled libevent chmod u+w tools/gn/bootstrap tools/gn/bootstrap/bootstrap.py sed -i -e '/static_libraries.*libevent/,/^ *\]\?[})]$/d' \ From e9609f25b3adf9b86c9b3b910c79188e9691e3b9 Mon Sep 17 00:00:00 2001 From: Stefan Siegl Date: Mon, 9 Oct 2017 21:31:16 +0200 Subject: [PATCH 08/10] v8_6_x: 6.2.414.15 -> 6.2.414.27 --- pkgs/development/libraries/v8/6_x.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/v8/6_x.nix b/pkgs/development/libraries/v8/6_x.nix index dc6a559d287e..4095ff20c2bc 100644 --- a/pkgs/development/libraries/v8/6_x.nix +++ b/pkgs/development/libraries/v8/6_x.nix @@ -96,7 +96,7 @@ in stdenv.mkDerivation rec { name = "v8-${version}"; - version = "6.2.414.15"; + version = "6.2.414.27"; inherit doCheck; @@ -104,7 +104,7 @@ stdenv.mkDerivation rec { owner = "v8"; repo = "v8"; rev = version; - sha256 = "1c1pjj72mj097rak2zsmm2iqn00iw93dc6gvxd89p4lbfaiilsn8"; + sha256 = "15zrb9bcpnhljhrilqnjaak3a4xnhj8li6ra12g3gkrw3fzir9a2"; }; postUnpack = '' From 7dd87bd0c43ce3435c31ef237dc91cf670e0672d Mon Sep 17 00:00:00 2001 From: Stefan Siegl Date: Mon, 9 Oct 2017 23:32:12 +0200 Subject: [PATCH 09/10] eventstore: 3.5.0 -> 4.0.3 ... and use recent V8 version. --- pkgs/servers/nosql/eventstore/default.nix | 7 ++++--- pkgs/top-level/all-packages.nix | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/servers/nosql/eventstore/default.nix b/pkgs/servers/nosql/eventstore/default.nix index 572cfe1f17d6..e6bf634b554c 100644 --- a/pkgs/servers/nosql/eventstore/default.nix +++ b/pkgs/servers/nosql/eventstore/default.nix @@ -1,16 +1,16 @@ -{ stdenv, fetchFromGitHub, fetchpatch, mono, v8 }: +{ stdenv, fetchFromGitHub, fetchpatch, git, mono, v8 }: # There are some similarities with the pinta derivation. We should # have a helper to make it easy to package these Mono apps. stdenv.mkDerivation rec { name = "EventStore-${version}"; - version = "3.5.0"; + version = "4.0.3"; src = fetchFromGitHub { owner = "EventStore"; repo = "EventStore"; rev = "oss-v${version}"; - sha256 = "0dp5914hxwdzw62q49wavqfqkw3jy0dvml09y7gh8frnbiajcxq9"; + sha256 = "1905bnqyyiqprva67cp49rgib324iipw2l71jzj0ynzi7kxr4mgg"; }; buildPhase = '' @@ -33,6 +33,7 @@ stdenv.mkDerivation rec { chmod +x $out/bin/clusternode ''; + nativeBuildInputs = [ git ]; buildInputs = [ v8 mono ]; phases = [ "unpackPhase" "buildPhase" "installPhase" ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8ada3c6169e2..f9d0142c137a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11339,7 +11339,8 @@ with pkgs; elasticmq = callPackage ../servers/elasticmq { }; eventstore = callPackage ../servers/nosql/eventstore { - v8 = v8_3_24_10; + mono = mono46; + v8 = v8_6_x; }; etcdctl = etcd; From 8ca237e69888f795a3dd9668771b274b760ba6b2 Mon Sep 17 00:00:00 2001 From: Stefan Siegl Date: Mon, 9 Oct 2017 23:40:12 +0200 Subject: [PATCH 10/10] v8_3_24_10: remove --- pkgs/development/libraries/v8/3.24.10.nix | 6 -- pkgs/development/libraries/v8/generic.nix | 79 ----------------------- pkgs/top-level/all-packages.nix | 5 -- 3 files changed, 90 deletions(-) delete mode 100644 pkgs/development/libraries/v8/3.24.10.nix delete mode 100644 pkgs/development/libraries/v8/generic.nix diff --git a/pkgs/development/libraries/v8/3.24.10.nix b/pkgs/development/libraries/v8/3.24.10.nix deleted file mode 100644 index e7b10f23ac8a..000000000000 --- a/pkgs/development/libraries/v8/3.24.10.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ callPackage, ... } @ args: - -callPackage ./generic.nix (args // { - version = "3.24.10"; - sha256 = "1blz5h9syk93bb4x3shcai3s2jhh6ai4bpymr9rz0f1ysvg60x75"; -}) diff --git a/pkgs/development/libraries/v8/generic.nix b/pkgs/development/libraries/v8/generic.nix deleted file mode 100644 index d603fda3225c..000000000000 --- a/pkgs/development/libraries/v8/generic.nix +++ /dev/null @@ -1,79 +0,0 @@ -{ stdenv, fetchurl, gyp, readline, python, which, icu -, version -, sha256 -, ... -}: - -assert readline != null; - -let - arch = if stdenv.is64bit then "x64" else "ia32"; -in - -stdenv.mkDerivation rec { - name = "v8-${version}"; - inherit version; - - src = fetchurl { - url = "https://commondatastorage.googleapis.com/chromium-browser-official/" - + "${name}.tar.bz2"; - inherit sha256; - }; - - patchPhase = '' - sed -i 's,#!/usr/bin/env python,#!${python}/bin/python,' build/gyp_v8 - ''; - - configurePhase = '' - PYTHONPATH="tools/generate_shim_headers:$PYTHONPATH" \ - PYTHONPATH="$(toPythonPath ${gyp}):$PYTHONPATH" \ - build/gyp_v8 \ - -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} - ''; - - nativeBuildInputs = [ which ]; - buildInputs = [ readline python icu ]; - - NIX_CFLAGS_COMPILE = "-Wno-error=strict-overflow"; - - buildFlags = [ - "LINK=g++" - "-C out" - "builddir=$(CURDIR)/Release" - "BUILDTYPE=Release" - ]; - - postPatch = stdenv.lib.optionalString (!stdenv.cc.isClang) '' - sed -i build/standalone.gyp -e 's,-Wno-format-pedantic,,g' - ''; - - 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.cc.cc.lib}/lib/libgcc_s.1.dylib $out/bin/d8 - install_name_tool -id $out/lib/libv8.dylib -change /usr/lib/libgcc_s.1.dylib ${stdenv.cc.cc.lib}/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; - license = licenses.bsd3; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f9d0142c137a..0dc2f4491966 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10721,11 +10721,6 @@ with pkgs; stdenv = overrideCC stdenv gcc5; }; - v8_3_24_10 = callPackage ../development/libraries/v8/3.24.10.nix { - inherit (python2Packages) python gyp; - stdenv = overrideCC stdenv gcc5; - }; - v8_6_x = callPackage ../development/libraries/v8/6_x.nix { inherit (python2Packages) python; };