1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-17 19:21:04 +00:00
nixpkgs/pkgs/by-name/mi/miru/linux.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
896 B
Nix
Raw Permalink Normal View History

2024-06-21 01:06:20 +01:00
{
fetchurl,
appimageTools,
pname,
version,
meta,
2024-07-07 21:54:26 +01:00
passthru,
2024-06-21 01:06:20 +01:00
}:
appimageTools.wrapType2 rec {
2024-07-07 21:54:26 +01:00
inherit
pname
version
meta
passthru
;
2024-06-21 01:06:20 +01:00
src = fetchurl {
url = "https://github.com/ThaUnknown/miru/releases/download/v${version}/linux-Miru-${version}.AppImage";
name = "${pname}-${version}.AppImage";
2024-11-12 09:10:51 +00:00
hash = "sha256-4ueVgIcIi/RIFRoDKStiNqszfaIXZ9dfagddzCVaSRs=";
2024-06-21 01:06:20 +01:00
};
extraInstallCommands =
let
contents = appimageTools.extractType2 { inherit pname version src; };
in
''
mkdir -p "$out/share/applications"
mkdir -p "$out/share/lib/miru"
cp -r ${contents}/{locales,resources} "$out/share/lib/miru"
cp -r ${contents}/usr/* "$out"
cp "${contents}/${pname}.desktop" "$out/share/applications/"
substituteInPlace $out/share/applications/${pname}.desktop --replace 'Exec=AppRun' 'Exec=${pname}'
'';
}