From e4682568793da8ae95ffc578c70faa4b3bfe6692 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 30 Aug 2005 13:50:14 +0000 Subject: [PATCH] * X11 support in Ghostscript. svn path=/nixpkgs/trunk/; revision=3751 --- pkgs/misc/ghostscript/default.nix | 13 ++++++++++--- pkgs/system/all-packages-generic.nix | 3 ++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/pkgs/misc/ghostscript/default.nix b/pkgs/misc/ghostscript/default.nix index 6397f3204245..4183654aebcd 100644 --- a/pkgs/misc/ghostscript/default.nix +++ b/pkgs/misc/ghostscript/default.nix @@ -1,4 +1,8 @@ -{stdenv, fetchurl, libjpeg, libpng, zlib}: +{ stdenv, fetchurl, libjpeg, libpng, zlib +, x11Support, x11 ? null +}: + +assert x11Support -> x11 != null; stdenv.mkDerivation { name = "ghostscript-8.15"; @@ -17,7 +21,10 @@ stdenv.mkDerivation { # ... add other fonts here ]; - buildInputs = [libjpeg libpng zlib]; + buildInputs = [ + libjpeg libpng zlib + (if x11Support then x11 else null) + ]; - configureFlags = "--without-x"; + configureFlags = if x11Support then "--with-x" else "--without-x"; } diff --git a/pkgs/system/all-packages-generic.nix b/pkgs/system/all-packages-generic.nix index 060399eb1c89..2d7863cd6ac5 100644 --- a/pkgs/system/all-packages-generic.nix +++ b/pkgs/system/all-packages-generic.nix @@ -1510,7 +1510,8 @@ rec { }; ghostscript = (import ../misc/ghostscript) { - inherit fetchurl stdenv libjpeg libpng zlib; + inherit fetchurl stdenv libjpeg libpng zlib x11; + x11Support = false; }; nix = (import ../misc/nix) {