gotenberg: 8.9.1 -> 8.16.0

This commit is contained in:
dish
2025-04-12 21:12:16 +02:00
committed by Sandro Jäckel
parent 8b0d463cc7
commit 348d126d2c
+17 -4
View File
@@ -12,6 +12,7 @@
makeFontsConf,
liberation_ttf_v2,
exiftool,
pdfcpu,
nixosTests,
nix-update-script,
}:
@@ -23,19 +24,21 @@ let
in
buildGoModule rec {
pname = "gotenberg";
version = "8.9.1";
version = "8.16.0";
src = fetchFromGitHub {
owner = "gotenberg";
repo = "gotenberg";
tag = "v${version}";
hash = "sha256-y54DtOYIzFAk05TvXFcLdStfAXim3sVHBkW+R8CrtMM=";
hash = "sha256-m8aDhfcUa3QFr+7hzlQFL2wPfcx5RE+3dl5RHzWwau0=";
};
vendorHash = "sha256-BYcdqZ8TNEG6popRt+Dg5xW5Q7RmYvdlV+niUNenRG0=";
vendorHash = "sha256-EM+Rpo4Zf+aqA56aFeuQ0tbvpTgZhmfv+B7qYI6PXWc=";
postPatch = ''
find ./pkg -name '*_test.go' -exec sed -i -e 's#/tests#${src}#g' {} \;
substituteInPlace pkg/gotenberg/fs_test.go \
--replace-fail "/tmp" "/build"
'';
nativeBuildInputs = [ makeBinaryWrapper ];
@@ -52,6 +55,7 @@ buildGoModule rec {
pdftk
qpdf
unoconv
pdfcpu
mktemp
jre'
];
@@ -62,6 +66,7 @@ buildGoModule rec {
export QPDF_BIN_PATH=${getExe qpdf}
export UNOCONVERTER_BIN_PATH=${getExe unoconv}
export EXIFTOOL_BIN_PATH=${getExe exiftool}
export PDFCPU_BIN_PATH=${getExe pdfcpu}
# LibreOffice needs all of these set to work properly
export LIBREOFFICE_BIN_PATH=${libreoffice'}
export FONTCONFIG_FILE=${fontsConf}
@@ -70,7 +75,14 @@ buildGoModule rec {
'';
# These tests fail with a panic, so disable them.
checkFlags = [ "-skip=^TestChromiumBrowser_(screenshot|pdf)$" ];
checkFlags =
let
skippedTests = [
"TestChromiumBrowser_(screenshot|pdf)"
"TestNewContext"
];
in
[ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
preFixup = ''
wrapProgram $out/bin/gotenberg \
@@ -78,6 +90,7 @@ buildGoModule rec {
--set QPDF_BIN_PATH "${getExe qpdf}" \
--set UNOCONVERTER_BIN_PATH "${getExe unoconv}" \
--set EXIFTOOL_BIN_PATH "${getExe exiftool}" \
--set PDFCPU_BIN_PATH "${getExe pdfcpu}" \
--set JAVA_HOME "${jre'}"
'';