summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Hallsby <karl@hallsby.com>2025-03-20 00:33:09 -0500
committerHilton Chain <hako@ultrarare.space>2025-04-04 21:15:10 +0800
commit371b49c9ffbf7e12d08b3cf62eda64a2a8374bbf (patch)
tree3339fe6ae0c49528565c744308718dfffcea5c63
parentb79a73553c8ee351a8194939d87c1df8fe12ee14 (diff)
nongnu: zotero: Update to 7.0.15.
* nongnu/packages/productivity.scm (zotero): Update to 7.0.15. [arguments]<#:phases>: Add 'disable-nonreproducible-features. Adjust 'install-icons accordingly. [native-inputs]: Add unzip, zip. Co-authored-by: antlers <antlers@illucid.net> Co-authored-by: Raven Hallsby <karl@hallsby.com> Modified-by: Hilton Chain <hako@ultrarare.space> Signed-off-by: Hilton Chain <hako@ultrarare.space>
-rw-r--r--nongnu/packages/productivity.scm35
1 files changed, 22 insertions, 13 deletions
diff --git a/nongnu/packages/productivity.scm b/nongnu/packages/productivity.scm
index 0350cfd..41e0a45 100644
--- a/nongnu/packages/productivity.scm
+++ b/nongnu/packages/productivity.scm
@@ -1,6 +1,7 @@
;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2023 Giacomo Leidi <goodoldpaul@autistici.org>
;;; Copyright © 2024, 2025 Raven Hallsby <karl@hallsby.com>
+;;; Copyright © 2024 antlers <antlers@illucid.net>
(define-module (nongnu packages productivity)
#:use-module (gnu packages base)
@@ -126,7 +127,7 @@ synchronization.")
(define-public zotero
(package
(name "zotero")
- (version "6.0.35")
+ (version "7.0.15")
(source
(origin
;; Can switch to git-fetch from Github too!
@@ -136,16 +137,7 @@ synchronization.")
version "/Zotero-" version "_linux-x86_64.tar.bz2"))
(sha256
(base32
- "17f9an43jwnqpcslbvnhg7hrzkvs2whzwg4ysdgy2gl4m6cln18w"))
- (snippet
- #~(begin
- (use-modules (guix build utils))
- ;; Disable Zotero's automatic update feature.
- (substitute* "defaults/preferences/prefs.js"
- (("pref\\(\"app.update.enabled\", true\\)")
- "pref(\"app.update.enabled\", false)")
- (("pref\\(\"app.update.auto\", true\\)")
- "pref(\"app.update.auto\", false)"))))))
+ "1gr38pmnx2gcb0cmn1zncxgj5hbwpx7m4x720xg04b2n4g58lsni"))))
(build-system chromium-binary-build-system)
(arguments
(list
@@ -156,6 +148,22 @@ synchronization.")
#~'("zotero-bin")
#:phases
#~(modify-phases %standard-phases
+ (add-after 'unpack 'disable-nonreproducible-features
+ (lambda _
+ ;; Disable Zotero's automatic update feature. Must unzip a
+ ;; compressed file to make this change and re-zip it.
+ (invoke "unzip" "app/omni.ja" "defaults/preferences/zotero.js")
+ (substitute* "defaults/preferences/zotero.js"
+ (("pref\\(\"app.update.enabled\", true\\)")
+ "pref(\"app.update.enabled\", false)")
+ (("pref\\(\"app.update.auto\", true\\)")
+ "pref(\"app.update.auto\", false)")
+ (("pref\\(\"extensions.zoteroOpenOfficeIntegration.skipInstallation\", false\\)")
+ "pref(\"extensions.zoteroOpenOfficeIntegration.skipInstallation\", true)"))
+ (invoke "zip" "-mf" "app/omni.ja" "defaults/preferences/zotero.js")
+ ;; Clean up after ourselves
+ (delete-file-recursively "defaults/preferences")
+ (delete-file-recursively "defaults")))
(add-before 'install-wrapper 'install-entrypoint
(lambda _
(let* ((bin (string-append #$output "/bin")))
@@ -194,13 +202,13 @@ synchronization.")
(#f "Collect, organize, cite, and share your research sources")))))
(add-after 'install 'install-icons
(lambda _
- (let ((icon-sizes (list 16 32 48 256)))
+ (let ((icon-sizes (list 32 64 128)))
(for-each
(lambda (size)
(mkdir-p (string-append #$output "/share/icons/hicolor/"
size "x" size "/apps"))
(copy-file
- (string-append "chrome/icons/default/default" size ".png")
+ (string-append "icons/icon" size ".png")
(string-append #$output "/share/icons/hicolor/"
size "x" size "/apps/zotero.png")))
(map number->string icon-sizes))))))))
@@ -224,6 +232,7 @@ synchronization.")
;; "ulimit -n 4096\n"
;; #$output "/bin/zotero-bin" " -app " #$output "/application.ini" " \"$@\""))))
;; (chmod file #o755))))
+ (native-inputs (list zip unzip))
(inputs (list dbus-glib libxt))
(synopsis "Collect, organize, cite, and share your research sources")
;; If we build from source, then we may be able to support more