diff options
author | Shea Levy <shea@shealevy.com> | 2018-02-25 09:38:55 -0500 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2018-02-25 09:38:55 -0500 |
commit | e21300a6ae8997895f2b902e52eef5f11c98ec8a (patch) | |
tree | 90955753b1f17397d6076aee1fa9f5a3130333d4 /pkgs/os-specific/linux/apparmor | |
parent | 42c87765713500722b12ca8eab72826d6b279802 (diff) | |
download | nixpkgs-e21300a6ae8997895f2b902e52eef5f11c98ec8a.tar nixpkgs-e21300a6ae8997895f2b902e52eef5f11c98ec8a.tar.gz nixpkgs-e21300a6ae8997895f2b902e52eef5f11c98ec8a.tar.bz2 nixpkgs-e21300a6ae8997895f2b902e52eef5f11c98ec8a.tar.lz nixpkgs-e21300a6ae8997895f2b902e52eef5f11c98ec8a.tar.xz nixpkgs-e21300a6ae8997895f2b902e52eef5f11c98ec8a.tar.zst nixpkgs-e21300a6ae8997895f2b902e52eef5f11c98ec8a.zip |
libapparmor: Fix cross-compilation.
Diffstat (limited to 'pkgs/os-specific/linux/apparmor')
-rw-r--r-- | pkgs/os-specific/linux/apparmor/default.nix | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/pkgs/os-specific/linux/apparmor/default.nix b/pkgs/os-specific/linux/apparmor/default.nix index 0bb5561e957..c8e58dfbf6f 100644 --- a/pkgs/os-specific/linux/apparmor/default.nix +++ b/pkgs/os-specific/linux/apparmor/default.nix @@ -8,6 +8,7 @@ , swig , ncurses , pam +, buildPackages }: let @@ -29,8 +30,8 @@ let }; prePatchCommon = '' - substituteInPlace ./common/Make.rules --replace "/usr/bin/pod2man" "${perl}/bin/pod2man" - substituteInPlace ./common/Make.rules --replace "/usr/bin/pod2html" "${perl}/bin/pod2html" + substituteInPlace ./common/Make.rules --replace "/usr/bin/pod2man" "${buildPackages.perl}/bin/pod2man" + substituteInPlace ./common/Make.rules --replace "/usr/bin/pod2html" "${buildPackages.perl}/bin/pod2html" substituteInPlace ./common/Make.rules --replace "/usr/include/linux/capability.h" "${linuxHeaders}/include/linux/capability.h" substituteInPlace ./common/Make.rules --replace "/usr/share/man" "share/man" ''; @@ -70,9 +71,10 @@ let swig ncurses which + perl ]; - buildInputs = [ + buildInputs = stdenv.lib.optionals (!stdenv.isCross) [ perl python ]; @@ -87,11 +89,12 @@ let inherit patches; postPatch = "cd ./libraries/libapparmor"; - configureFlags = "--with-python --with-perl"; + # https://gitlab.com/apparmor/apparmor/issues/1 + configureFlags = stdenv.lib.optionalString (!stdenv.isCross) "--with-python --with-perl"; - outputs = [ "out" "python" ]; + outputs = if stdenv.isCross then [ "out" ] else [ "out" "python" ]; - postInstall = '' + postInstall = stdenv.lib.optionalString (!stdenv.isCross) '' mkdir -p $python/lib mv $out/lib/python* $python/lib/ ''; |