mist: add mist and mist-cli packages (#445764)

This commit is contained in:
Sandro
2026-05-07 00:32:49 +00:00
committed by GitHub
3 changed files with 114 additions and 0 deletions
+6
View File
@@ -20407,6 +20407,12 @@
githubId = 31112680;
name = "oidro";
};
ojsef39 = {
name = "Josef Hofer";
github = "ojsef39";
email = "me+github@jhofer.de";
githubId = 43563019;
};
ok-nick = {
email = "nick.libraries@gmail.com";
github = "ok-nick";
+65
View File
@@ -0,0 +1,65 @@
{
lib,
stdenvNoCC,
fetchurl,
installShellFiles,
xar,
cpio,
nix-update-script,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "mist-cli";
version = "2.2";
src = fetchurl {
url = "https://github.com/ninxsoft/mist-cli/releases/download/v${finalAttrs.version}/mist-cli.${finalAttrs.version}.pkg";
hash = "sha256-d+tm37X6JC5r23D8WTsxIkL0RU4U58pJmLermwjOgCE=";
};
__structuredAttrs = true;
strictDeps = true;
nativeBuildInputs = [
installShellFiles
xar
cpio
];
dontBuild = true;
unpackPhase = ''
runHook preUnpack
xar -xf "$src"
gunzip -dc Payload | cpio -idmv
runHook postUnpack
'';
installPhase = ''
runHook preInstall
install -D usr/local/bin/mist "$out/bin/mist"
runHook postInstall
'';
postInstall = lib.optionalString (stdenvNoCC.buildPlatform.canExecute stdenvNoCC.hostPlatform) ''
installShellCompletion --cmd mist \
--bash <($out/bin/mist --generate-completion-script bash) \
--fish <($out/bin/mist --generate-completion-script fish) \
--zsh <($out/bin/mist --generate-completion-script zsh)
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Command-line tool that downloads macOS firmwares and installers";
homepage = "https://github.com/ninxsoft/mist-cli";
license = lib.licenses.mit;
mainProgram = "mist";
maintainers = with lib.maintainers; [ ojsef39 ];
platforms = lib.platforms.darwin;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
})
+43
View File
@@ -0,0 +1,43 @@
{
lib,
stdenvNoCC,
fetchurl,
undmg,
nix-update-script,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "mist";
version = "0.30";
src = fetchurl {
url = "https://github.com/ninxsoft/Mist/releases/download/v${finalAttrs.version}/Mist.${finalAttrs.version}.dmg";
hash = "sha256-J3Oxtw+yFV2Mpzqc6NqPPJR76r0DwywJdAU1FSvbYKE=";
};
sourceRoot = ".";
__structuredAttrs = true;
strictDeps = true;
nativeBuildInputs = [ undmg ];
installPhase = ''
runHook preInstall
mkdir -p "$out/Applications"
cp -r *.app "$out/Applications"
runHook postInstall
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Utility that automatically downloads macOS firmwares and installers";
homepage = "https://github.com/ninxsoft/Mist";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ ojsef39 ];
platforms = lib.platforms.darwin;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
})