20 stdenv.mkDerivation rec {
22 version = "7.0.0-beta.83+066eda731";
26 escapedVersion = lib.replaceStrings ["+"] ["%2B"] version;
29 url = "https://download.zotero.org/client/beta/${escapedVersion}/Zotero-${escapedVersion}_linux-x86_64.tar.bz2";
30 hash = "sha256-wqew12/Icv4XS+IJRVcf1Rh/ipqBhe8QGkP8ErfS4J0=";
34 nativeBuildInputs = [ wrapGAppsHook3 ];
36 libPath = lib.makeLibraryPath [
58 ] + ":" + lib.makeSearchPathOutput "lib" "lib64" [ stdenv.cc.cc ];
60 desktopItem = makeDesktopItem {
62 exec = "zotero -url %U";
64 comment = meta.description;
65 desktopName = "Zotero";
66 genericName = "Reference Management";
67 categories = [ "Office" "Database" ];
69 mimeTypes = [ "x-scheme-handler/zotero" "text/plain" ];
75 # Copy package contents to the output directory
76 mkdir -p "$prefix/usr/lib/zotero-bin-${version}"
77 cp -r * "$prefix/usr/lib/zotero-bin-${version}"
79 ln -s "$prefix/usr/lib/zotero-bin-${version}/zotero" "$out/bin/"
81 # Install desktop file and icons
82 mkdir -p $out/share/applications
83 cp ${desktopItem}/share/applications/* $out/share/applications/
84 for size in 32 64 128; do
85 install -Dm444 icons/icon''${size}.png \
86 $out/share/icons/hicolor/''${size}x''${size}/apps/zotero.png
88 install -Dm444 icons/symbolic.svg \
89 $out/share/icons/hicolor/symbolic/apps/zotero-symbolic.svg
96 zotero-bin plugin-container updater vaapitest \
97 minidump-analyzer glxtest
99 if [ -e "$out/usr/lib/zotero-bin-${version}/$executable" ]; then
100 patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
101 "$out/usr/lib/zotero-bin-${version}/$executable"
104 find . -executable -type f -exec \
105 patchelf --set-rpath "$libPath" \
106 "$out/usr/lib/zotero-bin-${version}/{}" \;
110 homepage = "https://www.zotero.org";
111 description = "Collect, organize, cite, and share your research sources";
112 mainProgram = "zotero";
113 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
114 license = licenses.agpl3Only;
115 platforms = [ "x86_64-linux" ];
116 maintainers = with maintainers; [ atila justanotherariel ];