21 stdenv.mkDerivation rec {
23 version = "7.0.0-beta.111+b4f6c050e";
27 escapedVersion = lib.replaceStrings [ "+" ] [ "%2B" ] version;
30 url = "https://download.zotero.org/client/beta/${escapedVersion}/Zotero-${escapedVersion}_linux-x86_64.tar.bz2";
31 hash = "sha256-pZsmS4gKCT8UAjz9IJg5C7n4kk7bWT/7H5ONF20CzPM=";
35 nativeBuildInputs = [ wrapGAppsHook3 ];
62 + lib.makeSearchPathOutput "lib" "lib64" [ stdenv.cc.cc ];
64 desktopItem = makeDesktopItem {
66 exec = "zotero -url %U";
68 comment = meta.description;
69 desktopName = "Zotero";
70 genericName = "Reference Management";
77 "x-scheme-handler/zotero"
85 # Copy package contents to the output directory
86 mkdir -p "$prefix/usr/lib/zotero-bin-${version}"
87 cp -r * "$prefix/usr/lib/zotero-bin-${version}"
89 ln -s "$prefix/usr/lib/zotero-bin-${version}/zotero" "$out/bin/"
91 # Install desktop file and icons
92 mkdir -p $out/share/applications
93 cp ${desktopItem}/share/applications/* $out/share/applications/
94 for size in 32 64 128; do
95 install -Dm444 icons/icon''${size}.png \
96 $out/share/icons/hicolor/''${size}x''${size}/apps/zotero.png
98 install -Dm444 icons/symbolic.svg \
99 $out/share/icons/hicolor/symbolic/apps/zotero-symbolic.svg
106 zotero-bin plugin-container updater vaapitest \
107 minidump-analyzer glxtest
109 if [ -e "$out/usr/lib/zotero-bin-${version}/$executable" ]; then
110 patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
111 "$out/usr/lib/zotero-bin-${version}/$executable"
114 find . -executable -type f -exec \
115 patchelf --set-rpath "$libPath" \
116 "$out/usr/lib/zotero-bin-${version}/{}" \;
120 homepage = "https://www.zotero.org";
121 description = "Collect, organize, cite, and share your research sources";
122 mainProgram = "zotero";
123 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
124 license = licenses.agpl3Only;
125 platforms = [ "x86_64-linux" ];
126 maintainers = with maintainers; [