cups: split the $lib output
This saves > 10 MB from most closures. Printing test succeeds on x86_64-linux.
This commit is contained in:
parent
2e4c5711a2
commit
50fadc8b18
@ -52,6 +52,7 @@ let
|
||||
|
||||
ServerBin ${bindir}/lib/cups
|
||||
DataDir ${bindir}/share/cups
|
||||
DocumentRoot ${cups.out}/share/doc/cups
|
||||
|
||||
AccessLog syslog
|
||||
ErrorLog syslog
|
||||
|
@ -46,7 +46,7 @@ let
|
||||
alsaLib.out
|
||||
atk.out
|
||||
cairo.out
|
||||
cups.out
|
||||
cups
|
||||
curl.out
|
||||
dbus.lib
|
||||
expat.out
|
||||
|
@ -61,7 +61,7 @@ stdenv.mkDerivation rec {
|
||||
./libressl.patch
|
||||
(substituteAll {
|
||||
src = ./dlopen-absolute-paths.diff;
|
||||
cups = if cups != null then cups.out else null;
|
||||
cups = if cups != null then stdenv.lib.getLib cups else null;
|
||||
icu = icu.out;
|
||||
libXfixes = libXfixes.out;
|
||||
glibc = stdenv.cc.libc.out;
|
||||
|
@ -18,8 +18,7 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "1xp4ji4rz3xffsz6w6nd60ajxvvihn02pkyp2l4smhqxbmyvp2gm";
|
||||
};
|
||||
|
||||
# FIXME: the cups libraries contains some $out/share strings so can't be split.
|
||||
outputs = [ "out" "dev" "man" ]; # TODO: above
|
||||
outputs = [ "out" "lib" "dev" "man" ];
|
||||
|
||||
buildInputs = [ pkgconfig zlib libjpeg libpng libtiff libusb gnutls libpaper ]
|
||||
++ optionals stdenv.isLinux [ avahi pam dbus systemd acl ]
|
||||
@ -30,6 +29,13 @@ stdenv.mkDerivation rec {
|
||||
propagatedBuildInputs = [ gmp ];
|
||||
|
||||
configureFlags = [
|
||||
# Put just lib/* and locale into $lib; this didn't work directly.
|
||||
# lib/cups is moved back to $out in postInstall.
|
||||
# Beware: some parts of cups probably don't fully respect these.
|
||||
"--prefix=$(lib)"
|
||||
"--datadir=$(out)/share"
|
||||
"--localedir=$(lib)/share/locale"
|
||||
|
||||
"--localstatedir=/var"
|
||||
"--sysconfdir=/etc"
|
||||
"--with-systemd=\${out}/lib/systemd/system"
|
||||
@ -68,6 +74,8 @@ stdenv.mkDerivation rec {
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postInstall = ''
|
||||
moveToOutput lib/cups "$out"
|
||||
|
||||
# Delete obsolete stuff that conflicts with cups-filters.
|
||||
rm -rf $out/share/cups/banners $out/share/cups/data/testprint
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
# Do not bump lightly! Visit <http://www.bchemnet.com/suldr/supported.html>
|
||||
# to see what will break when upgrading. Consider a new versioned attribute.
|
||||
let
|
||||
cups' = cups.out;
|
||||
cups' = stdenv.lib.getLib cups;
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "samsung-UnifiedLinuxDriver-${version}";
|
||||
version = "4.00.39";
|
||||
|
@ -72,10 +72,10 @@ in stdenv.mkDerivation rec {
|
||||
|
||||
for bin in $out/bin/*; do
|
||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$bin"
|
||||
patchelf --set-rpath "$out/lib:${cups.out}/lib" "$bin"
|
||||
patchelf --set-rpath "$out/lib:${stdenv.lib.getLib cups}/lib" "$bin"
|
||||
done
|
||||
|
||||
patchelf --set-rpath "$out/lib:${cups.out}/lib" "$out/lib/libscmssc.so"
|
||||
patchelf --set-rpath "$out/lib:${stdenv.lib.getLib cups}/lib" "$out/lib/libscmssc.so"
|
||||
|
||||
ln -s ${stdenv.cc.cc.lib}/lib/libstdc++.so.6 $out/lib/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user