mist-cli: init at version 2.2

This commit is contained in:
Josef Hofer
2026-05-03 13:45:21 +02:00
committed by Josef Hofer
parent a838fe3092
commit 0204fa0462
+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 ];
};
})