Package feishin

current nix packaging doesn't have newest version because of electron issues
This commit is contained in:
GHOSCHT 2024-01-07 15:39:11 +01:00
parent c89472f897
commit a019e2f168
Signed by: ghoscht
GPG key ID: 2C2C1C62A5388E82

26
pkgs/feishin/default.nix Normal file
View file

@ -0,0 +1,26 @@
{
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
'';
}