3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/casperjs/default.nix

57 lines
1.4 KiB
Nix
Raw Normal View History

2016-04-30 11:25:52 +01:00
{ stdenv, fetchFromGitHub, fontsConf, phantomjs2, python, nodePackages }:
2012-12-13 16:39:16 +00:00
2016-04-30 10:11:23 +01:00
let version = "1.1.1";
2012-12-13 16:39:16 +00:00
2019-08-13 22:52:01 +01:00
in stdenv.mkDerivation {
2016-04-30 10:11:00 +01:00
2019-08-13 22:52:01 +01:00
pname = "casperjs";
inherit version;
2016-04-30 10:11:00 +01:00
src = fetchFromGitHub {
owner = "casperjs";
repo = "casperjs";
rev = version;
2016-04-30 10:11:23 +01:00
sha256 = "187prrm728xpn0nx9kxfxa4fwd7w25z78nsxfk6a6kl7c5656jpz";
2012-12-13 16:39:16 +00:00
};
2016-04-30 10:13:00 +01:00
buildInputs = [ phantomjs2 python nodePackages.eslint ];
2016-04-30 10:11:00 +01:00
2012-12-13 16:39:16 +00:00
patchPhase = ''
substituteInPlace bin/casperjs --replace "/usr/bin/env python" "${python}/bin/python" \
2016-04-30 10:13:00 +01:00
--replace "'phantomjs'" "'${phantomjs2}/bin/phantomjs'"
2012-12-13 16:39:16 +00:00
'';
2016-04-30 10:11:00 +01:00
dontBuild = true;
2016-04-30 10:11:23 +01:00
doCheck = true;
2016-04-30 11:25:52 +01:00
checkPhase = ''
export FONTCONFIG_FILE=${fontsConf}
make test
'';
2012-12-13 16:39:16 +00:00
installPhase = ''
cp -r . $out
2012-12-13 16:39:16 +00:00
'';
meta = {
2016-04-30 10:11:00 +01:00
description = ''
Navigation scripting & testing utility for PhantomJS and SlimerJS
'';
2012-12-13 16:39:16 +00:00
longDescription = ''
2016-04-30 10:11:00 +01:00
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.
2012-12-13 16:39:16 +00:00
'';
homepage = "http://casperjs.org";
2012-12-13 16:39:16 +00:00
license = stdenv.lib.licenses.mit;
maintainers = [ stdenv.lib.maintainers.bluescreen303 ];
2013-10-08 10:05:19 +01:00
platforms = stdenv.lib.platforms.linux;
broken = true;
2012-12-13 16:39:16 +00:00
};
}