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

36 lines
1.1 KiB
Nix
Raw Normal View History

{ 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;
2015-07-31 21:40:31 +02:00
stdenv.mkDerivation rec {
name = "libsemanage-${version}";
2018-03-14 13:43:48 +01:00
version = "2.7";
inherit (libsepol) se_release se_url;
src = fetchurl {
url = "${se_url}/${se_release}/libsemanage-${version}.tar.gz";
2018-03-14 13:43:48 +01:00
sha256 = "0xnlp1yg8b1aqc6kq3pss1i1nl06rfj4x4pyl5blasnf2ivlgs87";
};
2018-03-14 13:43:48 +01:00
nativeBuildInputs = [ bison flex pkgconfig ];
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
2015-07-31 21:40:31 +02:00
preBuild = ''
makeFlagsArray+=("PREFIX=$out")
makeFlagsArray+=("DESTDIR=$out")
2018-03-14 13:43:48 +01:00
makeFlagsArray+=("MAN3DIR=$out/share/man/man3")
makeFlagsArray+=("MAN5DIR=$out/share/man/man5")
2018-03-20 14:52:05 +01:00
makeFlagsArray+=("PYSITEDIR=$out/lib/${python.libPrefix}/site-packages")
2015-07-31 21:40:31 +02:00
'';
2018-03-14 13:43:48 +01:00
installTargets = [ "install" ] ++ optionals enablePython [ "install-pywrap" ];
meta = removeAttrs libsepol.meta ["outputsToInstall"] // {
description = "Policy management tools for SELinux";
2015-07-31 21:40:31 +02:00
license = stdenv.lib.licenses.lgpl21;
};
}