From c7c2e2f54f8ee6934149418f34d03b782a096490 Mon Sep 17 00:00:00 2001 From: Zach Coyle Date: Mon, 5 Oct 2020 19:40:07 -0400 Subject: [PATCH] mas: init at 1.8.1 --- pkgs/os-specific/darwin/mas/default.nix | 44 +++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 46 insertions(+) create mode 100644 pkgs/os-specific/darwin/mas/default.nix diff --git a/pkgs/os-specific/darwin/mas/default.nix b/pkgs/os-specific/darwin/mas/default.nix new file mode 100644 index 000000000000..495d47df89f9 --- /dev/null +++ b/pkgs/os-specific/darwin/mas/default.nix @@ -0,0 +1,44 @@ +{ lib +, stdenv +, fetchurl +, libarchive +, p7zip +}: + +stdenv.mkDerivation rec { + pname = "mas"; + version = "1.8.1"; + + src = fetchurl { + url = "https://github.com/mas-cli/mas/releases/download/v${version}/mas.pkg"; + sha256 = "W/wgg+ETeJPoZ7MoVGH2uJzQiZMLIy3n1JYKUloc3ZU="; + }; + + nativeBuildInputs = [ libarchive p7zip ]; + + unpackPhase = '' + 7z x $src + bsdtar -xf Payload~ + ''; + + doBuild = false; + + installPhase = '' + mkdir -p $out + cp -r ./bin $out + cp -r ./Frameworks $out + ''; + + postFixup = '' + install_name_tool -change @rpath/MasKit.framework/Versions/A/MasKit $out/Frameworks/MasKit.framework/Versions/A/MasKit $out/bin/mas + install_name_tool -change @rpath/Commandant.framework/Commandant $out/Frameworks/MasKit.framework/Versions/A/Frameworks/Commandant.framework/Versions/A/Commandant $out/bin/mas + ''; + + 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; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d3d77cdf132f..510c5935a2d6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -29382,6 +29382,8 @@ in martyr = callPackage ../development/libraries/martyr { }; + mas = callPackage ../os-specific/darwin/mas { }; + moltengamepad = callPackage ../misc/drivers/moltengamepad { }; openzwave = callPackage ../development/libraries/openzwave { };