nix-config/pkgs/feishin/default.nix
GHOSCHT a019e2f168
Package feishin
current nix packaging doesn't have newest version because of electron issues
2024-01-07 15:39:11 +01:00

26 lines
810 B
Nix

{
lib,
appimageTools,
fetchurl,
}: let
pname = "feishin";
version = "0.5.3";
src = fetchurl {
url = "https://github.com/jeffvli/feishin/releases/download/v${version}/Feishin-${version}-linux-x86_64.AppImage";
hash = "sha256-1JlsEBLVBaaae9NDGsGI5CyE+XcBunSt0CWQFpkL87w=";
};
appimageContents = appimageTools.extractType2 {inherit pname version src;};
in
appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
install -Dm444 ${appimageContents}/feishin.desktop -t $out/share/applications
substituteInPlace $out/share/applications/feishin.desktop \
--replace 'Exec=AppRun --no-sandbox %U' 'Exec=${pname}'
cp -r ${appimageContents}/usr/share/icons $out/share
'';
}