59c1dde695
automated update of handy appimage version and hash Co-authored-by: gitea actions <actions@localhost> Reviewed-on: #3
29 lines
967 B
Nix
29 lines
967 B
Nix
{...}: {
|
|
perSystem = {pkgs, ...}: {
|
|
packages.handy = pkgs.appimageTools.wrapType2 rec {
|
|
pname = "handy";
|
|
version = "0.7.9";
|
|
|
|
src = pkgs.fetchurl {
|
|
url = "https://github.com/cjpais/Handy/releases/download/v${version}/Handy_${version}_amd64.AppImage";
|
|
hash = "sha256-iSibRpme8xJfumhjJ2LzkrtFwV8j9nHajMnBygBFLz4=";
|
|
};
|
|
|
|
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
|
|
fi
|
|
|
|
if [ -d ${contents}/usr/share/icons ]; then
|
|
cp -r ${contents}/usr/share/icons $out/share
|
|
fi
|
|
'';
|
|
};
|
|
};
|
|
}
|