-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
miru: darwin support, add maintainer
- Loading branch information
Matteo Pacini
committed
Jun 23, 2024
1 parent
e0ba5d6
commit 45cfa86
Showing
3 changed files
with
79 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
stdenvNoCC, | ||
fetchurl, | ||
unzip, | ||
makeWrapper, | ||
|
||
pname, | ||
version, | ||
meta, | ||
}: | ||
stdenvNoCC.mkDerivation rec { | ||
inherit pname version meta; | ||
|
||
src = fetchurl { | ||
url = "https://github.com/ThaUnknown/miru/releases/download/v${version}/mac-Miru-${version}-mac.zip"; | ||
hash = "sha256-OakGB5Fz1Tlxa/Uu7xHlKoEF9VRfWFQ9CjsR0eCRyQw="; | ||
}; | ||
|
||
sourceRoot = "."; | ||
|
||
nativeBuildInputs = [ | ||
unzip | ||
makeWrapper | ||
]; | ||
|
||
installPhase = '' | ||
runHook preInstall | ||
mkdir -p $out/{bin,Applications} | ||
cp -r Miru.app $out/Applications/ | ||
makeWrapper $out/Applications/Miru.app/Contents/MacOS/Miru $out/bin/miru | ||
runHook postInstall | ||
''; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
fetchurl, | ||
appimageTools, | ||
|
||
pname, | ||
version, | ||
meta, | ||
}: | ||
|
||
appimageTools.wrapType2 rec { | ||
inherit pname version meta; | ||
|
||
src = fetchurl { | ||
url = "https://github.com/ThaUnknown/miru/releases/download/v${version}/linux-Miru-${version}.AppImage"; | ||
name = "${pname}-${version}.AppImage"; | ||
sha256 = "sha256-aPutbJthUhZtBYkYuUB5v88OdhOrcnqw4AhnepfO1B4="; | ||
}; | ||
|
||
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}' | ||
''; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters