apparmor: updating utilities to fresh python (#34049)
* apparmor: updating utilities to fresh python * apparmor: better way to depend on python * apparmor: override python derivation on the top-level
This commit is contained in:
parent
b86412d042
commit
0db68e5d42
@ -2,14 +2,15 @@
|
||||
, pkgconfig, which
|
||||
, flex, bison
|
||||
, linuxHeaders ? stdenv.cc.libc.linuxHeaders
|
||||
, pythonPackages
|
||||
, python
|
||||
, gawk
|
||||
, perl
|
||||
, swig
|
||||
, ncurses
|
||||
, pam
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
apparmor-series = "2.12";
|
||||
apparmor-patchver = "0";
|
||||
apparmor-version = apparmor-series + "." + apparmor-patchver;
|
||||
@ -46,12 +47,13 @@ let
|
||||
flex
|
||||
pkgconfig
|
||||
swig
|
||||
ncurses
|
||||
which
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
perl
|
||||
pythonPackages.python
|
||||
python
|
||||
];
|
||||
|
||||
# required to build apparmor-parser
|
||||
@ -61,7 +63,6 @@ let
|
||||
substituteInPlace ./libraries/libapparmor/src/Makefile.am --replace "/usr/include/netinet/in.h" "${stdenv.cc.libc.dev}/include/netinet/in.h"
|
||||
substituteInPlace ./libraries/libapparmor/src/Makefile.in --replace "/usr/include/netinet/in.h" "${stdenv.cc.libc.dev}/include/netinet/in.h"
|
||||
'';
|
||||
|
||||
postPatch = "cd ./libraries/libapparmor";
|
||||
configureFlags = "--with-python --with-perl";
|
||||
|
||||
@ -83,7 +84,7 @@ let
|
||||
|
||||
buildInputs = [
|
||||
perl
|
||||
pythonPackages.python
|
||||
python
|
||||
libapparmor
|
||||
libapparmor.python
|
||||
];
|
||||
@ -95,7 +96,7 @@ let
|
||||
|
||||
postInstall = ''
|
||||
for prog in aa-audit aa-autodep aa-cleanprof aa-complain aa-disable aa-enforce aa-genprof aa-logprof aa-mergeprof aa-status aa-unconfined ; do
|
||||
wrapProgram $out/bin/$prog --prefix PYTHONPATH : "$out/lib/${pythonPackages.python.libPrefix}/site-packages:$PYTHONPATH"
|
||||
wrapProgram $out/bin/$prog --prefix PYTHONPATH : "$out/lib/${python.libPrefix}/site-packages:$PYTHONPATH"
|
||||
done
|
||||
|
||||
for prog in aa-notify ; do
|
||||
@ -106,6 +107,29 @@ let
|
||||
meta = apparmor-meta "user-land utilities";
|
||||
};
|
||||
|
||||
apparmor-bin-utils = stdenv.mkDerivation {
|
||||
name = "apparmor-bin-utils-${apparmor-version}";
|
||||
src = apparmor-sources;
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkgconfig
|
||||
libapparmor
|
||||
gawk
|
||||
which
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libapparmor
|
||||
];
|
||||
|
||||
prePatch = prePatchCommon;
|
||||
postPatch = "cd ./binutils";
|
||||
makeFlags = ''LANGS= USE_SYSTEM=1'';
|
||||
installFlags = ''DESTDIR=$(out) BINDIR=$(out)/bin'';
|
||||
|
||||
meta = apparmor-meta "binary user-land utilities";
|
||||
};
|
||||
|
||||
apparmor-parser = stdenv.mkDerivation {
|
||||
name = "apparmor-parser-${apparmor-version}";
|
||||
src = apparmor-sources;
|
||||
@ -172,6 +196,12 @@ let
|
||||
in
|
||||
|
||||
{
|
||||
inherit libapparmor apparmor-utils apparmor-parser apparmor-pam
|
||||
apparmor-profiles apparmor-kernel-patches;
|
||||
inherit
|
||||
libapparmor
|
||||
apparmor-utils
|
||||
apparmor-bin-utils
|
||||
apparmor-parser
|
||||
apparmor-pam
|
||||
apparmor-profiles
|
||||
apparmor-kernel-patches;
|
||||
}
|
||||
|
@ -12499,8 +12499,9 @@ with pkgs;
|
||||
|
||||
microcodeIntel = callPackage ../os-specific/linux/microcode/intel.nix { };
|
||||
|
||||
inherit (callPackages ../os-specific/linux/apparmor { pythonPackages = python27Packages; swig = swig2; })
|
||||
libapparmor apparmor-pam apparmor-parser apparmor-profiles apparmor-utils;
|
||||
inherit (callPackages ../os-specific/linux/apparmor { python = python3; })
|
||||
libapparmor apparmor-utils apparmor-bin-utils apparmor-parser apparmor-pam
|
||||
apparmor-profiles apparmor-kernel-patches;
|
||||
|
||||
atop = callPackage ../os-specific/linux/atop { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user