mas: 2.2.2 -> 4.1.0 (#470519)

This commit is contained in:
Michael Hoang
2025-12-22 07:29:37 +00:00
committed by GitHub
+27 -7
View File
@@ -2,6 +2,7 @@
lib,
stdenvNoCC,
fetchurl,
installShellFiles,
libarchive,
p7zip,
testers,
@@ -10,14 +11,30 @@
stdenvNoCC.mkDerivation rec {
pname = "mas";
version = "2.2.2";
version = "4.1.0";
src = fetchurl {
url = "https://github.com/mas-cli/mas/releases/download/v${version}/mas-${version}.pkg";
hash = "sha256-v+tiD5ZMVFzeShyuOt8Ss3yw6p8VjopHaMimOQznL6o=";
};
src =
let
sources =
{
x86_64-darwin = {
arch = "x86_64";
hash = "sha256-9GkAV2gitqtZ7Ew/QVXDj3tDTbh5uwBxPtYdLSnucZE=";
};
aarch64-darwin = {
arch = "arm64";
hash = "sha256-8zaZOPOCyLHOFmHhviJXIy5SB5trqQM/MFHhB9ygilQ=";
};
}
.${stdenvNoCC.hostPlatform.system};
in
fetchurl {
url = "https://github.com/mas-cli/mas/releases/download/v${version}/mas-${version}-${sources.arch}.pkg";
inherit (sources) hash;
};
nativeBuildInputs = [
installShellFiles
libarchive
p7zip
];
@@ -36,8 +53,11 @@ stdenvNoCC.mkDerivation rec {
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp mas $out/bin
install -Dm755 usr/local/opt/mas/bin/mas $out/bin/mas
installManPage usr/local/opt/mas/share/man/man1/mas.1
installShellCompletion --bash usr/local/opt/mas/etc/bash_completion.d/mas
installShellCompletion --fish usr/local/opt/mas/share/fish/vendor_completions.d/mas.fish
runHook postInstall
'';