summary refs log tree commit diff
path: root/pkgs/os-specific/linux/apparmor
diff options
context:
space:
mode:
authorArtturin <Artturin@artturin.com>2021-10-23 01:35:22 +0300
committerArtturin <Artturin@artturin.com>2021-11-05 19:57:03 +0200
commitbef48d172a6b03a72aef4141b976e057ebd4079f (patch)
tree42217970fc9b0bc8213aad3dd5fbe44ad11df531 /pkgs/os-specific/linux/apparmor
parentd8df341832ebe4756706c71391510ea4085cb884 (diff)
downloadnixpkgs-bef48d172a6b03a72aef4141b976e057ebd4079f.tar
nixpkgs-bef48d172a6b03a72aef4141b976e057ebd4079f.tar.gz
nixpkgs-bef48d172a6b03a72aef4141b976e057ebd4079f.tar.bz2
nixpkgs-bef48d172a6b03a72aef4141b976e057ebd4079f.tar.lz
nixpkgs-bef48d172a6b03a72aef4141b976e057ebd4079f.tar.xz
nixpkgs-bef48d172a6b03a72aef4141b976e057ebd4079f.tar.zst
nixpkgs-bef48d172a6b03a72aef4141b976e057ebd4079f.zip
apparmor: disable strictDeps explicitly for libapparmor
do not override python to python3 in all-packages
Diffstat (limited to 'pkgs/os-specific/linux/apparmor')
-rw-r--r--pkgs/os-specific/linux/apparmor/default.nix15
1 files changed, 10 insertions, 5 deletions
diff --git a/pkgs/os-specific/linux/apparmor/default.nix b/pkgs/os-specific/linux/apparmor/default.nix
index 344913888d5..1e4dcc93f29 100644
--- a/pkgs/os-specific/linux/apparmor/default.nix
+++ b/pkgs/os-specific/linux/apparmor/default.nix
@@ -4,7 +4,7 @@
 , linuxHeaders ? stdenv.cc.libc.linuxHeaders
 , gawk
 , withPerl ? stdenv.hostPlatform == stdenv.buildPlatform && lib.meta.availableOn stdenv.hostPlatform perl, perl
-, withPython ? stdenv.hostPlatform == stdenv.buildPlatform && lib.meta.availableOn stdenv.hostPlatform python, python
+, withPython ? stdenv.hostPlatform == stdenv.buildPlatform && lib.meta.availableOn stdenv.hostPlatform python3, python3
 , swig
 , ncurses
 , pam
@@ -68,6 +68,11 @@ let
     name = "libapparmor-${apparmor-version}";
     src = apparmor-sources;
 
+   # checking whether python bindings are enabled... yes
+   # checking for python3... no
+   # configure: error: python is required when enabling python bindings
+    strictDeps = false;
+
     nativeBuildInputs = [
       autoreconfHook
       bison
@@ -77,11 +82,11 @@ let
       ncurses
       which
       perl
-    ];
+    ] ++ lib.optional withPython python3;
 
     buildInputs = []
       ++ lib.optional withPerl perl
-      ++ lib.optional withPython python;
+      ++ lib.optional withPython python3;
 
     # required to build apparmor-parser
     dontDisableStatic = true;
@@ -121,7 +126,7 @@ let
 
     buildInputs = [
       perl
-      python
+      python3
       libapparmor
       libapparmor.python
     ];
@@ -143,7 +148,7 @@ let
     postInstall = ''
       sed -i $out/bin/aa-unconfined -e "/my_env\['PATH'\]/d"
       for prog in aa-audit aa-autodep aa-cleanprof aa-complain aa-disable aa-enforce aa-genprof aa-logprof aa-mergeprof aa-unconfined ; do
-        wrapProgram $out/bin/$prog --prefix PYTHONPATH : "$out/lib/${python.libPrefix}/site-packages:$PYTHONPATH"
+        wrapProgram $out/bin/$prog --prefix PYTHONPATH : "$out/lib/${python3.libPrefix}/site-packages:$PYTHONPATH"
       done
 
       substituteInPlace $out/bin/aa-notify \