Merge: cups improvements (update, split $lib)
Fixes #23793. /cc maintainer @jgeerds.
This commit is contained in:
commit
45115b1937
@ -52,6 +52,7 @@ let
|
|||||||
|
|
||||||
ServerBin ${bindir}/lib/cups
|
ServerBin ${bindir}/lib/cups
|
||||||
DataDir ${bindir}/share/cups
|
DataDir ${bindir}/share/cups
|
||||||
|
DocumentRoot ${cups.out}/share/doc/cups
|
||||||
|
|
||||||
AccessLog syslog
|
AccessLog syslog
|
||||||
ErrorLog syslog
|
ErrorLog syslog
|
||||||
|
@ -46,7 +46,7 @@ let
|
|||||||
alsaLib.out
|
alsaLib.out
|
||||||
atk.out
|
atk.out
|
||||||
cairo.out
|
cairo.out
|
||||||
cups.out
|
cups
|
||||||
curl.out
|
curl.out
|
||||||
dbus.lib
|
dbus.lib
|
||||||
expat.out
|
expat.out
|
||||||
|
@ -61,7 +61,7 @@ stdenv.mkDerivation rec {
|
|||||||
./libressl.patch
|
./libressl.patch
|
||||||
(substituteAll {
|
(substituteAll {
|
||||||
src = ./dlopen-absolute-paths.diff;
|
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;
|
icu = icu.out;
|
||||||
libXfixes = libXfixes.out;
|
libXfixes = libXfixes.out;
|
||||||
glibc = stdenv.cc.libc.out;
|
glibc = stdenv.cc.libc.out;
|
||||||
|
@ -9,17 +9,16 @@
|
|||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "cups-${version}";
|
name = "cups-${version}";
|
||||||
version = "2.1.4";
|
version = "2.2.2";
|
||||||
|
|
||||||
passthru = { inherit version; };
|
passthru = { inherit version; };
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/apple/cups/releases/download/release-${version}/cups-${version}-source.tar.gz";
|
url = "https://github.com/apple/cups/releases/download/v${version}/cups-${version}-source.tar.gz";
|
||||||
sha256 = "13bjxw256wd1nff22vj2z25mdhllj2h6d9xypsg55b40661zs52b";
|
sha256 = "1xp4ji4rz3xffsz6w6nd60ajxvvihn02pkyp2l4smhqxbmyvp2gm";
|
||||||
};
|
};
|
||||||
|
|
||||||
# FIXME: the cups libraries contains some $out/share strings so can't be split.
|
outputs = [ "out" "lib" "dev" "man" ];
|
||||||
outputs = [ "out" "dev" "man" ]; # TODO: above
|
|
||||||
|
|
||||||
buildInputs = [ pkgconfig zlib libjpeg libpng libtiff libusb gnutls libpaper ]
|
buildInputs = [ pkgconfig zlib libjpeg libpng libtiff libusb gnutls libpaper ]
|
||||||
++ optionals stdenv.isLinux [ avahi pam dbus systemd acl ]
|
++ optionals stdenv.isLinux [ avahi pam dbus systemd acl ]
|
||||||
@ -30,6 +29,13 @@ stdenv.mkDerivation rec {
|
|||||||
propagatedBuildInputs = [ gmp ];
|
propagatedBuildInputs = [ gmp ];
|
||||||
|
|
||||||
configureFlags = [
|
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"
|
"--localstatedir=/var"
|
||||||
"--sysconfdir=/etc"
|
"--sysconfdir=/etc"
|
||||||
"--with-systemd=\${out}/lib/systemd/system"
|
"--with-systemd=\${out}/lib/systemd/system"
|
||||||
@ -68,14 +74,15 @@ stdenv.mkDerivation rec {
|
|||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
|
moveToOutput lib/cups "$out"
|
||||||
|
|
||||||
# Delete obsolete stuff that conflicts with cups-filters.
|
# Delete obsolete stuff that conflicts with cups-filters.
|
||||||
rm -rf $out/share/cups/banners $out/share/cups/data/testprint
|
rm -rf $out/share/cups/banners $out/share/cups/data/testprint
|
||||||
|
|
||||||
mkdir $dev/bin
|
moveToOutput bin/cups-config "$dev"
|
||||||
mv $out/bin/cups-config $dev/bin/
|
|
||||||
|
|
||||||
# Rename systemd files provided by CUPS
|
# Rename systemd files provided by CUPS
|
||||||
for f in $out/lib/systemd/system/*; do
|
for f in "$out"/lib/systemd/system/*; do
|
||||||
substituteInPlace "$f" \
|
substituteInPlace "$f" \
|
||||||
--replace "org.cups.cupsd" "cups" \
|
--replace "org.cups.cupsd" "cups" \
|
||||||
--replace "org.cups." ""
|
--replace "org.cups." ""
|
||||||
@ -88,7 +95,7 @@ stdenv.mkDerivation rec {
|
|||||||
done
|
done
|
||||||
'' + optionalString stdenv.isLinux ''
|
'' + optionalString stdenv.isLinux ''
|
||||||
# Use xdg-open when on Linux
|
# Use xdg-open when on Linux
|
||||||
substituteInPlace $out/share/applications/cups.desktop \
|
substituteInPlace "$out"/share/applications/cups.desktop \
|
||||||
--replace "Exec=htmlview" "Exec=xdg-open"
|
--replace "Exec=htmlview" "Exec=xdg-open"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
# Do not bump lightly! Visit <http://www.bchemnet.com/suldr/supported.html>
|
# Do not bump lightly! Visit <http://www.bchemnet.com/suldr/supported.html>
|
||||||
# to see what will break when upgrading. Consider a new versioned attribute.
|
# to see what will break when upgrading. Consider a new versioned attribute.
|
||||||
let
|
let
|
||||||
cups' = cups.out;
|
cups' = stdenv.lib.getLib cups;
|
||||||
in stdenv.mkDerivation rec {
|
in stdenv.mkDerivation rec {
|
||||||
name = "samsung-UnifiedLinuxDriver-${version}";
|
name = "samsung-UnifiedLinuxDriver-${version}";
|
||||||
version = "4.00.39";
|
version = "4.00.39";
|
||||||
|
@ -72,10 +72,10 @@ in stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
for bin in $out/bin/*; do
|
for bin in $out/bin/*; do
|
||||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$bin"
|
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
|
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/
|
ln -s ${stdenv.cc.cc.lib}/lib/libstdc++.so.6 $out/lib/
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user