summary refs log tree commit diff
path: root/pkgs/os-specific/linux/apparmor
diff options
context:
space:
mode:
authorvolth <volth@volth.com>2018-12-15 03:50:31 +0000
committervolth <volth@volth.com>2018-12-15 03:50:31 +0000
commitbb9557eb7ca623ac9c12bae1fe4f95c9e290d27d (patch)
treec4f1c253bf8cf5fe17612039d2a27acbdacef253 /pkgs/os-specific/linux/apparmor
parent921d046537f6d7f0fc0db07b7aa46be7e9df030b (diff)
downloadnixpkgs-bb9557eb7ca623ac9c12bae1fe4f95c9e290d27d.tar
nixpkgs-bb9557eb7ca623ac9c12bae1fe4f95c9e290d27d.tar.gz
nixpkgs-bb9557eb7ca623ac9c12bae1fe4f95c9e290d27d.tar.bz2
nixpkgs-bb9557eb7ca623ac9c12bae1fe4f95c9e290d27d.tar.lz
nixpkgs-bb9557eb7ca623ac9c12bae1fe4f95c9e290d27d.tar.xz
nixpkgs-bb9557eb7ca623ac9c12bae1fe4f95c9e290d27d.tar.zst
nixpkgs-bb9557eb7ca623ac9c12bae1fe4f95c9e290d27d.zip
lib.makePerlPath -> perlPackages.makePerlPath
Diffstat (limited to 'pkgs/os-specific/linux/apparmor')
-rw-r--r--pkgs/os-specific/linux/apparmor/default.nix10
1 files changed, 7 insertions, 3 deletions
diff --git a/pkgs/os-specific/linux/apparmor/default.nix b/pkgs/os-specific/linux/apparmor/default.nix
index 851520a93be..6cb0c123406 100644
--- a/pkgs/os-specific/linux/apparmor/default.nix
+++ b/pkgs/os-specific/linux/apparmor/default.nix
@@ -8,6 +8,7 @@
 , swig
 , ncurses
 , pam
+, libnotify
 , buildPackages
 }:
 
@@ -79,6 +80,8 @@ let
     dontDisableStatic = true;
 
     prePatch = prePatchCommon + ''
+      substituteInPlace ./libraries/libapparmor/swig/perl/Makefile.am --replace install_vendor install_site
+      substituteInPlace ./libraries/libapparmor/swig/perl/Makefile.in --replace install_vendor install_site
       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"
     '';
@@ -127,9 +130,10 @@ let
         wrapProgram $out/bin/$prog --prefix PYTHONPATH : "$out/lib/${python.libPrefix}/site-packages:$PYTHONPATH"
       done
 
-      for prog in aa-notify ; do
-        wrapProgram $out/bin/$prog --prefix PERL5LIB : "${libapparmor}/lib/perl5:$PERL5LIB"
-      done
+      substituteInPlace $out/bin/aa-notify --replace /usr/bin/notify-send ${libnotify}/bin/notify-send
+      # aa-notify checks its name and does not work named ".aa-notify-wrapped"
+      mv $out/bin/aa-notify $out/bin/aa-notify-wrapped
+      makeWrapper ${perl}/bin/perl $out/bin/aa-notify --set PERL5LIB ${libapparmor}/${perl.libPrefix} --add-flags $out/bin/aa-notify-wrapped
     '';
 
     inherit doCheck;