Files
nixos-config/modules/pkgs/handy.nix
T
thomas 6efa23d145
helium update / update-helium (push) Successful in 13s
zen browser update / update-zen-browser (push) Successful in 14s
handy update / update-handy (push) Successful in 9s
t3code update / update-t3code (push) Successful in 12s
fix handy
2026-04-01 14:49:46 +01:00

30 lines
1.0 KiB
Nix

{...}: {
perSystem = {pkgs, ...}: {
packages.handy = pkgs.appimageTools.wrapType2 rec {
pname = "handy";
version = "0.8.0";
src = pkgs.fetchurl {
url = "https://github.com/cjpais/Handy/releases/download/v${version}/Handy_${version}_amd64.AppImage";
hash = "sha256-PLcssfd6iMx51mglAJ7D4+67HFazwfhJMImgU9WiNDk=";
};
extraInstallCommands = let
contents = pkgs.appimageTools.extract {inherit pname version src;};
in ''
desktop_file=$(find ${contents} -name "*.desktop" | head -n1)
if [ -n "$desktop_file" ]; then
install -m 444 -D "$desktop_file" "$out/share/applications/${pname}.desktop"
substituteInPlace "$out/share/applications/${pname}.desktop" \
--replace 'Exec=AppRun' 'Exec=${pname}' || true
sed -i -E 's|^Exec=.*$|Exec=${pname}|g' "$out/share/applications/${pname}.desktop" || true
fi
if [ -d ${contents}/usr/share/icons ]; then
cp -r ${contents}/usr/share/icons $out/share
fi
'';
};
};
}