summary refs log tree commit diff
path: root/pkgs/development/tools/misc/jscoverage/default.nix
blob: 6ed66c8d3cc0f910d8e6bf27b519012aeb7b0d1b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{ autoconf, fetchurl, makedepend, perl, python, stdenv, unzip, zip }:

stdenv.mkDerivation rec {
  name = "jscoverage-0.5.1";

  src = fetchurl {
    url = "https://siliconforks.com/jscoverage/download/${name}.tar.bz2";
    sha256 = "c45f051cec18c10352f15f9844f47e37e8d121d5fd16680e2dd0f3b4420eb7f4";
  };

  patches = [
    ./jsfalse_to_null.patch
  ];

  buildInputs = [ autoconf makedepend perl python unzip zip ];

  # It works without MOZ_FIX_LINK_PATHS, circumventing an impurity
  # issue.  Maybe we could kick js/ (spidermonkey) completely and
  # instead use our spidermonkey via nix.
  preConfigure = ''
  sed -i 's/^MOZ_FIX_LINK_PATHS=.*$/MOZ_FIX_LINK_PATHS=""/' ./js/configure
  '';

  meta = {
    description = "Code coverage for JavaScript";

    longDescription = ''
    JSCoverage is a tool that measures code coverage for JavaScript
    programs.

    Code coverage statistics show which lines of a program have been
    executed (and which have been missed). This information is useful
    for constructing comprehensive test suites (hence, it is often
    called test coverage).

    JSCoverage works by instrumenting the JavaScript code used in web
    pages. Code coverage statistics are collected while the
    instrumented JavaScript code is executed in a web browser.

    JSCoverage supports the complete language syntax described in the
    ECMAScript Language Specification (ECMA-262, 3rd
    edition). JSCoverage works with any modern standards-compliant web
    browser - including Internet Explorer (IE 6, 7, and 8), Firefox,
    Opera, Safari, and Google Chrome - on Microsoft Windows and
    GNU/Linux.
    '';

    homepage = "http://siliconforks.com/jscoverage/";
    license = stdenv.lib.licenses.gpl2;
    platforms = stdenv.lib.platforms.linux;
  };
}