systemd: Put libudev in a separate output
This way, packages that need libudev (like Mesa) don't pull in all of systemd as a runtime dependency.
This commit is contained in:
parent
552fd3d599
commit
15bd0f4beb
@ -14,6 +14,8 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "07gvn3rpski8sh1nz16npjf2bvj0spsjdwc5px9685g2pi6kxcb1";
|
sha256 = "07gvn3rpski8sh1nz16npjf2bvj0spsjdwc5px9685g2pi6kxcb1";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
outputs = [ "out" "man" "libudev" ];
|
||||||
|
|
||||||
patches =
|
patches =
|
||||||
[ ./0001-Make-systemctl-daemon-reexec-do-the-right-thing-on-N.patch
|
[ ./0001-Make-systemctl-daemon-reexec-do-the-right-thing-on-N.patch
|
||||||
./0002-Ignore-duplicate-paths-in-systemctl-start.patch
|
./0002-Ignore-duplicate-paths-in-systemctl-start.patch
|
||||||
@ -65,6 +67,8 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
substituteInPlace src/journal/catalog.c \
|
substituteInPlace src/journal/catalog.c \
|
||||||
--replace /usr/lib/systemd/catalog/ $out/lib/systemd/catalog/
|
--replace /usr/lib/systemd/catalog/ $out/lib/systemd/catalog/
|
||||||
|
|
||||||
|
export NIX_CFLAGS_LINK+=" -Wl,-rpath,$libudev/lib"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
PYTHON_BINARY = "${coreutils}/bin/env python"; # don't want a build time dependency on Python
|
PYTHON_BINARY = "${coreutils}/bin/env python"; # don't want a build time dependency on Python
|
||||||
@ -114,6 +118,20 @@ stdenv.mkDerivation rec {
|
|||||||
done
|
done
|
||||||
|
|
||||||
rm -rf $out/etc/rpm
|
rm -rf $out/etc/rpm
|
||||||
|
|
||||||
|
# Move libudev to a separate output.
|
||||||
|
mkdir -p $libudev/lib/pkgconfig $libudev/include
|
||||||
|
mv $out/lib/libudev* $libudev/lib/
|
||||||
|
mv $out/lib/pkgconfig/libudev*.pc $libudev/lib/pkgconfig/
|
||||||
|
mv $out/include/libudev.h $libudev/include/
|
||||||
|
|
||||||
|
for i in $libudev/lib/*.la $libudev/lib/pkgconfig/*.pc; do
|
||||||
|
substituteInPlace $i --replace $out $libudev
|
||||||
|
done
|
||||||
|
|
||||||
|
# FIXME: move into stdenv
|
||||||
|
prefix="$libudev" patchELF
|
||||||
|
prefix="$libudev" stripDirs "lib" "''${stripDebugFlags:--S}"
|
||||||
''; # */
|
''; # */
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
@ -6637,7 +6637,9 @@ let
|
|||||||
|
|
||||||
sysstat = callPackage ../os-specific/linux/sysstat { };
|
sysstat = callPackage ../os-specific/linux/sysstat { };
|
||||||
|
|
||||||
systemd = callPackage ../os-specific/linux/systemd { };
|
systemd = callPackage ../os-specific/linux/systemd {
|
||||||
|
stdenv = stdenvMulti;
|
||||||
|
};
|
||||||
|
|
||||||
sysvinit = callPackage ../os-specific/linux/sysvinit { };
|
sysvinit = callPackage ../os-specific/linux/sysvinit { };
|
||||||
|
|
||||||
@ -6679,7 +6681,8 @@ let
|
|||||||
});
|
});
|
||||||
|
|
||||||
udev145 = callPackage ../os-specific/linux/udev/145.nix { };
|
udev145 = callPackage ../os-specific/linux/udev/145.nix { };
|
||||||
udev = pkgs.systemd;
|
|
||||||
|
udev = pkgs.systemd.libudev;
|
||||||
|
|
||||||
udisks1 = callPackage ../os-specific/linux/udisks/1-default.nix { };
|
udisks1 = callPackage ../os-specific/linux/udisks/1-default.nix { };
|
||||||
udisks2 = callPackage ../os-specific/linux/udisks/2-default.nix { };
|
udisks2 = callPackage ../os-specific/linux/udisks/2-default.nix { };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user