mas: 1.8.2 -> 1.8.6

This commit is contained in:
Jason Pickens 2022-02-16 22:49:48 +13:00
parent 14260bb7ba
commit e55eb3d376
No known key found for this signature in database
GPG Key ID: 8DB7DFA142551359

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" ];
}; };
} }