2013-02-24 13:25:53 +01:00
|
|
|
{ stdenv, fetchurl, intltool, pcre, libcap_ng, libcgroup
|
|
|
|
, libsepol, libselinux, libsemanage
|
|
|
|
, python, sepolgen }:
|
2011-03-27 06:46:19 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
|
|
|
name = "policycoreutils-${version}";
|
2013-02-24 13:25:53 +01:00
|
|
|
version = "2.1.13";
|
|
|
|
inherit (libsepol) se_release se_url;
|
2011-03-27 06:46:19 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2013-02-24 13:25:53 +01:00
|
|
|
url = "${se_url}/${se_release}/policycoreutils-${version}.tar.gz";
|
|
|
|
sha256 = "1145nbpwndmhma08vvj1j75bjd8xhjal0vjpazlrw78iyc30y11l";
|
2011-03-27 06:46:19 +02:00
|
|
|
};
|
|
|
|
|
2013-02-24 13:25:53 +01:00
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace po/Makefile --replace /usr/bin/install install
|
|
|
|
'';
|
2011-03-27 06:46:19 +02:00
|
|
|
|
2013-02-24 13:25:53 +01:00
|
|
|
buildInputs = [ intltool pcre libcap_ng libcgroup
|
|
|
|
libsepol libselinux libsemanage
|
|
|
|
python sepolgen # ToDo? these are optional
|
|
|
|
];
|
2011-03-28 09:38:16 +02:00
|
|
|
|
2013-02-24 13:25:53 +01:00
|
|
|
preBuild = ''
|
|
|
|
mkdir -p "$out/lib" && cp -s "${libsepol}/lib/libsepol.a" "$out/lib"
|
|
|
|
'';
|
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE = "-fstack-protector-all";
|
|
|
|
NIX_LDFLAGS = "-lsepol -lpcre";
|
|
|
|
|
|
|
|
makeFlags = "PREFIX=$(out) DESTDIR=$(out) LOCALEDIR=$(out)/share/locale";
|
2011-03-27 06:46:19 +02:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "SELinux policy core utilities";
|
|
|
|
license = licenses.gpl2;
|
2013-02-24 13:25:53 +01:00
|
|
|
inherit (libsepol.meta) homepage platforms maintainers;
|
2011-03-27 06:46:19 +02:00
|
|
|
};
|
2013-02-24 13:25:53 +01:00
|
|
|
}
|
|
|
|
|