1{ autoconf, fetchurl, makedepend, perl, python, stdenv, unzip, zip }:
2
3stdenv.mkDerivation rec {
4 name = "jscoverage-0.5.1";
5
6 src = fetchurl {
7 url = "http://siliconforks.com/jscoverage/download/${name}.tar.bz2";
8 sha256 = "c45f051cec18c10352f15f9844f47e37e8d121d5fd16680e2dd0f3b4420eb7f4";
9 };
10
11 buildInputs = [ autoconf makedepend perl python unzip zip ];
12
13 # It works without MOZ_FIX_LINK_PATHS, circumventing an impurity
14 # issue. Maybe we could kick js/ (spidermonkey) completely and
15 # instead use our spidermonkey via nix.
16 preConfigure = ''
17 sed -i 's/^MOZ_FIX_LINK_PATHS=.*$/MOZ_FIX_LINK_PATHS=""/' ./js/configure
18 '';
19
20 meta = {
21 description = "Code coverage for JavaScript";
22
23 longDescription = ''
24 JSCoverage is a tool that measures code coverage for JavaScript
25 programs.
26
27 Code coverage statistics show which lines of a program have been
28 executed (and which have been missed). This information is useful
29 for constructing comprehensive test suites (hence, it is often
30 called test coverage).
31
32 JSCoverage works by instrumenting the JavaScript code used in web
33 pages. Code coverage statistics are collected while the
34 instrumented JavaScript code is executed in a web browser.
35
36 JSCoverage supports the complete language syntax described in the
37 ECMAScript Language Specification (ECMA-262, 3rd
38 edition). JSCoverage works with any modern standards-compliant web
39 browser - including Internet Explorer (IE 6, 7, and 8), Firefox,
40 Opera, Safari, and Google Chrome - on Microsoft Windows and
41 GNU/Linux.
42 '';
43
44 homepage = http://siliconforks.com/jscoverage/;
45 license = stdenv.lib.licenses.gpl2;
46 };
47}