Merge pull request #160382 from steinybot/fix/upgrade-mas

mas: 1.8.2 -> 1.8.6
This commit is contained in:
Lassulus 2022-04-20 19:18:21 +01:00 committed by GitHub
commit 8d83fa4198
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,38 +1,41 @@
{ lib { lib
, stdenv , stdenvNoCC
, fetchurl , fetchurl
, libarchive , installShellFiles
, p7zip , testVersion
, mas
}: }:
stdenv.mkDerivation rec { stdenvNoCC.mkDerivation rec {
pname = "mas"; pname = "mas";
version = "1.8.2"; version = "1.8.6";
src = fetchurl { src = fetchurl {
url = "https://github.com/mas-cli/mas/releases/download/v${version}/mas.pkg"; # Use the tarball until https://github.com/mas-cli/mas/issues/452 is fixed.
sha256 = "HlLQKBVIYKanS6kjkbYdabBi1T0irxE6fNd2H6mDKe4="; # 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";
}; };
nativeBuildInputs = [ libarchive p7zip ]; nativeBuildInputs = [ installShellFiles ];
unpackPhase = ''
7z x $src
bsdtar -xf Payload~
'';
dontBuild = true;
installPhase = '' installPhase = ''
mkdir -p $out install -D './${version}/bin/mas' "$out/bin/mas"
cp -r ./usr/local/bin $out installShellCompletion --cmd mas --bash './${version}/etc/bash_completion.d/mas'
''; '';
passthru.tests = {
version = testVersion {
package = mas;
command = "mas version";
};
};
meta = with lib; { meta = with lib; {
description = "Mac App Store command line interface"; description = "Mac App Store command line interface";
homepage = "https://github.com/mas-cli/mas"; homepage = "https://github.com/mas-cli/mas";
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ zachcoyle ]; maintainers = with maintainers; [ steinybot zachcoyle ];
platforms = platforms.darwin; platforms = [ "x86_64-darwin" "aarch64-darwin" ];
}; };
} }