checkpolicy: 2.4 -> 2.7

This commit is contained in:
xeji 2018-03-14 20:17:04 +01:00
parent 70044c899e
commit ac90dffdc7

View File

@ -2,27 +2,18 @@
stdenv.mkDerivation rec {
name = "checkpolicy-${version}";
version = "2.4";
version = "2.7";
inherit (libsepol) se_release se_url;
src = fetchurl {
url = "${se_url}/${se_release}/checkpolicy-${version}.tar.gz";
sha256 = "1m5wjm43lzp6bld8higsvdm2dkddydihhwv9qw2w9r4dm0largcv";
sha256 = "009j9jc0hi4l7k8f21hn8fm25n0mqgzdpd4nk30nds6d3nglf4sl";
};
# Don't build tests
postPatch = ''
sed '/-C test/d' -i Makefile
sed '1i#include <ctype.h>' -i checkpolicy.c
'';
nativeBuildInputs = [ bison flex ];
buildInputs = [ libsepol ];
NIX_CFLAGS_COMPILE = "-fstack-protector-all";
preBuild = ''
makeFlagsArray+=("LEX=flex")
makeFlagsArray+=("LIBDIR=${libsepol}/lib")
makeFlagsArray+=("PREFIX=$out")
'';