lol

Add phantomjs2

This builds PhantomJS 2 from source in contrast to PhantomJS 1, for
which static binary builds are available.

+51
+49
pkgs/development/tools/phantomjs2/default.nix
··· 1 + { stdenv, fetchurl, 2 + bison2, flex, fontconfig, freetype, gperf, icu, openssl, libjpeg, libpng, perl, python, ruby, sqlite 3 + }: 4 + 5 + stdenv.mkDerivation rec { 6 + name = "phantomjs-${version}"; 7 + version = "2.0.0-20150528"; 8 + 9 + src = fetchurl { 10 + url = "https://github.com/bprodoehl/phantomjs/archive/v2.0.0-20150528.tar.gz"; 11 + sha256 = "18h37bxxg25lacry9k3vb5yim057bqcxmsifw97jrjp7gzfx56v5"; 12 + }; 13 + 14 + buildInputs = [ bison2 flex fontconfig freetype gperf icu openssl libjpeg libpng perl python ruby sqlite ]; 15 + 16 + patchPhase = '' 17 + patchShebangs . 18 + sed -i -e 's|/bin/pwd|pwd|' src/qt/qtbase/configure 19 + ''; 20 + 21 + buildPhase = "./build.sh --confirm"; 22 + 23 + installPhase = '' 24 + mkdir -p $out/share/doc/phantomjs 25 + cp -a bin $out 26 + cp -a ChangeLog examples LICENSE.BSD README.md third-party.txt $out/share/doc/phantomjs 27 + ''; 28 + 29 + meta = { 30 + description = "Headless WebKit with JavaScript API"; 31 + longDescription = '' 32 + PhantomJS2 is a headless WebKit with JavaScript API. 33 + It has fast and native support for various web standards: 34 + DOM handling, CSS selector, JSON, Canvas, and SVG. 35 + 36 + PhantomJS is an optimal solution for: 37 + - Headless Website Testing 38 + - Screen Capture 39 + - Page Automation 40 + - Network Monitoring 41 + ''; 42 + 43 + homepage = http://phantomjs.org/; 44 + license = stdenv.lib.licenses.bsd3; 45 + 46 + maintainers = [ stdenv.lib.maintainers.aflatter ]; 47 + platforms = with stdenv.lib.platforms; darwin ++ linux; 48 + }; 49 + }
+2
pkgs/top-level/all-packages.nix
··· 5629 5629 5630 5630 phantomjs = callPackage ../development/tools/phantomjs { }; 5631 5631 5632 + phantomjs2 = callPackage ../development/tools/phantomjs2 { }; 5633 + 5632 5634 pmccabe = callPackage ../development/tools/misc/pmccabe { }; 5633 5635 5634 5636 /* Make pkgconfig always return a nativeDrv, never a proper crossDrv,