From e7a94d6fefb86f39c000f747974c0d093f8eac6e Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 17 Jan 2009 13:08:51 +0000 Subject: [PATCH] * Ghostscript: build the CUPS filter. This allows CUPS to print to non-Postscript printers. svn path=/nixpkgs/trunk/; revision=13793 --- pkgs/misc/ghostscript/builder.sh | 3 +++ pkgs/misc/ghostscript/default.nix | 11 ++++++++--- pkgs/top-level/all-packages.nix | 4 +++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/pkgs/misc/ghostscript/builder.sh b/pkgs/misc/ghostscript/builder.sh index 13ec107ed9ab..d2e33f26bfc2 100644 --- a/pkgs/misc/ghostscript/builder.sh +++ b/pkgs/misc/ghostscript/builder.sh @@ -4,6 +4,9 @@ preConfigure=preConfigure preConfigure() { # "ijs" is impure: it contains symlinks to /usr/share/automake etc.! rm -rf ijs/ltmain.sh + + # Don't install stuff in the Cups store path. + makeFlagsArray=(CUPSSERVERBIN=$out/lib/cups CUPSSERVERROOT=$out/etc/cups CUPSDATA=$out/share/cups) } installTargets="install install-so install-data install-doc install-man" diff --git a/pkgs/misc/ghostscript/default.nix b/pkgs/misc/ghostscript/default.nix index 1c0c82a94a33..6f9aa8530b6b 100644 --- a/pkgs/misc/ghostscript/default.nix +++ b/pkgs/misc/ghostscript/default.nix @@ -1,13 +1,17 @@ -{ stdenv, fetchurl, libjpeg, libpng, zlib +{ stdenv, fetchurl, libjpeg, libpng, libtiff, zlib, pkgconfig, fontconfig, openssl , x11Support, x11 ? null +, cupsSupport ? false, cups ? null }: assert x11Support -> x11 != null; +assert cupsSupport -> cups != null; stdenv.mkDerivation rec { name = "ghostscript-8.62.0"; builder = ./builder.sh; + + x = true; src = fetchurl { url = "mirror://gnu/ghostscript/gnu-${name}.tar.bz2"; @@ -26,8 +30,9 @@ stdenv.mkDerivation rec { # ... add other fonts here ]; - buildInputs = [libjpeg libpng zlib] - ++ stdenv.lib.optional x11Support x11; + buildInputs = [libjpeg libpng libtiff zlib pkgconfig fontconfig openssl] + ++ stdenv.lib.optional x11Support x11 + ++ stdenv.lib.optional cupsSupport cups; configureFlags = " --disable-static diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 738d4e42364d..7a320aac3ed5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8672,8 +8672,10 @@ let }; ghostscript = import ../misc/ghostscript { - inherit fetchurl stdenv libjpeg libpng zlib x11; + inherit fetchurl stdenv libjpeg libpng libtiff zlib x11 pkgconfig + fontconfig cups openssl; x11Support = false; + cupsSupport = true; }; ghostscriptX = lowPrio (appendToName "with-X" (import ../misc/ghostscript {