zotero: 7.0.30 -> 8.0-unstable-2026-01-06
This lets us use the already packaged and built Firefox 140 ESR. Many npm-related annoyances/patches were fixed, other new problems were introduced (locale download).
This commit is contained in:
@@ -1,14 +1,30 @@
|
||||
diff --git a/app/scripts/fetch_xulrunner b/app/scripts/fetch_xulrunner
|
||||
index 0d871782c3..bea85feae9 100755
|
||||
index 30c3a9073d..fb7c2f367d 100755
|
||||
--- a/app/scripts/fetch_xulrunner
|
||||
+++ b/app/scripts/fetch_xulrunner
|
||||
@@ -422,73 +422,11 @@ cd xulrunner
|
||||
@@ -148,15 +148,6 @@ function modify_omni {
|
||||
# Continue using app.update.auto in prefs.js on Windows
|
||||
replace_line 'PER_INSTALLATION_PREFS_PLATFORMS = \["win"\]' 'PER_INSTALLATION_PREFS_PLATFORMS = []' modules/UpdateUtils.sys.mjs
|
||||
|
||||
- # Prompt if major update is available instead of installing automatically on restart
|
||||
- replace_line 'if \(!updateAuto\) \{' 'if (update.type == "major") {
|
||||
- LOG("UpdateService:_selectAndInstallUpdate - prompting because it is a major update");
|
||||
- AUSTLMY.pingCheckCode(this._pingSuffix, AUSTLMY.CHK_SHOWPROMPT_PREF);
|
||||
- Services.obs.notifyObservers(update, "update-available", "show-prompt");
|
||||
- return;
|
||||
- }
|
||||
- if (!updateAuto) {' modules/UpdateService.sys.mjs
|
||||
-
|
||||
# Avoid console warning about resource://gre/modules/FxAccountsCommon.js
|
||||
replace_line 'const logins = this._data.logins;' 'const logins = this._data.logins; if (this._data.logins.length != -1) return;' modules/LoginStore.sys.mjs
|
||||
|
||||
@@ -506,70 +497,9 @@ cd xulrunner
|
||||
|
||||
if [ $BUILD_MAC == 1 ]; then
|
||||
GECKO_VERSION="$GECKO_VERSION_MAC"
|
||||
- DOWNLOAD_URL="https://ftp.mozilla.org/pub/firefox/releases/$GECKO_VERSION"
|
||||
- rm -rf Firefox.app
|
||||
|
||||
-
|
||||
- if [ -e "Firefox $GECKO_VERSION.app.zip" ]; then
|
||||
- echo "Using Firefox $GECKO_VERSION.app.zip"
|
||||
- unzip "Firefox $GECKO_VERSION.app.zip"
|
||||
@@ -19,6 +35,8 @@ index 0d871782c3..bea85feae9 100755
|
||||
- set -e
|
||||
- hdiutil attach -quiet Firefox.dmg
|
||||
- cp -a /Volumes/Firefox/Firefox.app .
|
||||
- # Store local copy of unmodified app
|
||||
- zip -r "Firefox $GECKO_VERSION.app.zip" Firefox.app
|
||||
- hdiutil detach -quiet /Volumes/Firefox
|
||||
- fi
|
||||
-
|
||||
@@ -37,7 +55,7 @@ index 0d871782c3..bea85feae9 100755
|
||||
-
|
||||
- # Verify hash
|
||||
- if [[ "`uname`" = "Darwin" ]]; then
|
||||
- shasum=shasum
|
||||
- shasum="shasum -a 256"
|
||||
- else
|
||||
- shasum=sha256sum
|
||||
- fi
|
||||
@@ -54,7 +72,7 @@ index 0d871782c3..bea85feae9 100755
|
||||
+ pushd firefox
|
||||
modify_omni mac
|
||||
popd
|
||||
|
||||
-
|
||||
- # Replace "FirefoxCP" with "ZoteroCP" for subprocesses ("Isolated Web Content", "Socket Process", "Web Content", etc.)
|
||||
- info_plist=Firefox.app/Contents/MacOS/plugin-container.app/Contents/Resources/English.lproj/InfoPlist.strings
|
||||
- from=$(get_utf16_chars "FirefoxCP")
|
||||
@@ -66,52 +84,55 @@ index 0d871782c3..bea85feae9 100755
|
||||
- exit 1
|
||||
- fi
|
||||
-
|
||||
- if [ ! -e "Firefox $GECKO_VERSION.app.zip" ]; then
|
||||
- rm "Firefox.dmg"
|
||||
- fi
|
||||
- rm -f Firefox.dmg
|
||||
-
|
||||
- #if [ ! -e "Firefox $GECKO_VERSION MacOS.zip" ]; then
|
||||
- # rm "MacOS.zip"
|
||||
- #fi
|
||||
- echo $("$SCRIPT_DIR/xulrunner_hash" -p m) > hash-mac
|
||||
fi
|
||||
|
||||
if [ $BUILD_WIN == 1 ]; then
|
||||
@@ -563,36 +501,9 @@ fi
|
||||
@@ -709,44 +639,9 @@ if [ $BUILD_WIN == 1 ]; then
|
||||
fi
|
||||
|
||||
if [ $BUILD_LINUX == 1 ]; then
|
||||
GECKO_VERSION="$GECKO_VERSION_LINUX"
|
||||
- GECKO_VERSION="$GECKO_VERSION_LINUX"
|
||||
- DOWNLOAD_URL="https://ftp.mozilla.org/pub/firefox/releases/$GECKO_VERSION"
|
||||
-
|
||||
-
|
||||
- # Include 32-bit build if not in CI
|
||||
- if [[ "${CI:-}" = "1" ]] || [[ "${SKIP_32:-}" = "1" ]]; then
|
||||
- arches="x86_64"
|
||||
-
|
||||
- if [[ -n $arch ]]; then
|
||||
- arch_list=("$arch")
|
||||
- else
|
||||
- arches="i686 x86_64"
|
||||
- arch_list=(x86_64 arm64 i686)
|
||||
- fi
|
||||
- for arch in $arches; do
|
||||
- xdir="firefox-$arch"
|
||||
- for arch in "${arch_list[@]}"; do
|
||||
- xdir="firefox-linux-$arch"
|
||||
- rm -rf $xdir
|
||||
-
|
||||
- archived_file="firefox-$GECKO_VERSION-$arch.tar.bz2"
|
||||
- archived_file="firefox-$GECKO_VERSION-$arch.tar.xz"
|
||||
- if [ -e "$archived_file" ]; then
|
||||
- echo "Using $archived_file"
|
||||
- cp "$archived_file" "firefox-$GECKO_VERSION.tar.bz2"
|
||||
- cp "$archived_file" "firefox-$GECKO_VERSION.tar.xz"
|
||||
- else
|
||||
- curl -O "$DOWNLOAD_URL/linux-$arch/en-US/firefox-$GECKO_VERSION.tar.bz2"
|
||||
- if [ $arch = "arm64" ]; then
|
||||
- moz_arch=aarch64
|
||||
- else
|
||||
- moz_arch=$arch
|
||||
- fi
|
||||
- curl -O "$DOWNLOAD_URL/linux-$moz_arch/en-US/firefox-$GECKO_VERSION.tar.xz"
|
||||
- # Store local copy of unmodified app
|
||||
- cp "firefox-$GECKO_VERSION.tar.xz" "$archived_file"
|
||||
- fi
|
||||
-
|
||||
- tar xvf firefox-$GECKO_VERSION.tar.bz2
|
||||
- mv firefox firefox-$arch
|
||||
- tar xvf firefox-$GECKO_VERSION.tar.xz
|
||||
- mv firefox $xdir
|
||||
-
|
||||
- pushd firefox-$arch
|
||||
- pushd $xdir
|
||||
- modify_omni $arch
|
||||
+ pushd firefox
|
||||
+ pushd firefox-linux-x86_64
|
||||
+ modify_omni linux
|
||||
popd
|
||||
- echo $($SCRIPT_DIR/xulrunner_hash -p l) > hash-linux
|
||||
- rm "firefox-$GECKO_VERSION.tar.bz2"
|
||||
-
|
||||
- rm "firefox-$GECKO_VERSION.tar.xz"
|
||||
-
|
||||
- echo "$( $SCRIPT_DIR/xulrunner_hash -p l -a "$arch" )" > "hash-linux-${arch}"
|
||||
- done
|
||||
fi
|
||||
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
diff --git a/app/build.sh b/app/build.sh
|
||||
index de092bde16..b2d92287a7 100755
|
||||
--- a/app/build.sh
|
||||
+++ b/app/build.sh
|
||||
@@ -244,7 +244,7 @@ if [ -z "$UPDATE_CHANNEL" ]; then UPDATE_CHANNEL="default"; fi
|
||||
BUILD_ID=`date +%Y%m%d%H%M%S`
|
||||
|
||||
# Paths to Gecko runtimes
|
||||
-MAC_RUNTIME_PATH="$CALLDIR/xulrunner/Firefox.app"
|
||||
+MAC_RUNTIME_PATH="$CALLDIR/xulrunner/firefox"
|
||||
WIN_RUNTIME_PATH_PREFIX="$CALLDIR/xulrunner/firefox-"
|
||||
LINUX_RUNTIME_PATH_PREFIX="$CALLDIR/xulrunner/firefox-linux-"
|
||||
|
||||
@@ -272,8 +272,8 @@ cd "$app_dir"
|
||||
# This works around https://bugzilla.mozilla.org/show_bug.cgi?id=1772900
|
||||
set +e
|
||||
if [ $BUILD_MAC == 1 ]; then
|
||||
- cp -Rp "$MAC_RUNTIME_PATH"/Contents/Resources/browser/omni "$app_dir"
|
||||
- unzip -qj "$MAC_RUNTIME_PATH"/Contents/Resources/omni.ja "hyphenation/*" -d "$app_dir"/hyphenation/
|
||||
+ cp -Rp "$MAC_RUNTIME_PATH"/browser/omni "$app_dir"
|
||||
+ unzip -qj "$MAC_RUNTIME_PATH"/omni.ja "hyphenation/*" -d "$app_dir"/hyphenation/
|
||||
|
||||
elif [[ $BUILD_WIN == 1 ]]; then
|
||||
# These are non-arch-specific files, so just find a runtime we fetched:
|
||||
@@ -644,11 +644,6 @@ if [ $BUILD_MAC == 1 ]; then
|
||||
cp "$MAC_RUNTIME_PATH/../MacOS/XUL" "$CONTENTSDIR/MacOS/"
|
||||
fi
|
||||
|
||||
- # Use our own updater, because Mozilla's requires updates signed by Mozilla
|
||||
- cd "$CONTENTSDIR/MacOS"
|
||||
- check_lfs_file "$CALLDIR/mac/updater.tar.xz"
|
||||
- tar xf "$CALLDIR/mac/updater.tar.xz"
|
||||
-
|
||||
# Modify Info.plist
|
||||
perl -pi -e "s/\{\{VERSION\}\}/$VERSION/" "$CONTENTSDIR/Info.plist"
|
||||
perl -pi -e "s/\{\{VERSION_NUMERIC\}\}/$VERSION_NUMERIC/" "$CONTENTSDIR/Info.plist"
|
||||
@@ -1028,11 +1023,6 @@ if [ $BUILD_LINUX == 1 ]; then
|
||||
cp "$CALLDIR/linux/zotero.desktop" "$APPDIR"
|
||||
cp "$CALLDIR/linux/set_launcher_icon" "$APPDIR"
|
||||
|
||||
- # Use our own updater, because Mozilla's requires updates signed by Mozilla
|
||||
- check_lfs_file "$CALLDIR/linux/updater.tar.xz"
|
||||
- tar xf "$CALLDIR/linux/updater.tar.xz" --to-stdout updater-$arch > "$APPDIR/updater"
|
||||
- chmod 755 "$APPDIR/updater"
|
||||
-
|
||||
# Copy app files
|
||||
rsync -a "$base_dir/" "$APPDIR/"
|
||||
|
||||
@@ -1041,6 +1031,7 @@ if [ $BUILD_LINUX == 1 ]; then
|
||||
cp -RH "$CALLDIR/modules/zotero-libreoffice-integration/install" "$APPDIR/integration/libreoffice"
|
||||
|
||||
# Copy icons
|
||||
+ mkdir "$APPDIR/icons/"
|
||||
cp "$CALLDIR/linux/icons/icon32.png" "$APPDIR/icons/"
|
||||
cp "$CALLDIR/linux/icons/icon64.png" "$APPDIR/icons/"
|
||||
cp "$CALLDIR/linux/icons/icon128.png" "$APPDIR/icons/"
|
||||
@@ -1,17 +1,27 @@
|
||||
diff --git a/app/scripts/dir_build b/app/scripts/dir_build
|
||||
index 493288ad47..213b6d45b0 100755
|
||||
--- a/app/scripts/dir_build
|
||||
+++ b/app/scripts/dir_build
|
||||
@@ -86,7 +86,7 @@ fi
|
||||
|
||||
CHANNEL="source"
|
||||
|
||||
-hash=$(git -C "$ROOT_DIR" rev-parse --short HEAD)
|
||||
+hash="8c8da79116b97a8221d4ab223c769ce3e0f26332"
|
||||
|
||||
build_dir=$(mktemp -d)
|
||||
cleanup() { rm -rf "$build_dir"; }
|
||||
diff --git a/js-build/build.js b/js-build/build.js
|
||||
index 5e920db6d8..befe280606 100644
|
||||
index 6b39260812..910b715298 100644
|
||||
--- a/js-build/build.js
|
||||
+++ b/js-build/build.js
|
||||
@@ -36,9 +36,9 @@ if (require.main === module) {
|
||||
@@ -36,9 +36,6 @@ if (require.main === module) {
|
||||
...scssFiles.map(scf => getSass(scf, { ignore: ignoreMask }, signatures)),
|
||||
getSymlinks(symlinks, { nodir: true, ignore: ignoreMask }, signatures),
|
||||
getSymlinks(symlinkDirs, { ignore: ignoreMask }, signatures),
|
||||
- getPDFReader(signatures),
|
||||
- getReader(signatures),
|
||||
- getPDFWorker(signatures),
|
||||
- getZoteroNoteEditor(signatures)
|
||||
+ //getPDFReader(signatures),
|
||||
+ //getPDFWorker(signatures),
|
||||
+ //getZoteroNoteEditor(signatures)
|
||||
]);
|
||||
|
||||
await writeSignatures(signatures);
|
||||
|
||||
@@ -1,78 +1,40 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
fetchFromGitHub,
|
||||
buildNpmPackage,
|
||||
|
||||
which,
|
||||
git,
|
||||
nodejs_20,
|
||||
nodejs_24,
|
||||
perl,
|
||||
python3,
|
||||
curl,
|
||||
wget,
|
||||
zip,
|
||||
unzip,
|
||||
xz,
|
||||
gawk,
|
||||
rsync,
|
||||
buildMozillaMach,
|
||||
python311,
|
||||
rustPlatform,
|
||||
cmake,
|
||||
python3Packages,
|
||||
|
||||
wrapGAppsHook3,
|
||||
firefox-esr-140-unwrapped,
|
||||
makeDesktopItem,
|
||||
atk,
|
||||
cairo,
|
||||
dbus-glib,
|
||||
gdk-pixbuf,
|
||||
glib,
|
||||
gtk3,
|
||||
libGL,
|
||||
libva,
|
||||
xorg,
|
||||
libgbm,
|
||||
pango,
|
||||
pciutils,
|
||||
alsaSupport ? true,
|
||||
alsa-lib,
|
||||
jackSupport ? true,
|
||||
libjack2,
|
||||
pulseSupport ? true,
|
||||
libpulseaudio,
|
||||
sndioSupport ? true,
|
||||
sndio,
|
||||
copyDesktopItems,
|
||||
}:
|
||||
let
|
||||
# note-editor needs nodejs 20. Any newer version fails to build zotero's fork of @benrbray/prosemirror-math during npm install.
|
||||
nodejs = nodejs_20;
|
||||
|
||||
pname = "zotero";
|
||||
version = "7.0.30";
|
||||
version = "8.0-unstable-2026-01-06";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "zotero";
|
||||
repo = "zotero";
|
||||
tag = version;
|
||||
hash = "sha256-/DDtKtRM5ddNekItHI6wAY1YoJmqSk77Lfubo/I6KxU=";
|
||||
rev = "8c8da79116b97a8221d4ab223c769ce3e0f26332";
|
||||
hash = "sha256-I5gaxzgN+mHSLqV3AJmXCLhKHEh2EmEw2/sf+YRURIk=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
pdf-js = buildNpmPackage {
|
||||
pname = "zotero-pdf-js";
|
||||
inherit version;
|
||||
nodejs = nodejs_24;
|
||||
inherit version nodejs;
|
||||
src = "${src}/pdf-worker/pdf.js";
|
||||
npmDepsHash = "sha256-/me+tZdxChpPw0bsvD1fWqBgZezsN8EhL/pC7wTDuFE=";
|
||||
prePatch = ''
|
||||
# Drop unmaintained @jazzer fuzzer, it leads to `prebuild: command not found` and is not needed for builds.
|
||||
# TODO: use https://gitlab.alpinelinux.org/alpine/aports/-/raw/master/community/zotero/zotero_drop-jazzer.patch?inline=false instead
|
||||
substituteInPlace package.json \
|
||||
--replace-fail '"@jazzer.js/core": "^2.1.0",' ""
|
||||
'';
|
||||
npmDepsHash = "sha256-KeYAY6EWBZVd3QucDEDtI6lwtTahCEFBFf2Ebib9HKg=";
|
||||
buildPhase = ''
|
||||
npm exec gulp lib-legacy
|
||||
npm exec gulp generic-legacy
|
||||
@@ -88,8 +50,11 @@ let
|
||||
pname = "zotero-epub-js";
|
||||
inherit version nodejs;
|
||||
src = "${src}/reader/epubjs/epub.js";
|
||||
npmDepsHash = "sha256-JYOEDX6SxB4Epwq5PZ5Y+EJO6UGKsOBIm2XIAqOwDO8=";
|
||||
npmBuildScript = "prepare";
|
||||
npmDepsHash = "sha256-6XY6uczPOpMpRHDQbkQRHKBDDRQ/MXIVepGBx1V+h5Q=";
|
||||
buildPhase = ''
|
||||
npm run compile
|
||||
npm run build
|
||||
'';
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -r . $out
|
||||
@@ -98,20 +63,21 @@ let
|
||||
|
||||
pdf-reader = buildNpmPackage {
|
||||
pname = "zotero-pdf-reader";
|
||||
inherit version;
|
||||
nodejs = nodejs_24;
|
||||
inherit version nodejs;
|
||||
src = "${src}/reader";
|
||||
npmDepsHash = "sha256-kD3xA3N0gETKnB1nNl0c7Zkh+3zQEcQtsY7cZBdh8KQ=";
|
||||
npmDepsHash = "sha256-p8O2gIF0S7QO0AR9TPPQsWUtRnKnf58zSl3JZN0lnuc=";
|
||||
patches = [ ./pdf-reader-locales.patch ];
|
||||
postPatch = ''
|
||||
rm -rf pdfjs/pdf.js
|
||||
cp -r ${pdf-js} pdfjs/pdf.js
|
||||
chmod -R u+w pdfjs/pdf.js
|
||||
|
||||
rm -rf epubjs/epub.js
|
||||
cp -r ${epub-js} epubjs/epub.js
|
||||
chmod -R u+w epubjs/epub.js
|
||||
|
||||
substituteInPlace epubjs/epub.js/package.json \
|
||||
--replace-fail '"prepare":' '"prepare_old":'
|
||||
mkdir -p locales/en-US/
|
||||
cp -r ${src}/chrome/locale/en-US/zotero/* locales/en-US/
|
||||
'';
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
@@ -141,82 +107,19 @@ let
|
||||
pname = "zotero-note-editor";
|
||||
inherit version nodejs;
|
||||
src = "${src}/note-editor";
|
||||
npmDepsHash = "sha256-9DJNlbyRgiipjrpiXGVFOl5zALJOwLCyw8TRkfwm5Ns=";
|
||||
npmDepsHash = "sha256-3KSSm8oCNOIDN/ZHhDbx7+cF20qtjtZwpnCOOWe3WQc=";
|
||||
makeCacheWritable = true;
|
||||
patches = [ ./pdf-reader-locales.patch ];
|
||||
postPatch = ''
|
||||
mkdir -p locales/en-US/
|
||||
cp -r ${src}/chrome/locale/en-US/zotero/* locales/en-US/
|
||||
'';
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -r . $out
|
||||
'';
|
||||
};
|
||||
|
||||
rust-cbindgen-026 = rustPlatform.buildRustPackage rec {
|
||||
pname = "rust-cbindgen";
|
||||
version = "0.26.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mozilla";
|
||||
repo = "cbindgen";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-gyNZAuxpeOjuC+Rh9jAyHSBQRRYUlYoIrBKuCFg3Hao=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-Mn6TigV/+zqG5CsjHMDYAN54P6qw4G03g7JuUM7GbPw=";
|
||||
|
||||
#buildInputs = lib.optional stdenv.isDarwin Security;
|
||||
|
||||
nativeCheckInputs = [
|
||||
cmake
|
||||
python3Packages.cython
|
||||
];
|
||||
|
||||
checkFlags = [
|
||||
# Disable tests that require rust unstable features
|
||||
# https://github.com/eqrion/cbindgen/issues/338
|
||||
"--skip test_expand"
|
||||
"--skip test_bitfield"
|
||||
"--skip lib_default_uses_debug_build"
|
||||
"--skip lib_explicit_debug_build"
|
||||
"--skip lib_explicit_release_build"
|
||||
"--skip bin_explicit_release_build"
|
||||
"--skip bin_default_uses_debug_build"
|
||||
"--skip bin_explicit_debug_build"
|
||||
]
|
||||
++ lib.optionals stdenv.isDarwin [
|
||||
# WORKAROUND: test_body fails when using clang
|
||||
# https://github.com/eqrion/cbindgen/issues/628
|
||||
"--skip test_body"
|
||||
];
|
||||
|
||||
meta = {
|
||||
license = lib.licenses.mpl20;
|
||||
};
|
||||
};
|
||||
|
||||
firefox-115 =
|
||||
(buildMozillaMach rec {
|
||||
pname = "firefox-esr-115";
|
||||
version = "115.31.0esr";
|
||||
applicationName = "Mozilla Firefox ESR";
|
||||
src = fetchurl {
|
||||
url = "mirror://mozilla/firefox/releases/${version}/source/firefox-${version}.source.tar.xz";
|
||||
sha512 = "5a56764be6f3d1a4c9f2ee289ec2f220670ad3b99e9ab83a63e24f5fcd023611af7c9bdb81f9baef0d5fe003576d56cee01cf563f6686905363d4c925e4022e2";
|
||||
};
|
||||
|
||||
meta = {
|
||||
platforms = lib.platforms.unix;
|
||||
badPlatforms = lib.platforms.darwin;
|
||||
broken = stdenv.buildPlatform.is32bit;
|
||||
# since Firefox 60, build on 32-bit platforms fails with "out of memory".
|
||||
# not in `badPlatforms` because cross-compilation on 64-bit machine might work.
|
||||
license = lib.licenses.mpl20;
|
||||
};
|
||||
}).override
|
||||
{
|
||||
python3 = python311;
|
||||
elfhackSupport = false;
|
||||
rust-cbindgen = rust-cbindgen-026;
|
||||
};
|
||||
|
||||
in
|
||||
buildNpmPackage rec {
|
||||
inherit
|
||||
@@ -226,32 +129,26 @@ buildNpmPackage rec {
|
||||
nodejs
|
||||
;
|
||||
|
||||
npmDepsHash = "sha256-qWeUeiwM6sCNovSoaEP3b42VTnCFSWLK9y8qPnWcSTE=";
|
||||
npmDepsHash = "sha256-IVaT/O83kCGT7MGsTSblMKfVWeNBIpA9VJIWyikJrpk=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
#which
|
||||
git
|
||||
nodejs
|
||||
perl
|
||||
python3
|
||||
curl
|
||||
wget
|
||||
zip
|
||||
unzip
|
||||
xz
|
||||
gawk
|
||||
rsync
|
||||
copyDesktopItems
|
||||
];
|
||||
|
||||
patches = [
|
||||
./git-revs.patch
|
||||
./avoid-xulrunner-fetch.patch
|
||||
./build-fixes.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace app/scripts/dir_build \
|
||||
--replace-quiet 'hash=`git -C "$ROOT_DIR" rev-parse --short HEAD`' 'hash="e9281c51fd464246b60eee4b3ba999eb4f67d36f"'
|
||||
|
||||
rm -rf reader
|
||||
cp -r ${pdf-reader} reader
|
||||
|
||||
@@ -271,9 +168,10 @@ buildNpmPackage rec {
|
||||
|
||||
npm run build
|
||||
|
||||
# Place firefox files at the right place
|
||||
mkdir -p app/xulrunner
|
||||
cp -r ${firefox-115}/lib/firefox/ app/xulrunner/
|
||||
# Place firefox files at the right place.
|
||||
# The correct firefox version can be found in zotero/app/config.sh at `GECKO_VERSION_LINUX`.
|
||||
mkdir -p app/xulrunner/firefox-${stdenv.targetPlatform.parsed.kernel.name}-${stdenv.targetPlatform.parsed.cpu.name}
|
||||
cp -r ${firefox-esr-140-unwrapped}/lib/firefox/. app/xulrunner/firefox-${stdenv.targetPlatform.parsed.kernel.name}-${stdenv.targetPlatform.parsed.cpu.name}
|
||||
chmod -R u+w app/xulrunner/
|
||||
|
||||
app/scripts/dir_build
|
||||
@@ -302,57 +200,28 @@ buildNpmPackage rec {
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/lib/
|
||||
# Copy package contents
|
||||
mkdir -p $out/lib/ $out/bin/
|
||||
cp -r app/staging/*/. $out/lib/
|
||||
|
||||
# Add binary to bin/
|
||||
ln -s ../lib/zotero $out/bin/zotero
|
||||
|
||||
# Install icons
|
||||
for size in 32 64 128; do
|
||||
install -Dm444 "app/linux/icons/icon$size.png" "$out/share/icons/hicolor/''${size}x$size/apps/zotero.png"
|
||||
done
|
||||
install -Dm444 "app/linux/icons/symbolic.svg" "$out/share/icons/hicolor/scalable/apps/zotero-symbolic.svg"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
/*
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
# Copy package contents to the output directory
|
||||
mkdir -p "$prefix/usr/lib/zotero-bin-${version}"
|
||||
cp -r * "$prefix/usr/lib/zotero-bin-${version}"
|
||||
mkdir -p "$out/bin"
|
||||
ln -s "$prefix/usr/lib/zotero-bin-${version}/zotero" "$out/bin/"
|
||||
|
||||
# Install desktop file and icons
|
||||
mkdir -p $out/share/applications
|
||||
cp ${desktopItem}/share/applications/* $out/share/applications/
|
||||
for size in 32 64 128; do
|
||||
install -Dm444 icons/icon''${size}.png \
|
||||
$out/share/icons/hicolor/''${size}x''${size}/apps/zotero.png
|
||||
done
|
||||
install -Dm444 icons/symbolic.svg \
|
||||
$out/share/icons/hicolor/symbolic/apps/zotero-symbolic.svg
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
for executable in \
|
||||
zotero-bin plugin-container updater vaapitest \
|
||||
minidump-analyzer glxtest
|
||||
do
|
||||
if [ -e "$out/usr/lib/zotero-bin-${version}/$executable" ]; then
|
||||
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
"$out/usr/lib/zotero-bin-${version}/$executable"
|
||||
fi
|
||||
done
|
||||
find . -executable -type f -exec \
|
||||
patchelf --set-rpath "$libPath" \
|
||||
"$out/usr/lib/zotero-bin-${version}/{}" \;
|
||||
'';
|
||||
*/
|
||||
|
||||
meta = {
|
||||
homepage = "https://www.zotero.org";
|
||||
description = "Collect, organize, cite, and share your research sources";
|
||||
mainProgram = "zotero";
|
||||
license = lib.licenses.agpl3Only;
|
||||
platforms = lib.platforms.all;
|
||||
platforms = firefox-esr-140-unwrapped.meta.platforms;
|
||||
maintainers = with lib.maintainers; [
|
||||
atila
|
||||
justanotherariel
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
diff --git a/webpack.zotero-locale-plugin.js b/webpack.zotero-locale-plugin.js
|
||||
index fb6eb28..e5e040f 100644
|
||||
--- a/webpack.zotero-locale-plugin.js
|
||||
+++ b/webpack.zotero-locale-plugin.js
|
||||
@@ -52,7 +52,7 @@ class ZoteroLocalePlugin {
|
||||
}
|
||||
|
||||
// If the commit hash has changed
|
||||
- if (lastCommitHash !== this.commitHash) {
|
||||
+ if (false) {
|
||||
console.log(`Detected commit hash change (was: ${lastCommitHash}, now: ${this.commitHash}). Clearing and downloading locale files...`);
|
||||
|
||||
// Remove and recreate the output directory
|
||||
@@ -1,52 +0,0 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, rustPlatform
|
||||
, cmake
|
||||
, python3Packages
|
||||
, Security
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "rust-cbindgen";
|
||||
version = "0.26.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mozilla";
|
||||
repo = "cbindgen";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-gyNZAuxpeOjuC+Rh9jAyHSBQRRYUlYoIrBKuCFg3Hao=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-pdTxhECAZzBx5C01Yx7y/OGwhhAdlEDpqLBdvQcb8bc=";
|
||||
|
||||
buildInputs = lib.optional stdenv.isDarwin Security;
|
||||
|
||||
nativeCheckInputs = [
|
||||
cmake
|
||||
python3Packages.cython
|
||||
];
|
||||
|
||||
checkFlags = [
|
||||
# Disable tests that require rust unstable features
|
||||
# https://github.com/eqrion/cbindgen/issues/338
|
||||
"--skip test_expand"
|
||||
"--skip test_bitfield"
|
||||
"--skip lib_default_uses_debug_build"
|
||||
"--skip lib_explicit_debug_build"
|
||||
"--skip lib_explicit_release_build"
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
# WORKAROUND: test_body fails when using clang
|
||||
# https://github.com/eqrion/cbindgen/issues/628
|
||||
"--skip test_body"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
changelog = "https://github.com/mozilla/cbindgen/blob/v${version}/CHANGES";
|
||||
description = "Project for generating C bindings from Rust code";
|
||||
mainProgram = "cbindgen";
|
||||
homepage = "https://github.com/mozilla/cbindgen";
|
||||
license = licenses.mpl20;
|
||||
maintainers = with maintainers; [ hexa ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user