25 stdenv.mkDerivation rec {
26 inherit pname version meta;
29 url = "https://download.zotero.org/client/release/${version}/Zotero-${version}_linux-x86_64.tar.bz2";
30 hash = "sha256-utiqS4/PvlkQesqTOyEvj8uwW1sDxlqjnhv6GFfY5uk=";
34 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}/{}" \;