39 , gsettings-desktop-schemas
42 stdenv.mkDerivation rec {
48 "https://download.zotero.org/client/release/${version}/Zotero-${version}_linux-x86_64.tar.bz2";
49 hash = "sha256-4XQZ1xw9Qtk3SzHMsEUk+HuIYtHDAOMgpwzbAd5QQpU=";
52 nativeBuildInputs = [ wrapGAppsHook ];
54 [ gsettings-desktop-schemas glib gtk3 gnome.adwaita-icon-theme dconf ];
61 libPath = lib.makeLibraryPath [
93 ] + ":" + lib.makeSearchPathOutput "lib" "lib64" [ stdenv.cc.cc ];
96 sed -i '/pref("app.update.enabled", true);/c\pref("app.update.enabled", false);' defaults/preferences/prefs.js
99 desktopItem = makeDesktopItem {
101 exec = "zotero -url %U";
103 comment = meta.description;
104 desktopName = "Zotero";
105 genericName = "Reference Management";
106 categories = [ "Office" "Database" ];
107 startupNotify = true;
108 mimeTypes = [ "x-scheme-handler/zotero" "text/plain" ];
114 mkdir -p "$prefix/usr/lib/zotero-bin-${version}"
115 cp -r * "$prefix/usr/lib/zotero-bin-${version}"
117 ln -s "$prefix/usr/lib/zotero-bin-${version}/zotero" "$out/bin/"
119 # install desktop file and icons.
120 mkdir -p $out/share/applications
121 cp ${desktopItem}/share/applications/* $out/share/applications/
122 for size in 16 32 48 256; do
123 install -Dm444 chrome/icons/default/default$size.png \
124 $out/share/icons/hicolor/''${size}x''${size}/apps/zotero.png
128 zotero-bin plugin-container \
129 updater minidump-analyzer
131 if [ -e "$out/usr/lib/zotero-bin-${version}/$executable" ]; then
132 patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
133 "$out/usr/lib/zotero-bin-${version}/$executable"
136 find . -executable -type f -exec \
137 patchelf --set-rpath "$libPath" \
138 "$out/usr/lib/zotero-bin-${version}/{}" \;
145 --prefix PATH : ${lib.makeBinPath [ coreutils ]}
150 homepage = "https://www.zotero.org";
151 description = "Collect, organize, cite, and share your research sources";
152 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
153 license = licenses.agpl3Only;
154 platforms = platforms.linux;
155 maintainers = with maintainers; [ i077 ];