diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-09-05 18:59:00 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-09-05 19:17:14 +0200 |
commit | 78178d5854901e1b17a14bce3fe43515984b7b91 (patch) | |
tree | 350b6cb98c5a86ce3a15c18032afd6acdf28ccd7 /pkgs/os-specific/linux/systemd/default.nix | |
parent | 5d8c54746066eb454bee5c10ba93b3a9e078bf45 (diff) | |
download | nixpkgs-78178d5854901e1b17a14bce3fe43515984b7b91.tar nixpkgs-78178d5854901e1b17a14bce3fe43515984b7b91.tar.gz nixpkgs-78178d5854901e1b17a14bce3fe43515984b7b91.tar.bz2 nixpkgs-78178d5854901e1b17a14bce3fe43515984b7b91.tar.lz nixpkgs-78178d5854901e1b17a14bce3fe43515984b7b91.tar.xz nixpkgs-78178d5854901e1b17a14bce3fe43515984b7b91.tar.zst nixpkgs-78178d5854901e1b17a14bce3fe43515984b7b91.zip |
systemd: Separate lib output
This moves libsystemd.so and libudev.so into systemd.lib, and gets rid of libudev (which just contained a copy of libudev.so and the udev headers). It thus reduces the closure size of all packages that (indirectly) depend on libsystemd, of which there are quite a few (for instance, PulseAudio and dbus). For example, it reduces the closure of Blender from 430.8 to 400.8 MiB.
Diffstat (limited to 'pkgs/os-specific/linux/systemd/default.nix')
-rw-r--r-- | pkgs/os-specific/linux/systemd/default.nix | 38 |
1 files changed, 7 insertions, 31 deletions
diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index d02f7291df5..7fdebc5c1e8 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -28,13 +28,7 @@ stdenv.mkDerivation rec { }) ]; - /* gave up for now! - outputs = [ "out" "libudev" "doc" ]; # maybe: "dev" - # note: there are many references to ${systemd}/... - outputDev = "out"; - propagatedBuildOutputs = "libudev"; - */ - outputs = [ "out" "man" ]; + outputs = [ "out" "lib" "man" "dev" ]; buildInputs = [ linuxHeaders pkgconfig intltool gperf libcap kmod xz pam acl @@ -119,16 +113,6 @@ stdenv.mkDerivation rec { #export NIX_CFLAGS_LINK+=" -Wl,-rpath,$libudev/lib" ''; - /* - makeFlags = [ - "udevlibexecdir=$(libudev)/lib/udev" - # udev rules refer to $out, and anything but libs should probably go to $out - "udevrulesdir=$(out)/lib/udev/rules.d" - "udevhwdbdir=$(out)/lib/udev/hwdb.d" - ]; - */ - - PYTHON_BINARY = "${coreutils}/bin/env python"; # don't want a build time dependency on Python NIX_CFLAGS_COMPILE = @@ -180,26 +164,18 @@ stdenv.mkDerivation rec { rm -rf $out/etc/rpm - rm $out/lib/*.la + rm $lib/lib/*.la # "kernel-install" shouldn't be used on NixOS. find $out -name "*kernel-install*" -exec rm {} \; - ''; # */ - /* - # Move lib(g)udev to a separate output. TODO: maybe split them up - # to avoid libudev pulling glib - mkdir -p "$libudev/lib" - mv "$out"/lib/lib{,g}udev* "$libudev/lib/" - for i in "$libudev"/lib/*.la; do - substituteInPlace $i --replace "$out" "$libudev" - done - for i in "$out"/lib/pkgconfig/{libudev,gudev-1.0}.pc; do - substituteInPlace $i --replace "libdir=$out" "libdir=$libudev" - done - */ + # Keep only libudev and libsystemd in the lib output. + mkdir -p $out/lib + mv $lib/lib/security $lib/lib/libnss* $out/lib/ + ''; # */ enableParallelBuilding = true; + /* # some libs fail to link to liblzma and/or libffi postFixup = let extraLibs = stdenv.lib.makeLibraryPath [ xz.out libffi.out zlib.out ]; |