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.
This commit is contained in:
parent
cf26f610aa
commit
e05c4c6541
@ -32,6 +32,8 @@ let
|
|||||||
substituteInPlace ./common/Make.rules --replace "/usr/share/man" "share/man"
|
substituteInPlace ./common/Make.rules --replace "/usr/share/man" "share/man"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# FIXME: convert these to a single multiple-outputs package?
|
||||||
|
|
||||||
libapparmor = stdenv.mkDerivation {
|
libapparmor = stdenv.mkDerivation {
|
||||||
name = "libapparmor-${apparmor-version}";
|
name = "libapparmor-${apparmor-version}";
|
||||||
src = apparmor-sources;
|
src = apparmor-sources;
|
||||||
@ -61,6 +63,13 @@ let
|
|||||||
postPatch = "cd ./libraries/libapparmor";
|
postPatch = "cd ./libraries/libapparmor";
|
||||||
configureFlags = "--with-python --with-perl";
|
configureFlags = "--with-python --with-perl";
|
||||||
|
|
||||||
|
outputs = [ "out" "python" ];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
mkdir -p $python/lib
|
||||||
|
mv $out/lib/python* $python/lib/
|
||||||
|
'';
|
||||||
|
|
||||||
meta = apparmor-meta "library";
|
meta = apparmor-meta "library";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -75,6 +84,7 @@ let
|
|||||||
pythonPackages.python
|
pythonPackages.python
|
||||||
pythonPackages.readline
|
pythonPackages.readline
|
||||||
libapparmor
|
libapparmor
|
||||||
|
libapparmor.python
|
||||||
];
|
];
|
||||||
|
|
||||||
prePatch = prePatchCommon;
|
prePatch = prePatchCommon;
|
||||||
|
Loading…
Reference in New Issue
Block a user