diff options
Diffstat (limited to 'pkgs/os-specific/linux/libsemanage')
-rw-r--r-- | pkgs/os-specific/linux/libsemanage/default.nix | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/pkgs/os-specific/linux/libsemanage/default.nix b/pkgs/os-specific/linux/libsemanage/default.nix index 70b2508451b..11a6f2755d4 100644 --- a/pkgs/os-specific/linux/libsemanage/default.nix +++ b/pkgs/os-specific/linux/libsemanage/default.nix @@ -1,8 +1,8 @@ -{ stdenv, fetchurl, pkgconfig, bison, flex, libsepol, libselinux, bzip2, audit +{ lib, stdenv, fetchurl, pkg-config, bison, flex, libsepol, libselinux, bzip2, audit , enablePython ? true, swig ? null, python ? null }: -with stdenv.lib; +with lib; stdenv.mkDerivation rec { pname = "libsemanage"; @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" "man" ] ++ optional enablePython "py"; - nativeBuildInputs = [ bison flex pkgconfig ]; + nativeBuildInputs = [ bison flex pkg-config ]; buildInputs = [ libsepol libselinux bzip2 audit ] ++ optionals enablePython [ swig python ]; @@ -30,10 +30,20 @@ stdenv.mkDerivation rec { "DEFAULT_SEMANAGE_CONF_LOCATION=$(out)/etc/selinux/semanage.conf" ]; + # The following turns the 'clobbered' error into a warning + # which should fix the following error: + # + # semanage_store.c: In function 'semanage_exec_prog': + # semanage_store.c:1278:6: error: variable 'i' might be clobbered by 'longjmp' or 'vfork' [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wclobbered-Werror=clobbered8;;] + # 1278 | int i; + # | ^ + # cc1: all warnings being treated as errors + NIX_CFLAGS_COMPILE = [ "-Wno-error=clobbered" ]; + installTargets = [ "install" ] ++ optionals enablePython [ "install-pywrap" ]; meta = removeAttrs libsepol.meta ["outputsToInstall"] // { description = "Policy management tools for SELinux"; - license = stdenv.lib.licenses.lgpl21; + license = lib.licenses.lgpl21; }; } |