Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mas: 1.8.6 -> 1.9.0 #379858

Merged
merged 1 commit into from
Feb 10, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 26 additions & 9 deletions pkgs/by-name/ma/mas/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,44 @@
lib,
stdenvNoCC,
fetchurl,
installShellFiles,
libarchive,
p7zip,
testers,
mas,
}:

stdenvNoCC.mkDerivation rec {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use finalAttrs pattern?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don’t hassle people about this kind of thing on unrelated PRs that don’t introduce new instances of patterns some people dislike.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ethancedwards8 Since you thumbsed my comment down I would like to encourage you to look at the contributor guidelines for reviewing PRs and the relevant discussions in #370949 and #264651. Nitpicking unrelated lines in files touched by PRs that don’t introduce new instances of problematic patterns, are orthogonal to the subject of the nitpick, and don’t already do any other substantive refactoring is generally inappropriate, as it discourages contributors and promotes a culture of bikeshedding and nitpicking over substantive review. This applies especially in the case of something like finalAttrs which is not always unambiguously superior to the alternatives. Automated linting and treewides are better avenues for this kind of thing.

pname = "mas";
version = "1.8.6";
version = "1.9.0";

src = fetchurl {
# Use the tarball until https://github.com/mas-cli/mas/issues/452 is fixed.
# 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";
url = "https://github.com/mas-cli/mas/releases/download/v${version}/mas-${version}.pkg";
hash = "sha256-MiSrCHLby3diTAzDPCYX1ZwdmzcHwOx/UJuWrlRJe54=";
};

nativeBuildInputs = [ installShellFiles ];
nativeBuildInputs = [
libarchive
p7zip
];

unpackPhase = ''
runHook preUnpack

7z x $src
bsdtar -xf Payload~

runHook postUnpack
'';

dontBuild = true;

installPhase = ''
install -D './${version}/bin/mas' "$out/bin/mas"
installShellCompletion --cmd mas --bash './${version}/etc/bash_completion.d/mas'
runHook preInstall

mkdir -p $out/bin
cp mas $out/bin

runHook postInstall
'';

passthru.tests = {
Expand Down