diff --git a/pkgs/misc/ghostscript/builder.sh b/pkgs/misc/ghostscript/builder.sh index 41b071126822..a1f84f3d80d1 100644 --- a/pkgs/misc/ghostscript/builder.sh +++ b/pkgs/misc/ghostscript/builder.sh @@ -6,7 +6,6 @@ preConfigure() { rm -rf ijs/ltmain.sh } -installPhase=installPhase installPhase() { make install install-so install-data install-doc install-man } diff --git a/pkgs/misc/ghostscript/default.nix b/pkgs/misc/ghostscript/default.nix index c3120d04bb72..1c0c82a94a33 100644 --- a/pkgs/misc/ghostscript/default.nix +++ b/pkgs/misc/ghostscript/default.nix @@ -6,6 +6,7 @@ assert x11Support -> x11 != null; stdenv.mkDerivation rec { name = "ghostscript-8.62.0"; + builder = ./builder.sh; src = fetchurl { @@ -25,15 +26,16 @@ stdenv.mkDerivation rec { # ... add other fonts here ]; - buildInputs = [ - libjpeg libpng zlib - (if x11Support then x11 else null) - ]; + buildInputs = [libjpeg libpng zlib] + ++ stdenv.lib.optional x11Support x11; configureFlags = " + --disable-static ${if x11Support then "--with-x" else "--without-x"} "; + NIX_CFLAGS_COMPILE = "-fpic"; + patches = [ # This patch is required to make Ghostscript at least build in a