Skip to content

Commit

Permalink
mas: 1.8.6 -> 1.9.0
Browse files Browse the repository at this point in the history
Notably, this switches back to the .pkg from the tarball, since mas-cli/mas#452
was fixed about three years ago (just after this package was last bumped) and
tarballs are no longer published. Also, the Bash completion file isn’t included
in the pkg (but it’s still in the repo).

Here are the intervening release notes:
- https://github.com/mas-cli/mas/releases/tag/v1.8.7
- https://github.com/mas-cli/mas/releases/tag/v1.8.8
- https://github.com/mas-cli/mas/releases/tag/v1.9.0

And the list of (almost 600) commits since the version currently in Nixpkgs:
mas-cli/mas@v1.8.6...v1.9.0
  • Loading branch information
sellout committed Feb 10, 2025
1 parent 62eb605 commit 4dc9c39
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 4dc9c39

Please sign in to comment.