2011-03-27 04:45:46 +00:00
|
|
|
{ stdenv, fetchurl, libsepol, libselinux, bison, flex }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
|
|
|
name = "checkpolicy-${version}";
|
2014-08-14 15:55:12 +00:00
|
|
|
version = "2.3";
|
2013-02-24 12:25:53 +00:00
|
|
|
inherit (libsepol) se_release se_url;
|
2011-03-27 04:45:46 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2013-02-24 12:25:53 +00:00
|
|
|
url = "${se_url}/${se_release}/checkpolicy-${version}.tar.gz";
|
2014-08-14 15:55:12 +00:00
|
|
|
sha256 = "0yr0r2cxz9lbj7i0wqgcd4wjvc6zf1fmqk0xjybnkdpcmw8jsqwh";
|
2011-03-27 04:45:46 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ libsepol libselinux bison flex ];
|
|
|
|
|
2014-08-12 00:07:29 +00:00
|
|
|
preBuild = ''
|
|
|
|
makeFlags="$makeFlags LEX=flex LIBDIR=${libsepol}/lib PREFIX=$out"
|
|
|
|
sed -e 's@[.]o$@& ../lex.yy.o@' -i test/Makefile
|
|
|
|
'';
|
2011-03-27 04:45:46 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "SELinux policy compiler";
|
|
|
|
license = licenses.gpl2;
|
2013-02-24 12:25:53 +00:00
|
|
|
inherit (libsepol.meta) homepage platforms maintainers;
|
2011-03-27 04:45:46 +00:00
|
|
|
};
|
2013-02-24 12:25:53 +00:00
|
|
|
}
|