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