ghostscript: support SOURCE_DATE_EPOCH for reproducible builds
Without this patch, it is impossible to generate PDF documents in a reproducible way using Ghostscript, as CreationDate and ModDate are included in the PDF, which are based on the current time. I ran into this problem while using the LATEX command `\includegraphics` with an `.eps` graphic. The Ghostscript developers are not interested in fixing this and rejected the patch, see https://bugs.ghostscript.com/show_bug.cgi?id=696765#c28. [Debian carries the same patch](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=794004), as does [Arch Linux](https://gitlab.archlinux.org/archlinux/packaging/packages/ghostscript/-/commit/426e6bf6f290c1acf1816c032c630d921b626c95).
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
, stdenv
|
||||
, lib
|
||||
, fetchurl
|
||||
, fetchpatch2
|
||||
, pkg-config
|
||||
, zlib
|
||||
, expat
|
||||
@@ -72,6 +73,12 @@ stdenv.mkDerivation rec {
|
||||
patches = [
|
||||
./urw-font-files.patch
|
||||
./doc-no-ref.diff
|
||||
|
||||
# Support SOURCE_DATE_EPOCH for reproducible builds
|
||||
(fetchpatch2 {
|
||||
url = "https://salsa.debian.org/debian/ghostscript/-/raw/01e895fea033cc35054d1b68010de9818fa4a8fc/debian/patches/2010_add_build_timestamp_setting.patch";
|
||||
hash = "sha256-XTKkFKzMR2QpcS1YqoxzJnyuGk/l/Y2jdevsmbMtCXA=";
|
||||
})
|
||||
];
|
||||
|
||||
outputs = [ "out" "man" "doc" "fonts" ];
|
||||
|
||||
Reference in New Issue
Block a user