diff options
author | Hoang Xuan Phu <phuhimself@phunehehe.net> | 2016-04-30 17:11:00 +0800 |
---|---|---|
committer | Hoang Xuan Phu <phuhimself@phunehehe.net> | 2016-04-30 18:26:08 +0800 |
commit | 60e8d9dfabc6721dfc7a1af4a24bf001390f351d (patch) | |
tree | 77a8167589628cfc604bb8d795c28ab1457d0cd7 /pkgs/development/tools/casperjs | |
parent | 6ac488f2a0305c0f548f83fdcbf3378ce9d76331 (diff) |
casperjs: refactor a bit
Diffstat (limited to 'pkgs/development/tools/casperjs')
-rw-r--r-- | pkgs/development/tools/casperjs/default.nix | 48 |
1 files changed, 25 insertions, 23 deletions
diff --git a/pkgs/development/tools/casperjs/default.nix b/pkgs/development/tools/casperjs/default.nix index bd63a0e68eeb..5b4b8cc752d9 100644 --- a/pkgs/development/tools/casperjs/default.nix +++ b/pkgs/development/tools/casperjs/default.nix @@ -1,40 +1,42 @@ -{ stdenv, fetchgit, python, phantomjs }: +{ stdenv, fetchFromGitHub, phantomjs, python, nodePackages }: -stdenv.mkDerivation rec { - name = "casperjs-1.0.0-RC5"; +let version = "1.0.0-RC5"; - 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 = "10b25jmh9zmlp77h0p3n9d6bnl3wn4iv3h3qnsrgijfszxyh0wgw"; }; + buildInputs = [ phantomjs python nodePackages.eslint ]; + patchPhase = '' substituteInPlace bin/casperjs --replace "/usr/bin/env python" "${python}/bin/python" \ --replace "'phantomjs'" "'${phantomjs}/bin/phantomjs'" ''; + dontBuild = true; + 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; |