mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 21:03:15 +00:00
38 lines
896 B
Nix
38 lines
896 B
Nix
{
|
|
fetchurl,
|
|
appimageTools,
|
|
|
|
pname,
|
|
version,
|
|
meta,
|
|
passthru,
|
|
}:
|
|
|
|
appimageTools.wrapType2 rec {
|
|
inherit
|
|
pname
|
|
version
|
|
meta
|
|
passthru
|
|
;
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/ThaUnknown/miru/releases/download/v${version}/linux-Miru-${version}.AppImage";
|
|
name = "${pname}-${version}.AppImage";
|
|
hash = "sha256-J632TswcRC6CnK5ppqdbY97V3Q1ADDNgX0joxC5ybmM=";
|
|
};
|
|
|
|
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}'
|
|
'';
|
|
}
|