diff --git a/pkgs/by-name/zo/zotero/avoid-git.patch b/pkgs/by-name/zo/zotero/avoid-git.patch new file mode 100644 index 000000000000..7bfed744434e --- /dev/null +++ b/pkgs/by-name/zo/zotero/avoid-git.patch @@ -0,0 +1,58 @@ +diff --git a/app/scripts/dir_build b/app/scripts/dir_build +index 493288ad47..e357770ced 100755 +--- a/app/scripts/dir_build ++++ b/app/scripts/dir_build +@@ -84,9 +84,9 @@ else + fi + fi + +-CHANNEL="source" ++CHANNEL="release" + +-hash=$(git -C "$ROOT_DIR" rev-parse --short HEAD) ++hash="" + + build_dir=$(mktemp -d) + cleanup() { rm -rf "$build_dir"; } +diff --git a/js-build/note-editor.js b/js-build/note-editor.js +index 1435730342..6eebb10c50 100644 +--- a/js-build/note-editor.js ++++ b/js-build/note-editor.js +@@ -12,8 +12,7 @@ async function getZoteroNoteEditor(signatures) { + + const modulePath = path.join(__dirname, '..', 'note-editor'); + +- const { stdout } = await exec('git rev-parse HEAD', { cwd: modulePath }); +- const hash = stdout.trim(); ++ const hash = ''; + + if (!('note-editor' in signatures) || signatures['note-editor'].hash !== hash) { + const targetDir = path.join(__dirname, '..', 'build', 'resource', 'note-editor'); +diff --git a/js-build/pdf-worker.js b/js-build/pdf-worker.js +index b820304f3a..6bbd0708c9 100644 +--- a/js-build/pdf-worker.js ++++ b/js-build/pdf-worker.js +@@ -12,8 +12,7 @@ async function getPDFWorker(signatures) { + + const modulePath = path.join(__dirname, '..', 'pdf-worker'); + +- const { stdout } = await exec('git rev-parse HEAD', { cwd: modulePath }); +- const hash = stdout.trim(); ++ const hash = ''; + + if (!('pdf-worker' in signatures) || signatures['pdf-worker'].hash !== hash) { + const targetDir = path.join(__dirname, '..', 'build', 'chrome', 'content', 'zotero', 'xpcom', 'pdfWorker'); +diff --git a/js-build/reader.js b/js-build/reader.js +index 67a02a3ad2..2127f680df 100644 +--- a/js-build/reader.js ++++ b/js-build/reader.js +@@ -12,8 +12,7 @@ async function getReader(signatures) { + + const modulePath = path.join(__dirname, '..', 'reader'); + +- const { stdout } = await exec('git rev-parse HEAD', { cwd: modulePath }); +- const hash = stdout.trim(); ++ const hash = ''; + + if (!('reader' in signatures) || signatures['reader'].hash !== hash) { + const targetDir = path.join(__dirname, '..', 'build', 'resource', 'reader'); diff --git a/pkgs/by-name/zo/zotero/package.nix b/pkgs/by-name/zo/zotero/package.nix index ffe8b1f8b2d1..48aac7ce667d 100644 --- a/pkgs/by-name/zo/zotero/package.nix +++ b/pkgs/by-name/zo/zotero/package.nix @@ -4,7 +4,6 @@ fetchFromGitHub, buildNpmPackage, nodejs_22, - git, perl, python3, zip, @@ -29,9 +28,8 @@ let owner = "zotero"; repo = "zotero"; tag = version; - hash = "sha256-vjGTlb4LM7wjOZqD/VsHXX59EA1f9a3LDz+Mgo4wHb0="; + hash = "sha256-SG5fTsQgtVX8Pmla2W91sETSR1D7ThmnrdUQwycNsPA="; fetchSubmodules = true; - leaveDotGit = true; }; pdf-js = buildNpmPackage { @@ -164,7 +162,6 @@ buildNpmPackage rec { npmDepsHash = "sha256-IVaT/O83kCGT7MGsTSblMKfVWeNBIpA9VJIWyikJrpk="; nativeBuildInputs = [ - git perl python3 zip @@ -176,6 +173,7 @@ buildNpmPackage rec { ]; patches = [ + ./avoid-git.patch ./js-build-fixes.patch ./avoid-xulrunner-fetch.patch ./build-fixes.patch