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.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{ stdenv, fetchurl, buildEnv, makeWrapper
|
||||
, xorg, alsaLib, dbus, glib, gtk, atk, pango, freetype, fontconfig
|
||||
, gdk_pixbuf, cairo, zlib, nss, nssTools, nspr, gconf, expat, libudev, libcap
|
||||
, gdk_pixbuf, cairo, zlib, nss, nssTools, nspr, gconf, expat, systemd, libcap
|
||||
, libnotify}:
|
||||
let
|
||||
bits = if stdenv.system == "x86_64-linux" then "x64"
|
||||
@@ -37,7 +37,7 @@ in stdenv.mkDerivation rec {
|
||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/node-webkit/nw
|
||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/node-webkit/nwsnapshot
|
||||
|
||||
ln -s ${libudev.out}/lib/libudev.so $out/share/node-webkit/libudev.so.0
|
||||
ln -s ${systemd.lib}/lib/libudev.so $out/share/node-webkit/libudev.so.0
|
||||
|
||||
patchelf --set-rpath "${nwEnv}/lib:${nwEnv}/lib64:$out/share/node-webkit" $out/share/node-webkit/nw
|
||||
patchelf --set-rpath "${nwEnv}/lib:${nwEnv}/lib64:$out/share/node-webkit" $out/share/node-webkit/nwsnapshot
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{ stdenv, fetchurl, buildEnv, makeWrapper
|
||||
, xorg, alsaLib, dbus, glib, gtk, atk, pango, freetype, fontconfig
|
||||
, gdk_pixbuf, cairo, zlib, nss, nssTools, nspr, gconf, expat, libudev, libcap
|
||||
, gdk_pixbuf, cairo, zlib, nss, nssTools, nspr, gconf, expat, systemd, libcap
|
||||
, libnotify}:
|
||||
let
|
||||
bits = if stdenv.system == "x86_64-linux" then "x64"
|
||||
@@ -39,7 +39,7 @@ in stdenv.mkDerivation rec {
|
||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/nwjs/nw
|
||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/nwjs/nwjc
|
||||
|
||||
ln -s ${libudev.out}/lib/libudev.so $out/share/nwjs/libudev.so.0
|
||||
ln -s ${systemd.lib}/lib/libudev.so $out/share/nwjs/libudev.so.0
|
||||
|
||||
patchelf --set-rpath "${nwEnv}/lib:${nwEnv}/lib64:${stdenv.lib.makeLibraryPath [ stdenv.cc.cc ]}:$out/share/nwjs" $out/share/nwjs/nw
|
||||
patchelf --set-rpath "${nwEnv}/lib:${nwEnv}/lib64:$out/share/nwjs" $out/share/nwjs/nwjc
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{ stdenv, fetchurl, buildEnv, makeWrapper
|
||||
, xorg, alsaLib, dbus, glib, gtk, atk, pango, freetype, fontconfig
|
||||
, gdk_pixbuf, cairo, zlib, nss, nssTools, nspr, gconf, expat, libudev }:
|
||||
, gdk_pixbuf, cairo, zlib, nss, nssTools, nspr, gconf, expat, systemd }:
|
||||
let
|
||||
bits = if stdenv.system == "x86_64-linux" then "x64"
|
||||
else "ia32";
|
||||
@@ -35,7 +35,7 @@ in stdenv.mkDerivation rec {
|
||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/node-webkit/nw
|
||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/node-webkit/nwsnapshot
|
||||
|
||||
ln -s ${libudev.out}/lib/libudev.so $out/share/node-webkit/libudev.so.0
|
||||
ln -s ${systemd.lib}/lib/libudev.so $out/share/node-webkit/libudev.so.0
|
||||
|
||||
patchelf --set-rpath "${nwEnv}/lib:${nwEnv}/lib64:$out/share/node-webkit" $out/share/node-webkit/nw
|
||||
patchelf --set-rpath "${nwEnv}/lib:${nwEnv}/lib64:$out/share/node-webkit" $out/share/node-webkit/nwsnapshot
|
||||
|
||||
Reference in New Issue
Block a user