diff --git a/pkgs/os-specific/linux/checkpolicy/default.nix b/pkgs/os-specific/linux/checkpolicy/default.nix index 6ea73c9ac6c3..ac4bc83c51de 100644 --- a/pkgs/os-specific/linux/checkpolicy/default.nix +++ b/pkgs/os-specific/linux/checkpolicy/default.nix @@ -13,10 +13,10 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ bison flex ]; buildInputs = [ libsepol ]; - preBuild = '' - makeFlagsArray+=("LIBDIR=${libsepol}/lib") - makeFlagsArray+=("PREFIX=$out") - ''; + makeFlags = [ + "PREFIX=$(out)" + "LIBSEPOLA=${stdenv.lib.getLib libsepol}/lib/libsepol.a" + ]; meta = libsepol.meta // { description = "SELinux policy compiler"; diff --git a/pkgs/os-specific/linux/libsepol/default.nix b/pkgs/os-specific/linux/libsepol/default.nix index 40872f7c1ac8..f16c241a0a1f 100644 --- a/pkgs/os-specific/linux/libsepol/default.nix +++ b/pkgs/os-specific/linux/libsepol/default.nix @@ -6,6 +6,8 @@ stdenv.mkDerivation rec { se_release = "20170804"; se_url = "https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases"; + outputs = [ "bin" "out" "dev" "man" ]; + src = fetchurl { url = "${se_url}/${se_release}/libsepol-${version}.tar.gz"; sha256 = "1rzr90d3f1g5wy1b8sh6fgnqb9migys2zgpjmpakn6lhxkc3p7fn"; @@ -13,18 +15,22 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ flex ]; - preBuild = '' - makeFlagsArray+=("PREFIX=$out") - makeFlagsArray+=("DESTDIR=$out") - makeFlagsArray+=("MAN8DIR=$out/share/man/man8") - makeFlagsArray+=("MAN3DIR=$out/share/man/man3") - ''; + makeFlags = [ + "PREFIX=$(out)" + "BINDIR=$(bin)/bin" + "INCDIR=$(dev)/include/sepol" + "INCLUDEDIR=$(dev)/include" + "MAN3DIR=$(man)/share/man/man3" + "MAN8DIR=$(man)/share/man/man8" + "SHLIBDIR=$(out)/lib" + ]; NIX_CFLAGS_COMPILE = [ "-Wno-error" ]; passthru = { inherit se_release se_url; }; meta = with stdenv.lib; { + description = "SELinux binary policy manipulation library"; homepage = http://userspace.selinuxproject.org; platforms = platforms.linux; maintainers = [ maintainers.phreedom ]; diff --git a/pkgs/os-specific/linux/selinux-python/default.nix b/pkgs/os-specific/linux/selinux-python/default.nix index 8ac207d64214..527c94de46b3 100644 --- a/pkgs/os-specific/linux/selinux-python/default.nix +++ b/pkgs/os-specific/linux/selinux-python/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { makeFlagsArray+=("PREFIX=$out") makeFlagsArray+=("DESTDIR=$out") makeFlagsArray+=("LOCALEDIR=$out/share/locale") - makeFlagsArray+=("LIBSEPOLA=${libsepol}/lib/libsepol.a") + makeFlagsArray+=("LIBSEPOLA=${stdenv.lib.getLib libsepol}/lib/libsepol.a") makeFlagsArray+=("BASHCOMPLETIONDIR=$out/share/bash-completion/completions") makeFlagsArray+=("PYTHON=${python3}/bin/python") makeFlagsArray+=("PYTHONLIBDIR=lib/${python3.libPrefix}/site-packages") diff --git a/pkgs/os-specific/linux/setools/default.nix b/pkgs/os-specific/linux/setools/default.nix index 9cb5785ca98f..89375563ae67 100644 --- a/pkgs/os-specific/linux/setools/default.nix +++ b/pkgs/os-specific/linux/setools/default.nix @@ -30,7 +30,7 @@ buildPythonApplication rec { setupPyBuildFlags = [ "-i" ]; preBuild = '' - export SEPOL="${libsepol}/lib/libsepol.a" + export SEPOL="${stdenv.lib.getLib libsepol}/lib/libsepol.a" ''; meta = {