From b77df197f5d91eee6951fc594c17e9b225fc41ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Wed, 6 Apr 2016 12:29:45 +0100 Subject: [PATCH] phantomjs2: 2.0.0 -> 2.1.1 (fix build) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 94036474c2b424ac19c4e8e30b5b026210649789) Signed-off-by: Domen Kožar --- pkgs/development/tools/phantomjs2/default.nix | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/pkgs/development/tools/phantomjs2/default.nix b/pkgs/development/tools/phantomjs2/default.nix index a0f919b404f3..e5af795fa4b7 100644 --- a/pkgs/development/tools/phantomjs2/default.nix +++ b/pkgs/development/tools/phantomjs2/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, +{ stdenv, fetchgit, bison2, flex, fontconfig, freetype, gperf, icu, openssl, libjpeg, libpng, perl, python, ruby, sqlite, darwin, writeScriptBin, cups }: @@ -33,11 +33,13 @@ let in stdenv.mkDerivation rec { name = "phantomjs-${version}"; - version = "2.0.0-20150528"; + version = "2.1.1"; - src = fetchurl { - url = "https://github.com/bprodoehl/phantomjs/archive/v2.0.0-20150528.tar.gz"; - sha256 = "18h37bxxg25lacry9k3vb5yim057bqcxmsifw97jrjp7gzfx56v5"; + # needs git submodules, so can't use fetchFromGitHub + src = fetchgit { + rev = "refs/tags/${version}"; + url = "https://github.com/ariya/phantomjs.git"; + sha256 = "16x104cw5f1dyhf7fg12vlpcywvc9c43r9afhl0dvssgxklrn0q7"; }; buildInputs = [ bison2 flex fontconfig freetype gperf icu openssl libjpeg libpng perl python ruby sqlite ] @@ -49,7 +51,8 @@ in stdenv.mkDerivation rec { patchPhase = '' patchShebangs . - sed -i -e 's|/bin/pwd|pwd|' src/qt/qtbase/configure + sed -i -e 's|/bin/pwd|pwd|' src/qt/qtbase/configure + touch src/qt/{qtbase,qtwebkit,3rdparty}/.git '' + stdenv.lib.optionalString stdenv.isDarwin '' sed -i 's,-licucore,/usr/lib/libicucore.dylib,' src/qt/qtwebkit/Source/WTF/WTF.pri substituteInPlace src/qt/qtwebkit/Tools/qmake/mkspecs/features/features.pri \ @@ -78,7 +81,9 @@ in stdenv.mkDerivation rec { __impureHostDeps = stdenv.lib.optional stdenv.isDarwin "/usr/lib/libicucore.dylib"; - buildPhase = "./build.sh --confirm"; + buildPhase = "./build.py --confirm -j$NIX_BUILD_CORES"; + + enableParallelBuilding = true; installPhase = '' mkdir -p $out/share/doc/phantomjs