diff options
author | Shea Levy <shea@shealevy.com> | 2018-03-28 09:36:47 -0400 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2018-03-28 09:36:47 -0400 |
commit | 05e375d7103ac51e2da917965c37246c99f1ae4f (patch) | |
tree | 7ec4e9a2f5b7b1e2dea7c3e059f5b40e1dac1569 /pkgs/os-specific/linux/libselinux/default.nix | |
parent | 335934a073d6024d54c71bf82d5f8baab13abe75 (diff) | |
parent | c7d7abc51e5f9b9c7481a83c47b37508bf08b05b (diff) | |
download | nixpkgs-05e375d7103ac51e2da917965c37246c99f1ae4f.tar nixpkgs-05e375d7103ac51e2da917965c37246c99f1ae4f.tar.gz nixpkgs-05e375d7103ac51e2da917965c37246c99f1ae4f.tar.bz2 nixpkgs-05e375d7103ac51e2da917965c37246c99f1ae4f.tar.lz nixpkgs-05e375d7103ac51e2da917965c37246c99f1ae4f.tar.xz nixpkgs-05e375d7103ac51e2da917965c37246c99f1ae4f.tar.zst nixpkgs-05e375d7103ac51e2da917965c37246c99f1ae4f.zip |
Merge remote-tracking branch 'origin/master' into staging
Diffstat (limited to 'pkgs/os-specific/linux/libselinux/default.nix')
-rw-r--r-- | pkgs/os-specific/linux/libselinux/default.nix | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/pkgs/os-specific/linux/libselinux/default.nix b/pkgs/os-specific/linux/libselinux/default.nix index c276f56dd8b..59d5db52ac6 100644 --- a/pkgs/os-specific/linux/libselinux/default.nix +++ b/pkgs/os-specific/linux/libselinux/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, fetchpatch, pkgconfig, libsepol, pcre +{ stdenv, fetchurl, pcre, pkgconfig, libsepol , enablePython ? true, swig ? null, python ? null , musl-fts }: @@ -9,12 +9,12 @@ with stdenv.lib; stdenv.mkDerivation rec { name = "libselinux-${version}"; - version = "2.4"; + version = "2.7"; inherit (libsepol) se_release se_url; src = fetchurl { url = "${se_url}/${se_release}/libselinux-${version}.tar.gz"; - sha256 = "0yqg73ns97jwjh1iyv0jr5qxb8k5sqq5ywfkx11lzfn5yj8k0126"; + sha256 = "0mwcq78v6ngbq06xmb9dvilpg0jnl2vs9fgrpakhmmiskdvc1znh"; }; nativeBuildInputs = [ pkgconfig ]; @@ -22,36 +22,24 @@ stdenv.mkDerivation rec { ++ optionals enablePython [ swig python ] ++ optional stdenv.hostPlatform.isMusl musl-fts; - # Avoid this false warning: - # avc_internal.c: In function 'avc_netlink_receive': - # avc_internal.c:105:25: error: cast increases required alignment of target type [-Werror=cast-align] - # struct nlmsghdr *nlh = (struct nlmsghdr *)buf; - # ^ + # drop fortify here since package uses it by default, leading to compile error: + # command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror] + hardeningDisable = [ "fortify" ]; - NIX_CFLAGS_COMPILE = "-std=gnu89 -Wno-error=cast-align"; - - # Unreleased upstream patch that fixes Python package issue arising - # from recent SWIG changes. - patches = optional enablePython (fetchpatch { - name = "fix-python-swig.patch"; - url = "https://github.com/SELinuxProject/selinux/commit/a9604c30a5e2f71007d31aa6ba41cf7b95d94822.patch"; - sha256 = "0mjrclh0sd8m7vq0wvl6pg29ss415j3kn0266v8ixy4fprafagfp"; - stripLen = 1; - }); + NIX_CFLAGS_COMPILE = [ "-Wno-error" ]; postPatch = optionalString enablePython '' sed -i -e 's|\$(LIBDIR)/libsepol.a|${libsepol}/lib/libsepol.a|' src/Makefile - '' - + '' - sed '1i#include <sys/uio.h>' -i src/setrans_client.c ''; + # fix install locations preBuild = '' - # Build fails without this precreated - mkdir -p $out/include - makeFlagsArray+=("PREFIX=$out") makeFlagsArray+=("DESTDIR=$out") + makeFlagsArray+=("MAN3DIR=$out/share/man/man3") + makeFlagsArray+=("MAN5DIR=$out/share/man/man5") + makeFlagsArray+=("MAN8DIR=$out/share/man/man8") + makeFlagsArray+=("PYSITEDIR=$out/lib/${python.libPrefix}/site-packages") ''; installTargets = [ "install" ] ++ optional enablePython "install-pywrap"; |