summary refs log tree commit diff
path: root/pkgs/development/tools/guile/guile-lint/default.nix
blob: 177e78f6555af13f9472c31bf43046bb5d79fe4b (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
{ stdenv, fetchurl, guile }:

let
  name = "guile-lint-${version}";
  version = "14";
in stdenv.mkDerivation {
  inherit name;

  src = fetchurl {
    url = "http://download.tuxfamily.org/user42/${name}.tar.bz2";
    sha256 = "5bfcf7a623338b2ef81ac097e3e136eaf32856dd0730b7eeaff3161067b5d0be";
  };

  buildInputs = [ guile ];

  unpackPhase = ''tar xjvf "$src" && sourceRoot="$PWD/${name}"'';

  patchPhase = ''
    cat guile-lint.in |						\
    sed 's|^exec guile|exec $\{GUILE:-${guile}/bin/guile}|g' > ,,tmp &&	\
    mv ,,tmp guile-lint.in
  '';

  doCheck = true;

  meta = {
    description = "Checks syntax and semantics in a Guile program or module";
    homepage = "http://user42.tuxfamily.org/guile-lint/index.html";
    license = "GPL";
  };
}