3
0
Fork 0
forked from mirrors/nixpkgs

libselinux: 2.3 -> 2.4

This commit is contained in:
William A. Kennington III 2015-07-31 12:40:17 -07:00
parent ffa1782688
commit b18a354c88

View file

@ -8,12 +8,12 @@ with stdenv.lib;
stdenv.mkDerivation rec {
name = "libselinux-${version}";
version = "2.3";
version = "2.4";
inherit (libsepol) se_release se_url;
src = fetchurl {
url = "${se_url}/${se_release}/libselinux-${version}.tar.gz";
sha256 = "1ckpiv6m5c07rp5vawlhv02w5rq8kc0n95fh2ckq2jnqxi1hn7hb";
sha256 = "0yqg73ns97jwjh1iyv0jr5qxb8k5sqq5ywfkx11lzfn5yj8k0126";
};
buildInputs = [ pkgconfig libsepol pcre ]
@ -23,16 +23,19 @@ stdenv.mkDerivation rec {
sed -i -e 's|\$(LIBDIR)/libsepol.a|${libsepol}/lib/libsepol.a|' src/Makefile
'';
installFlags = [ "PREFIX=$(out)" "DESTDIR=$(out)" ];
installTargets = [ "install" ] ++ optional enablePython "install-pywrap";
NIX_CFLAGS_COMPILE = "-std=gnu89";
# TODO: Figure out why the build incorrectly links libselinux.so
postInstall = ''
rm $out/lib/libselinux.so
ln -s libselinux.so.1 $out/lib/libselinux.so
preBuild = ''
# Build fails without this precreated
mkdir -p $out/include
makeFlagsArray+=("PREFIX=$out")
makeFlagsArray+=("DESTDIR=$out")
'';
meta = {
inherit (libsepol.meta) homepage platforms maintainers;
installTargets = [ "install" ] ++ optional enablePython "install-pywrap";
meta = libsepol.meta // {
description = "SELinux core library";
};
}