nixpkgs/pkgs/os-specific/linux/libsemanage/default.nix

40 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, pkgconfig, bison, flex, libsepol, libselinux, bzip2, audit
2018-03-14 12:43:48 +00:00
, enablePython ? true, swig ? null, python ? null
}:
with stdenv.lib;
2015-07-31 20:40:31 +01:00
stdenv.mkDerivation rec {
pname = "libsemanage";
2019-08-17 18:08:49 +01:00
version = "2.9";
inherit (libsepol) se_release se_url;
src = fetchurl {
url = "${se_url}/${se_release}/libsemanage-${version}.tar.gz";
2019-08-17 18:08:49 +01:00
sha256 = "075w6y3l9hiy5hicgwrmijyxmhfyd1r7cnc08qxyg4j46jfk8xi5";
};
outputs = [ "out" "dev" "man" ] ++ optional enablePython "py";
2018-03-14 12:43:48 +00:00
nativeBuildInputs = [ bison flex pkgconfig ];
buildInputs = [ libsepol libselinux bzip2 audit ]
2018-03-14 12:43:48 +00:00
++ optionals enablePython [ swig python ];
2015-07-31 21:02:41 +01:00
2019-08-17 18:08:49 +01: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"
];
2018-03-14 12:43:48 +00:00
installTargets = [ "install" ] ++ optionals enablePython [ "install-pywrap" ];
meta = removeAttrs libsepol.meta ["outputsToInstall"] // {
description = "Policy management tools for SELinux";
2015-07-31 20:40:31 +01:00
license = stdenv.lib.licenses.lgpl21;
};
}