Skip to content

Commit

Permalink
mas: 1.8.6 -> 1.9.0 (#379858)
Browse files Browse the repository at this point in the history
  • Loading branch information
emilazy authored Feb 10, 2025
2 parents 7fd3a72 + 4dc9c39 commit ba4ca7f
Showing 1 changed file with 26 additions and 9 deletions.
35 changes: 26 additions & 9 deletions pkgs/by-name/ma/mas/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,44 @@
lib,
stdenvNoCC,
fetchurl,
installShellFiles,
libarchive,
p7zip,
testers,
mas,
}:

stdenvNoCC.mkDerivation rec {
pname = "mas";
version = "1.8.6";
version = "1.9.0";

src = fetchurl {
# Use the tarball until https://github.com/mas-cli/mas/issues/452 is fixed.
# Even though it looks like an OS/arch specific build it is actually a universal binary.
url = "https://github.com/mas-cli/mas/releases/download/v${version}/mas-${version}.monterey.bottle.tar.gz";
sha256 = "0q4skdhymgn5xrwafyisfshx327faia682yv83mf68r61m2jl10d";
url = "https://github.com/mas-cli/mas/releases/download/v${version}/mas-${version}.pkg";
hash = "sha256-MiSrCHLby3diTAzDPCYX1ZwdmzcHwOx/UJuWrlRJe54=";
};

nativeBuildInputs = [ installShellFiles ];
nativeBuildInputs = [
libarchive
p7zip
];

unpackPhase = ''
runHook preUnpack
7z x $src
bsdtar -xf Payload~
runHook postUnpack
'';

dontBuild = true;

installPhase = ''
install -D './${version}/bin/mas' "$out/bin/mas"
installShellCompletion --cmd mas --bash './${version}/etc/bash_completion.d/mas'
runHook preInstall
mkdir -p $out/bin
cp mas $out/bin
runHook postInstall
'';

passthru.tests = {
Expand Down

0 comments on commit ba4ca7f

Please sign in to comment.