Skip to content

Commit 4dc9c39

Browse files
committed
mas: 1.8.6 -> 1.9.0
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
1 parent 62eb605 commit 4dc9c39

File tree

1 file changed

+26
-9
lines changed

1 file changed

+26
-9
lines changed

pkgs/by-name/ma/mas/package.nix

+26-9
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,44 @@
22
lib,
33
stdenvNoCC,
44
fetchurl,
5-
installShellFiles,
5+
libarchive,
6+
p7zip,
67
testers,
78
mas,
89
}:
910

1011
stdenvNoCC.mkDerivation rec {
1112
pname = "mas";
12-
version = "1.8.6";
13+
version = "1.9.0";
1314

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

21-
nativeBuildInputs = [ installShellFiles ];
20+
nativeBuildInputs = [
21+
libarchive
22+
p7zip
23+
];
24+
25+
unpackPhase = ''
26+
runHook preUnpack
27+
28+
7z x $src
29+
bsdtar -xf Payload~
30+
31+
runHook postUnpack
32+
'';
33+
34+
dontBuild = true;
2235

2336
installPhase = ''
24-
install -D './${version}/bin/mas' "$out/bin/mas"
25-
installShellCompletion --cmd mas --bash './${version}/etc/bash_completion.d/mas'
37+
runHook preInstall
38+
39+
mkdir -p $out/bin
40+
cp mas $out/bin
41+
42+
runHook postInstall
2643
'';
2744

2845
passthru.tests = {

0 commit comments

Comments
 (0)