nixpkgs/pkgs/os-specific/darwin/mas/default.nix

39 lines
738 B
Nix
Raw Normal View History

2020-10-06 01:40:07 +02:00
{ lib
, stdenv
, fetchurl
, libarchive
, p7zip
}:
stdenv.mkDerivation rec {
pname = "mas";
2021-06-12 01:22:35 +02:00
version = "1.8.2";
2020-10-06 01:40:07 +02:00
src = fetchurl {
url = "https://github.com/mas-cli/mas/releases/download/v${version}/mas.pkg";
2021-06-12 01:22:35 +02:00
sha256 = "HlLQKBVIYKanS6kjkbYdabBi1T0irxE6fNd2H6mDKe4=";
2020-10-06 01:40:07 +02:00
};
nativeBuildInputs = [ libarchive p7zip ];
unpackPhase = ''
7z x $src
bsdtar -xf Payload~
'';
2021-06-14 14:59:21 +02:00
dontBuild = true;
2020-10-06 01:40:07 +02:00
installPhase = ''
mkdir -p $out
2021-06-12 01:22:35 +02:00
cp -r ./usr/local/bin $out
2020-10-06 01:40:07 +02:00
'';
meta = with lib; {
description = "Mac App Store command line interface";
homepage = "https://github.com/mas-cli/mas";
license = licenses.mit;
maintainers = with maintainers; [ zachcoyle ];
platforms = platforms.darwin;
};
}