From 232c39e7abdb86c3533c258dc0bcacd380c34369 Mon Sep 17 00:00:00 2001 From: xeji Date: Wed, 14 Mar 2018 13:43:48 +0100 Subject: libsemanage: 2.4 -> 2.7 --- pkgs/os-specific/linux/libsemanage/default.nix | 28 ++++++++++++++------------ 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'pkgs/os-specific/linux/libsemanage') diff --git a/pkgs/os-specific/linux/libsemanage/default.nix b/pkgs/os-specific/linux/libsemanage/default.nix index 587349e4067e..303853c9ee2f 100644 --- a/pkgs/os-specific/linux/libsemanage/default.nix +++ b/pkgs/os-specific/linux/libsemanage/default.nix @@ -1,31 +1,33 @@ -{ stdenv, fetchurl, bison, flex, libsepol, libselinux, ustr, bzip2, libaudit }: +{ stdenv, fetchurl, pkgconfig, bison, flex, libsepol, libselinux, bzip2, libaudit +, enablePython ? true, swig ? null, python ? null +}: + +with stdenv.lib; stdenv.mkDerivation rec { name = "libsemanage-${version}"; - version = "2.4"; + version = "2.7"; inherit (libsepol) se_release se_url; src = fetchurl { url = "${se_url}/${se_release}/libsemanage-${version}.tar.gz"; - sha256 = "1134ka4mi4387ac5yv68bpp2y7ln5xxhwp07xhqnay0nxzjaqk0s"; + sha256 = "0xnlp1yg8b1aqc6kq3pss1i1nl06rfj4x4pyl5blasnf2ivlgs87"; }; - nativeBuildInputs = [ bison flex ]; - buildInputs = [ libsepol libselinux ustr bzip2 libaudit ]; - - NIX_CFLAGS_COMPILE = [ - "-fstack-protector-all" - "-std=gnu89" - # these were added to fix build with gcc7. review on update - "-Wno-error=format-truncation" - "-Wno-error=implicit-fallthrough" - ]; + nativeBuildInputs = [ bison flex pkgconfig ]; + buildInputs = [ libsepol libselinux bzip2 libaudit ] + ++ optionals enablePython [ swig python ]; preBuild = '' makeFlagsArray+=("PREFIX=$out") makeFlagsArray+=("DESTDIR=$out") + makeFlagsArray+=("MAN3DIR=$out/share/man/man3") + makeFlagsArray+=("MAN5DIR=$out/share/man/man5") + makeFlagsArray+=("PYSITEDIR=$out/lib/python2.7/site-packages") ''; + installTargets = [ "install" ] ++ optionals enablePython [ "install-pywrap" ]; + meta = libsepol.meta // { description = "Policy management tools for SELinux"; license = stdenv.lib.licenses.lgpl21; -- cgit 1.4.1