nixpkgs/pkgs/development/tools/analysis/smatch/default.nix

35 lines
884 B
Nix
Raw Normal View History

{ lib, stdenv, fetchgit, sqlite, pkg-config, perl
, buildllvmsparse ? true
, buildc2xml ? true
2021-06-29 21:43:02 +00:00
, llvm, libxml2
}:
stdenv.mkDerivation rec {
2021-06-29 21:43:02 +00:00
pname = "smatch";
version = "20120924";
src = fetchgit {
url = "git://repo.or.cz/${pname}.git";
rev = "23656e3e578b700cbf96d043f039e6341a3ba5b9";
sha256 = "0r43qi6vryqg450fj73yjwbb7gzcgx64rhrhb3r1m6a252srijiy";
};
nativeBuildInputs = [ pkg-config ];
2021-06-29 21:43:02 +00:00
buildInputs = [ sqlite perl ]
++ lib.optional buildllvmsparse llvm
++ lib.optional buildc2xml libxml2;
2021-06-29 21:43:02 +00:00
preBuild = ''
sed -i Makefile \
-e "s|^PREFIX=.*|PREFIX = $out|g"
'';
2021-06-29 21:43:02 +00:00
meta = with lib; {
description = "A semantic analysis tool for C";
homepage = "http://smatch.sourceforge.net/";
2021-06-29 21:43:02 +00:00
maintainers = with maintainers; [];
license = licenses.free; /* OSL, see http://www.opensource.org */
platforms = platforms.linux;
};
}