2011-03-27 05:45:46 +01:00
|
|
|
{ stdenv, fetchurl, libsepol, libselinux, bison, flex }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
|
|
|
name = "checkpolicy-${version}";
|
2013-11-28 08:58:06 +00:00
|
|
|
version = "2.2";
|
2013-02-24 12:25:53 +00:00
|
|
|
inherit (libsepol) se_release se_url;
|
2011-03-27 05:45:46 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2013-02-24 12:25:53 +00:00
|
|
|
url = "${se_url}/${se_release}/checkpolicy-${version}.tar.gz";
|
2013-11-28 08:58:06 +00:00
|
|
|
sha256 = "1y5dx4s5k404fgpm7hlhgw8a9b9ksn3q2d3fj6f9rdac9n7nkxlz";
|
2011-03-27 05:45:46 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ libsepol libselinux bison flex ];
|
|
|
|
|
2014-08-12 01:07:29 +01:00
|
|
|
preBuild = ''
|
|
|
|
makeFlags="$makeFlags LEX=flex LIBDIR=${libsepol}/lib PREFIX=$out"
|
|
|
|
sed -e 's@[.]o$@& ../lex.yy.o@' -i test/Makefile
|
|
|
|
'';
|
2011-03-27 05:45:46 +01: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 05:45:46 +01:00
|
|
|
};
|
2013-02-24 12:25:53 +00:00
|
|
|
}
|