zotero: 8.0.5 -> 9.0.0 (#509890)

This commit is contained in:
nixpkgs-ci[bot]
2026-04-16 15:43:22 +00:00
committed by GitHub
3 changed files with 34 additions and 15 deletions
+9 -7
View File
@@ -27,16 +27,18 @@ index b820304f3a..aafb6b1ef5 100644
}
signatures['pdf-worker'] = { hash };
diff --git a/js-build/reader.js b/js-build/reader.js
index 67a02a3ad2..5de2f3ada8 100644
index 12b5df6a92..20c3f20a57 100644
--- a/js-build/reader.js
+++ b/js-build/reader.js
@@ -36,9 +36,6 @@ async function getReader(signatures) {
@@ -36,11 +36,6 @@ async function getReader(signatures) {
await fs.remove(path.join(targetDir, 'zotero'));
}
catch (e) {
- console.error(e);
- if (!e.message?.includes('The requested URL returned error: 403')) {
- console.error(e);
- }
- await exec('npm ci', { cwd: modulePath });
- await exec('npm run build', { cwd: modulePath });
await fs.copy(path.join(modulePath, 'build', 'zotero'), targetDir);
}
signatures['reader'] = { hash };
- await exec('npm run build:zotero', { cwd: modulePath });
if (!fs.pathExists(path.join(modulePath, 'build', 'zotero', 'pdf', 'build', 'pdf.mjs'))) {
throw new Error('pdf.js build failed to produce output');
}
+13 -8
View File
@@ -16,6 +16,7 @@
copyDesktopItems,
libGL,
pciutils,
speechd-minimal,
wrapGAppsHook3,
nix-update-script,
xvfb-run,
@@ -27,14 +28,14 @@ let
nodejs = nodejs_22;
pname = "zotero";
version = "8.0.5";
version = "9.0.0";
src = fetchFromGitHub {
owner = "zotero";
repo = "zotero";
tag = version;
hash = "sha256-Amk2ehdzrQjFhx1eEHcnq+Z+un+2bT/u4kpbWqD5Sbc=";
fetchSubmodules = true;
hash = "sha256-70kVFnypdF3YDXfrA+BFSoGkBfQAjDVa2pWOmaoetBI=";
};
pdf-js = buildNpmPackage {
@@ -88,8 +89,11 @@ let
pname = "zotero-pdf-reader";
inherit version nodejs;
src = "${src}/reader";
npmDepsHash = "sha256-p8O2gIF0S7QO0AR9TPPQsWUtRnKnf58zSl3JZN0lnuc=";
patches = [ ./pdf-reader-locales.patch ];
npmDepsHash = "sha256-8marAeBAW5cKDaJT3xbVsXyVfGa5ehZYUYijDzFng38=";
patches = [
./pdf-reader-locales.patch
./pdf-reader-build-fix.patch
];
postPatch = ''
rm -rf pdfjs/pdf.js
cp -r ${pdf-js} pdfjs/pdf.js
@@ -102,6 +106,7 @@ let
mkdir -p locales/en-US/
cp -r ${src}/chrome/locale/en-US/zotero/* locales/en-US/
'';
npmBuildScript = "build:zotero";
installPhase = ''
runHook preInstall
@@ -208,12 +213,11 @@ buildNpmPackage (finalAttrs: {
# Skip some flaky/failing tests
rm test/tests/retractionsTest.js
for test in \
"should throw error on broken symlink" \
"should use BrowserDownload for 403 when enforcing file type" \
"should use BrowserDownload for a JS redirect page" \
"should keep attachments pane status after changing selection" \
"should render preview robustly after making dense calls to render and discard" \
"should discard attachment pane preview after becoming invisible" \
"should throw error on broken symlink" \
"should switch dialog from add note to add/edit citation" \
"should vacuum the database with force option" \
; do
sed -i "s|it(\"$test|it.skip(\"$test|" test/tests/*.js
done
@@ -312,6 +316,7 @@ buildNpmPackage (finalAttrs: {
lib.makeLibraryPath [
libGL
pciutils
speechd-minimal
]
})
'';
@@ -0,0 +1,12 @@
diff --git a/pdfjs/build b/pdfjs/build
index abd34be..509932f 100755
--- a/pdfjs/build
+++ b/pdfjs/build
@@ -14,7 +14,6 @@ BUILD_BASE=./build
# Move into the PDF.js directory, install dependencies, and build
pushd pdfjs/pdf.js
-npm ci
if [[ $PDFJS_CONFIG != "web" ]]; then
npx gulp generic
fi