Merge pull request #15099 from phunehehe/casperjs

Casperjs: refactor and update
This commit is contained in:
Arseniy Seroka 2016-05-01 19:35:14 +03:00
commit 41efe6535d
2 changed files with 43 additions and 32 deletions

View File

@ -1,40 +1,49 @@
{ stdenv, fetchgit, python, phantomjs }:
{ stdenv, fetchFromGitHub, fontsConf, phantomjs2, python, nodePackages }:
stdenv.mkDerivation rec {
name = "casperjs-1.0.0-RC5";
let version = "1.1.1";
src = fetchgit {
url = "git://github.com/n1k0/casperjs.git";
rev = "refs/tags/1.0.0-RC5";
sha256 = "e7fd6b94b4b304416159196208dea7f6e8841a667df102eb378a698a92f0f2c7";
in stdenv.mkDerivation rec {
name = "casperjs-${version}";
src = fetchFromGitHub {
owner = "casperjs";
repo = "casperjs";
rev = version;
sha256 = "187prrm728xpn0nx9kxfxa4fwd7w25z78nsxfk6a6kl7c5656jpz";
};
buildInputs = [ phantomjs2 python nodePackages.eslint ];
patchPhase = ''
substituteInPlace bin/casperjs --replace "/usr/bin/env python" "${python}/bin/python" \
--replace "'phantomjs'" "'${phantomjs}/bin/phantomjs'"
--replace "'phantomjs'" "'${phantomjs2}/bin/phantomjs'"
'';
dontBuild = true;
doCheck = true;
checkPhase = ''
export FONTCONFIG_FILE=${fontsConf}
make test
'';
installPhase = ''
mkdir -p $out/share/casperjs $out/bin
cp -a . $out/share/casperjs/.
ln -s $out/share/casperjs/bin/casperjs $out/bin
mv $PWD $out
'';
meta = {
description = "Navigation scripting & testing utility for PhantomJS";
description = ''
Navigation scripting & testing utility for PhantomJS and SlimerJS
'';
longDescription = ''
CasperJS is a navigation scripting & testing utility for PhantomJS.
It eases the process of defining a full navigation scenario and provides useful high-level
functions, methods & syntaxic sugar for doing common tasks such as:
- defining & ordering navigation steps
- filling forms
- clicking links
- capturing screenshots of a page (or an area)
- making assertions on remote DOM
- logging & events
- downloading base64 encoded resources, even binary ones
- catching errors and react accordingly
- writing functional test suites, exporting results as JUnit XML (xUnit)
CasperJS is a navigation scripting & testing utility for PhantomJS and
SlimerJS (still experimental). It eases the process of defining a full
navigation scenario and provides useful high-level functions, methods &
syntactic sugar for doing common tasks.
'';
homepage = http://casperjs.org;

View File

@ -5816,7 +5816,9 @@ in
inherit rustc;
};
casperjs = callPackage ../development/tools/casperjs { };
casperjs = callPackage ../development/tools/casperjs {
inherit (texFunctions) fontsConf;
};
cbrowser = callPackage ../development/tools/misc/cbrowser { };
@ -6470,13 +6472,13 @@ in
beecrypt = callPackage ../development/libraries/beecrypt { };
beignet = callPackage ../development/libraries/beignet {
inherit (llvmPackages) clang-unwrapped;
inherit (xlibs) libX11;
inherit (xorg) libXfixes libpthreadstubs libXdmcp libXdamage libXxf86vm;
inherit (python3Packages) python;
inherit (purePackages) gl;
};
inherit (llvmPackages) clang-unwrapped;
inherit (xlibs) libX11;
inherit (xorg) libXfixes libpthreadstubs libXdmcp libXdamage libXxf86vm;
inherit (python3Packages) python;
inherit (purePackages) gl;
};
belle-sip = callPackage ../development/libraries/belle-sip { };
bobcat = callPackage ../development/libraries/bobcat { };