summary refs log tree commit diff
path: root/pkgs/development/tools/analysis/sparse/default.nix
blob: 29ee980b4874a5a2012b49c97eb87372577fe405 (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
{ fetchurl, stdenv, pkg-config, libxml2, llvm }:

stdenv.mkDerivation rec {
  name = "sparse-0.5.0";

  src = fetchurl {
    url = "mirror://kernel/software/devel/sparse/dist/${name}.tar.xz";
    sha256 = "1mc86jc5xdrdmv17nqj2cam2yqygnj6ar1iqkwsx2y37ij8wy7wj";
  };

  preConfigure = ''
    sed -i Makefile -e "s|^PREFIX=.*$|PREFIX=$out|g"
  '';

  nativeBuildInputs = [ pkg-config ];
  buildInputs = [ libxml2 llvm ];
  doCheck = true;

  meta = {
    description = "Semantic parser for C";
    homepage    = "https://git.kernel.org/cgit/devel/sparse/sparse.git/";
    license     = stdenv.lib.licenses.mit;
    platforms   = stdenv.lib.platforms.linux;
    maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
  };
}