2015-07-31 20:40:46 +01:00
|
|
|
{ stdenv, fetchurl, bison, flex, libsepol }:
|
2011-03-27 05:45:46 +01:00
|
|
|
|
2015-07-31 20:40:46 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2011-03-27 05:45:46 +01:00
|
|
|
name = "checkpolicy-${version}";
|
2015-07-31 20:40:46 +01:00
|
|
|
version = "2.4";
|
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";
|
2015-07-31 20:40:46 +01:00
|
|
|
sha256 = "1m5wjm43lzp6bld8higsvdm2dkddydihhwv9qw2w9r4dm0largcv";
|
2011-03-27 05:45:46 +01:00
|
|
|
};
|
|
|
|
|
2015-07-31 20:40:46 +01:00
|
|
|
nativeBuildInputs = [ bison flex ];
|
|
|
|
buildInputs = [ libsepol ];
|
|
|
|
|
|
|
|
# Don't build tests
|
|
|
|
postPatch = ''
|
|
|
|
sed -i '/-C test/d' Makefile
|
|
|
|
'';
|
2011-03-27 05:45:46 +01:00
|
|
|
|
2014-08-12 01:07:29 +01:00
|
|
|
preBuild = ''
|
2015-07-31 20:40:46 +01:00
|
|
|
makeFlagsArray+=("LEX=flex")
|
|
|
|
makeFlagsArray+=("LIBDIR=${libsepol}/lib")
|
|
|
|
makeFlagsArray+=("PREFIX=$out")
|
2014-08-12 01:07:29 +01:00
|
|
|
'';
|
2011-03-27 05:45:46 +01:00
|
|
|
|
2015-07-31 20:40:46 +01:00
|
|
|
meta = libsepol.meta // {
|
2011-03-27 05:45:46 +01:00
|
|
|
description = "SELinux policy compiler";
|
|
|
|
};
|
2013-02-24 12:25:53 +00:00
|
|
|
}
|