Merge pull request #17817 from mbrock/libselinux-fix
libselinux: fix Python binding Built and tested locally.
This commit is contained in:
commit
7fd44eafa6
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchurl, pkgconfig, libsepol, pcre
|
{ stdenv, fetchurl, fetchpatch, pkgconfig, libsepol, pcre
|
||||||
, enablePython ? true, swig ? null, python ? null
|
, enablePython ? true, swig ? null, python ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -21,6 +21,15 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
NIX_CFLAGS_COMPILE = "-fstack-protector-all -std=gnu89";
|
NIX_CFLAGS_COMPILE = "-fstack-protector-all -std=gnu89";
|
||||||
|
|
||||||
|
# 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;
|
||||||
|
});
|
||||||
|
|
||||||
postPatch = optionalString enablePython ''
|
postPatch = optionalString enablePython ''
|
||||||
sed -i -e 's|\$(LIBDIR)/libsepol.a|${libsepol}/lib/libsepol.a|' src/Makefile
|
sed -i -e 's|\$(LIBDIR)/libsepol.a|${libsepol}/lib/libsepol.a|' src/Makefile
|
||||||
'';
|
'';
|
||||||
|
Loading…
Reference in New Issue
Block a user