Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 261d714222b6
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d19572fdc92d
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Sep 5, 2018

  1. Merge #46047: ghostscript: 9.22 -> 9.24 (security)

    (cherry picked from commit 281a629)
    vcunat committed Sep 5, 2018

    Verified

    This commit was signed with the committer’s verified signature.
    vcunat Vladimír Čunát
    Copy the full SHA
    d19572f View commit details
Showing with 21 additions and 11 deletions.
  1. +14 −11 pkgs/misc/ghostscript/default.nix
  2. +7 −0 pkgs/misc/ghostscript/doc-no-ref.diff
25 changes: 14 additions & 11 deletions pkgs/misc/ghostscript/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ stdenv, lib, fetchurl, fetchpatch, pkgconfig, zlib, expat, openssl, autoconf
, libjpeg, libpng, libtiff, freetype, fontconfig, lcms2, libpaper, jbig2dec
, libjpeg, libpng, libtiff, freetype, fontconfig, libpaper, jbig2dec
, libiconv, ijs
, x11Support ? false, xlibsWrapper ? null
, cupsSupport ? false, cups ? null
@@ -9,8 +9,9 @@ assert x11Support -> xlibsWrapper != null;
assert cupsSupport -> cups != null;
let
version = "9.${ver_min}";
ver_min = "22";
sha256 = "1fyi4yvdj39bjgs10klr31cda1fbx1ar7a7b7yz7v68gykk65y61";
ver_min = "24";
# ghostscript*.tar.xz in https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9xx/SHA512SUMS
sha512 = "dcbeeb5d3dd5ccaf949dc4be68363c50b1d35e647be4790a50b1bbf5f259f1d9181f705be27bfca708c4d270f945ff4b24e3db10b57800c1ee0ea7a40931c547";

fonts = stdenv.mkDerivation {
name = "ghostscript-fonts";
@@ -39,26 +40,28 @@ stdenv.mkDerivation rec {

src = fetchurl {
url = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9${ver_min}/${name}.tar.xz";
inherit sha256;
inherit sha512;
};

patches = [
./urw-font-files.patch
./doc-no-ref.diff
];

outputs = [ "out" "man" "doc" ];

enableParallelBuilding = true;

nativeBuildInputs = [ pkgconfig autoconf ];
buildInputs =
[ zlib expat openssl
libjpeg libpng libtiff freetype fontconfig lcms2 libpaper jbig2dec
libjpeg libpng libtiff freetype fontconfig libpaper jbig2dec
libiconv ijs
]
++ lib.optional x11Support xlibsWrapper
++ lib.optional cupsSupport cups
;

patches = [
./urw-font-files.patch
];
# No lcms2; upstream "is in process of forking it" and thus won't use one from a library.

preConfigure = ''
# requires in-tree (heavily patched) openjpeg
@@ -89,8 +92,8 @@ stdenv.mkDerivation rec {
cp -r Resource "$out/share/ghostscript/${version}"
mkdir -p "$doc/share/ghostscript/${version}"
mv "$out/share/ghostscript/${version}"/{doc,examples} "$doc/share/ghostscript/${version}/"
mkdir -p "$doc/share/doc/ghostscript"
mv "$doc/share/doc/${version}" "$doc/share/doc/ghostscript/"
ln -s "${fonts}" "$out/share/ghostscript/fonts"
'' + stdenv.lib.optionalString stdenv.isDarwin ''
7 changes: 7 additions & 0 deletions pkgs/misc/ghostscript/doc-no-ref.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Kill the reference from libgc.so to the documentation directory.
It's bad for closure, and probably not really good for anything.
--- a/base/gs.mak
+++ b/base/gs.mak
@@ -538,1 +538,1 @@
- $(EXP)$(ECHOGS_XE) -a $(gconfigd_h) -x 23 define -s -u GS_DOCDIR -x 2022 $(GS_DOCDIR) -x 22
+ $(EXP)$(ECHOGS_XE) -a $(gconfigd_h) -x 23 define -s -u GS_DOCDIR -x 2022 /no-path-to-docs -x 22