2018-07-17 22:11:16 +02:00
|
|
|
{ stdenv, fetchurl, pkgconfig, bison, flex, libsepol, libselinux, bzip2, audit
|
2018-03-14 13:43:48 +01:00
|
|
|
, enablePython ? true, swig ? null, python ? null
|
|
|
|
}:
|
|
|
|
|
|
|
|
with stdenv.lib;
|
2011-03-27 06:46:12 +02:00
|
|
|
|
2015-07-31 21:40:31 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "libsemanage";
|
2019-08-17 19:08:49 +02:00
|
|
|
version = "2.9";
|
2013-02-24 13:25:53 +01:00
|
|
|
inherit (libsepol) se_release se_url;
|
2011-03-27 06:46:12 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2013-02-24 13:25:53 +01:00
|
|
|
url = "${se_url}/${se_release}/libsemanage-${version}.tar.gz";
|
2019-08-17 19:08:49 +02:00
|
|
|
sha256 = "075w6y3l9hiy5hicgwrmijyxmhfyd1r7cnc08qxyg4j46jfk8xi5";
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" "man" ] ++ optional enablePython "py";
|
2011-03-27 06:46:12 +02:00
|
|
|
|
2018-03-14 13:43:48 +01:00
|
|
|
nativeBuildInputs = [ bison flex pkgconfig ];
|
2018-07-17 22:11:16 +02:00
|
|
|
buildInputs = [ libsepol libselinux bzip2 audit ]
|
2018-03-14 13:43:48 +01:00
|
|
|
++ optionals enablePython [ swig python ];
|
2015-07-31 22:02:41 +02:00
|
|
|
|
2019-08-17 19:08:49 +02:00
|
|
|
makeFlags = [
|
|
|
|
"PREFIX=$(out)"
|
|
|
|
"INCLUDEDIR=$(dev)/include"
|
|
|
|
"MAN3DIR=$(man)/share/man/man3"
|
|
|
|
"MAN5DIR=$(man)/share/man/man5"
|
|
|
|
"PYTHON=python"
|
|
|
|
"PYTHONLIBDIR=$(py)/${python.sitePackages}"
|
|
|
|
"DEFAULT_SEMANAGE_CONF_LOCATION=$(out)/etc/selinux/semanage.conf"
|
|
|
|
];
|
2013-02-24 13:25:53 +01:00
|
|
|
|
2018-03-14 13:43:48 +01:00
|
|
|
installTargets = [ "install" ] ++ optionals enablePython [ "install-pywrap" ];
|
|
|
|
|
2018-07-29 23:22:56 +02:00
|
|
|
meta = removeAttrs libsepol.meta ["outputsToInstall"] // {
|
2011-03-27 06:46:12 +02:00
|
|
|
description = "Policy management tools for SELinux";
|
2015-07-31 21:40:31 +02:00
|
|
|
license = stdenv.lib.licenses.lgpl21;
|
2011-03-27 06:46:12 +02:00
|
|
|
};
|
2013-02-24 13:25:53 +01:00
|
|
|
}
|