2023-04-18 10:22:05 +00:00
|
|
|
{ pkgs, runCommandLocal, zstd, lib, buildFHSEnvChroot }:
|
2023-02-27 15:10:45 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
zotero-tar = builtins.fetchurl {
|
2023-06-16 12:56:17 +00:00
|
|
|
url = "https://repo.archlinuxcn.org/aarch64/zotero-6.0.26-1-aarch64.pkg.tar.zst";
|
|
|
|
sha256 = "sha256:0hz9y67bbc9rc6sp8v5i6aa890qvbngpf6hxx2krxrsh3xxn83y2";
|
2023-02-27 15:10:45 +00:00
|
|
|
};
|
|
|
|
|
2023-04-18 10:22:05 +00:00
|
|
|
zotero-src = runCommandLocal "zotero-src" { } ''
|
2023-02-27 15:10:45 +00:00
|
|
|
mkdir -p $out
|
|
|
|
export PATH=${zstd}/bin:$PATH
|
|
|
|
tar xvf ${zotero-tar} -C $out
|
|
|
|
'';
|
|
|
|
in
|
2023-04-18 10:22:05 +00:00
|
|
|
buildFHSEnvChroot {
|
2023-02-27 15:10:45 +00:00
|
|
|
name = "zotero";
|
|
|
|
targetPkgs = pkgs: with pkgs; [ gtk3 dbus-glib libstartup_notification libpaper ] ++ (with pkgs.xorg; [ libX11 libXt ]);
|
|
|
|
runScript = "env QT_SCALE_FACTOR=2 ${zotero-src}/usr/lib/zotero/zotero";
|
2023-06-16 12:56:17 +00:00
|
|
|
|
|
|
|
extraInstallCommands = ''
|
|
|
|
cp --no-preserve=mode,ownership -r ${zotero-src}/usr/share $out/share
|
|
|
|
sed -i "s#/usr/bin/zotero#zotero#g" $out/share/applications/zotero.desktop
|
|
|
|
'';
|
2023-02-27 15:10:45 +00:00
|
|
|
}
|