casperjs: refactor a bit
This commit is contained in:
parent
6ac488f2a0
commit
60e8d9dfab
|
@ -1,40 +1,42 @@
|
||||||
{ stdenv, fetchgit, python, phantomjs }:
|
{ stdenv, fetchFromGitHub, phantomjs, python, nodePackages }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
let version = "1.0.0-RC5";
|
||||||
name = "casperjs-1.0.0-RC5";
|
|
||||||
|
|
||||||
src = fetchgit {
|
in stdenv.mkDerivation rec {
|
||||||
url = "git://github.com/n1k0/casperjs.git";
|
|
||||||
rev = "refs/tags/1.0.0-RC5";
|
name = "casperjs-${version}";
|
||||||
sha256 = "e7fd6b94b4b304416159196208dea7f6e8841a667df102eb378a698a92f0f2c7";
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "casperjs";
|
||||||
|
repo = "casperjs";
|
||||||
|
rev = version;
|
||||||
|
sha256 = "10b25jmh9zmlp77h0p3n9d6bnl3wn4iv3h3qnsrgijfszxyh0wgw";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
buildInputs = [ phantomjs python nodePackages.eslint ];
|
||||||
|
|
||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
substituteInPlace bin/casperjs --replace "/usr/bin/env python" "${python}/bin/python" \
|
substituteInPlace bin/casperjs --replace "/usr/bin/env python" "${python}/bin/python" \
|
||||||
--replace "'phantomjs'" "'${phantomjs}/bin/phantomjs'"
|
--replace "'phantomjs'" "'${phantomjs}/bin/phantomjs'"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
dontBuild = true;
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/share/casperjs $out/bin
|
mv $PWD $out
|
||||||
cp -a . $out/share/casperjs/.
|
|
||||||
ln -s $out/share/casperjs/bin/casperjs $out/bin
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Navigation scripting & testing utility for PhantomJS";
|
|
||||||
|
description = ''
|
||||||
|
Navigation scripting & testing utility for PhantomJS and SlimerJS
|
||||||
|
'';
|
||||||
|
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
CasperJS is a navigation scripting & testing utility for PhantomJS.
|
CasperJS is a navigation scripting & testing utility for PhantomJS and
|
||||||
It eases the process of defining a full navigation scenario and provides useful high-level
|
SlimerJS (still experimental). It eases the process of defining a full
|
||||||
functions, methods & syntaxic sugar for doing common tasks such as:
|
navigation scenario and provides useful high-level functions, methods &
|
||||||
- defining & ordering navigation steps
|
syntactic sugar for doing common tasks.
|
||||||
- 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)
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
homepage = http://casperjs.org;
|
homepage = http://casperjs.org;
|
||||||
|
|
Loading…
Reference in a new issue