2021-01-23 12:26:19 +00:00
|
|
|
{ lib, stdenv, fetchgit, sqlite, pkg-config, perl
|
2012-10-05 01:24:09 +00:00
|
|
|
, buildllvmsparse ? true
|
|
|
|
, buildc2xml ? true
|
2021-06-29 21:43:02 +00:00
|
|
|
, llvm, libxml2
|
2012-10-05 01:24:09 +00:00
|
|
|
}:
|
|
|
|
|
2021-06-20 10:34:30 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2021-06-29 21:43:02 +00:00
|
|
|
pname = "smatch";
|
|
|
|
version = "20120924";
|
2012-10-05 01:24:09 +00:00
|
|
|
|
|
|
|
src = fetchgit {
|
2021-06-20 10:34:30 +00:00
|
|
|
url = "git://repo.or.cz/${pname}.git";
|
2012-10-05 01:24:09 +00:00
|
|
|
rev = "23656e3e578b700cbf96d043f039e6341a3ba5b9";
|
2016-06-02 11:26:44 +00:00
|
|
|
sha256 = "0r43qi6vryqg450fj73yjwbb7gzcgx64rhrhb3r1m6a252srijiy";
|
2012-10-05 01:24:09 +00:00
|
|
|
};
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2021-06-29 21:43:02 +00:00
|
|
|
buildInputs = [ sqlite perl ]
|
2021-01-23 12:26:19 +00:00
|
|
|
++ lib.optional buildllvmsparse llvm
|
|
|
|
++ lib.optional buildc2xml libxml2;
|
2012-10-05 01:24:09 +00:00
|
|
|
|
2021-06-29 21:43:02 +00:00
|
|
|
preBuild = ''
|
|
|
|
sed -i Makefile \
|
|
|
|
-e "s|^PREFIX=.*|PREFIX = $out|g"
|
|
|
|
'';
|
2012-10-05 01:24:09 +00:00
|
|
|
|
2021-06-29 21:43:02 +00:00
|
|
|
meta = with lib; {
|
2012-10-05 01:24:09 +00:00
|
|
|
description = "A semantic analysis tool for C";
|
2020-04-01 01:11:51 +00:00
|
|
|
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;
|
2012-10-05 01:24:09 +00:00
|
|
|
};
|
|
|
|
}
|