at 18.03-beta 55 lines 1.4 kB view raw
1{ stdenv, fetchFromGitHub, fontsConf, phantomjs2, python, nodePackages }: 2 3let version = "1.1.1"; 4 5in stdenv.mkDerivation rec { 6 7 name = "casperjs-${version}"; 8 9 src = fetchFromGitHub { 10 owner = "casperjs"; 11 repo = "casperjs"; 12 rev = version; 13 sha256 = "187prrm728xpn0nx9kxfxa4fwd7w25z78nsxfk6a6kl7c5656jpz"; 14 }; 15 16 buildInputs = [ phantomjs2 python nodePackages.eslint ]; 17 18 patchPhase = '' 19 substituteInPlace bin/casperjs --replace "/usr/bin/env python" "${python}/bin/python" \ 20 --replace "'phantomjs'" "'${phantomjs2}/bin/phantomjs'" 21 ''; 22 23 dontBuild = true; 24 25 doCheck = true; 26 checkPhase = '' 27 export FONTCONFIG_FILE=${fontsConf} 28 make test 29 ''; 30 31 installPhase = '' 32 cp -r . $out 33 ''; 34 35 meta = { 36 37 description = '' 38 Navigation scripting & testing utility for PhantomJS and SlimerJS 39 ''; 40 41 longDescription = '' 42 CasperJS is a navigation scripting & testing utility for PhantomJS and 43 SlimerJS (still experimental). It eases the process of defining a full 44 navigation scenario and provides useful high-level functions, methods & 45 syntactic sugar for doing common tasks. 46 ''; 47 48 homepage = http://casperjs.org; 49 license = stdenv.lib.licenses.mit; 50 51 maintainers = [ stdenv.lib.maintainers.bluescreen303 ]; 52 platforms = stdenv.lib.platforms.linux; 53 broken = true; 54 }; 55}