Merge pull request #17817 from mbrock/libselinux-fix

libselinux: fix Python binding

Built and tested locally.

authored by Lancelot SIX and committed by GitHub 7fd44eaf 5b3331ed

+10 -1
+10 -1
pkgs/os-specific/linux/libselinux/default.nix
··· 1 - { stdenv, fetchurl, pkgconfig, libsepol, pcre 1 + { stdenv, fetchurl, fetchpatch, pkgconfig, libsepol, pcre 2 2 , enablePython ? true, swig ? null, python ? null 3 3 }: 4 4 ··· 20 20 ++ optionals enablePython [ swig python ]; 21 21 22 22 NIX_CFLAGS_COMPILE = "-fstack-protector-all -std=gnu89"; 23 + 24 + # Unreleased upstream patch that fixes Python package issue arising 25 + # from recent SWIG changes. 26 + patches = optional enablePython (fetchpatch { 27 + name = "fix-python-swig.patch"; 28 + url = "https://github.com/SELinuxProject/selinux/commit/a9604c30a5e2f71007d31aa6ba41cf7b95d94822.patch"; 29 + sha256 = "0mjrclh0sd8m7vq0wvl6pg29ss415j3kn0266v8ixy4fprafagfp"; 30 + stripLen = 1; 31 + }); 23 32 24 33 postPatch = optionalString enablePython '' 25 34 sed -i -e 's|\$(LIBDIR)/libsepol.a|${libsepol}/lib/libsepol.a|' src/Makefile