diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 6dbf947f241b..aed0a04463da 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -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"; diff --git a/pkgs/by-name/mi/mist-cli/package.nix b/pkgs/by-name/mi/mist-cli/package.nix new file mode 100644 index 000000000000..48b5bf6d5584 --- /dev/null +++ b/pkgs/by-name/mi/mist-cli/package.nix @@ -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 ]; + }; +}) diff --git a/pkgs/by-name/mi/mist/package.nix b/pkgs/by-name/mi/mist/package.nix new file mode 100644 index 000000000000..e35008d124ee --- /dev/null +++ b/pkgs/by-name/mi/mist/package.nix @@ -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 ]; + }; +})