diff options
author | Alexander Flatter <flatter@fastmail.fm> | 2015-07-07 15:30:41 +0200 |
---|---|---|
committer | Alexander Flatter <flatter@fastmail.fm> | 2015-07-15 21:14:15 +0200 |
commit | a475f993045a48ea1ca3ee81d6786863bdbb4a3d (patch) | |
tree | a4ca3972d2f0a929cb787edf67d79de40bf58caf /pkgs/development/tools/phantomjs2 | |
parent | 2936e01bc8c147f3c6862ccbc6b0a74115041651 (diff) |
Add phantomjs2
This builds PhantomJS 2 from source in contrast to PhantomJS 1, for which static binary builds are available.
Diffstat (limited to 'pkgs/development/tools/phantomjs2')
-rw-r--r-- | pkgs/development/tools/phantomjs2/default.nix | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/pkgs/development/tools/phantomjs2/default.nix b/pkgs/development/tools/phantomjs2/default.nix new file mode 100644 index 0000000000000..8ef68f93a2f7c --- /dev/null +++ b/pkgs/development/tools/phantomjs2/default.nix @@ -0,0 +1,49 @@ +{ stdenv, fetchurl, + bison2, flex, fontconfig, freetype, gperf, icu, openssl, libjpeg, libpng, perl, python, ruby, sqlite +}: + +stdenv.mkDerivation rec { + name = "phantomjs-${version}"; + version = "2.0.0-20150528"; + + src = fetchurl { + url = "https://github.com/bprodoehl/phantomjs/archive/v2.0.0-20150528.tar.gz"; + sha256 = "18h37bxxg25lacry9k3vb5yim057bqcxmsifw97jrjp7gzfx56v5"; + }; + + buildInputs = [ bison2 flex fontconfig freetype gperf icu openssl libjpeg libpng perl python ruby sqlite ]; + + patchPhase = '' + patchShebangs . + sed -i -e 's|/bin/pwd|pwd|' src/qt/qtbase/configure + ''; + + buildPhase = "./build.sh --confirm"; + + installPhase = '' + mkdir -p $out/share/doc/phantomjs + cp -a bin $out + cp -a ChangeLog examples LICENSE.BSD README.md third-party.txt $out/share/doc/phantomjs + ''; + + meta = { + description = "Headless WebKit with JavaScript API"; + longDescription = '' + PhantomJS2 is a headless WebKit with JavaScript API. + It has fast and native support for various web standards: + DOM handling, CSS selector, JSON, Canvas, and SVG. + + PhantomJS is an optimal solution for: + - Headless Website Testing + - Screen Capture + - Page Automation + - Network Monitoring + ''; + + homepage = http://phantomjs.org/; + license = stdenv.lib.licenses.bsd3; + + maintainers = [ stdenv.lib.maintainers.aflatter ]; + platforms = with stdenv.lib.platforms; darwin ++ linux; + }; +} |