21 stdenv.mkDerivation rec {
26 url = "https://download.zotero.org/client/release/${version}/Zotero-${version}_linux-x86_64.tar.bz2";
27 hash = "sha256-ERL+zKjNOz+j/Q5dyTXVczLnwaTl/SzgSaKVkA9uyJ4=";
31 nativeBuildInputs = [ wrapGAppsHook3 ];
33 libPath = lib.makeLibraryPath [
56 ] + ":" + lib.makeSearchPathOutput "lib" "lib64" [ stdenv.cc.cc ];
58 desktopItem = makeDesktopItem {
60 exec = "zotero -url %U";
62 comment = meta.description;
63 desktopName = "Zotero";
64 genericName = "Reference Management";
65 categories = [ "Office" "Database" ];
67 mimeTypes = [ "x-scheme-handler/zotero" "text/plain" ];
73 # Copy package contents to the output directory
74 mkdir -p "$prefix/usr/lib/zotero-bin-${version}"
75 cp -r * "$prefix/usr/lib/zotero-bin-${version}"
77 ln -s "$prefix/usr/lib/zotero-bin-${version}/zotero" "$out/bin/"
79 # Install desktop file and icons
80 mkdir -p $out/share/applications
81 cp ${desktopItem}/share/applications/* $out/share/applications/
82 for size in 32 64 128; do
83 install -Dm444 icons/icon''${size}.png \
84 $out/share/icons/hicolor/''${size}x''${size}/apps/zotero.png
86 install -Dm444 icons/symbolic.svg \
87 $out/share/icons/hicolor/symbolic/apps/zotero-symbolic.svg
94 zotero-bin plugin-container updater vaapitest \
95 minidump-analyzer glxtest
97 if [ -e "$out/usr/lib/zotero-bin-${version}/$executable" ]; then
98 patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
99 "$out/usr/lib/zotero-bin-${version}/$executable"
102 find . -executable -type f -exec \
103 patchelf --set-rpath "$libPath" \
104 "$out/usr/lib/zotero-bin-${version}/{}" \;
108 homepage = "https://www.zotero.org";
109 description = "Collect, organize, cite, and share your research sources";
110 mainProgram = "zotero";
111 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
112 license = licenses.agpl3Only;
113 platforms = [ "x86_64-linux" ];
114 maintainers = with maintainers; [ atila justanotherariel ];