diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-09-01 17:51:21 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-09-01 18:57:43 +0200 |
commit | e05c4c654108dbac59ac5f856af02dfcd20442fc (patch) | |
tree | ed4f6b5f0f8c461cf7cb98eb3f6edc94b8ca5e93 | |
parent | cf26f610aa56269ac9c73096c351b77aac00a74d (diff) |
libapparmor: Move python stuff to a separate output
This prevents systemd and by extension a zillion other packages from having Python 2.7 in their closure. For example, the closure of systemd dropped from 133 MiB to 85 MiB.
-rw-r--r-- | pkgs/os-specific/linux/apparmor/default.nix | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/apparmor/default.nix b/pkgs/os-specific/linux/apparmor/default.nix index f90601073406a..f58a7557ce35f 100644 --- a/pkgs/os-specific/linux/apparmor/default.nix +++ b/pkgs/os-specific/linux/apparmor/default.nix @@ -32,6 +32,8 @@ let substituteInPlace ./common/Make.rules --replace "/usr/share/man" "share/man" ''; + # FIXME: convert these to a single multiple-outputs package? + libapparmor = stdenv.mkDerivation { name = "libapparmor-${apparmor-version}"; src = apparmor-sources; @@ -61,6 +63,13 @@ let postPatch = "cd ./libraries/libapparmor"; configureFlags = "--with-python --with-perl"; + outputs = [ "out" "python" ]; + + postInstall = '' + mkdir -p $python/lib + mv $out/lib/python* $python/lib/ + ''; + meta = apparmor-meta "library"; }; @@ -75,6 +84,7 @@ let pythonPackages.python pythonPackages.readline libapparmor + libapparmor.python ]; prePatch = prePatchCommon; |