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

mas: 1.8.6 -> 1.9.0 #379858

merged 1 commit into from
Feb 10, 2025

Conversation

sellout
Copy link
Contributor

@sellout sellout commented Feb 6, 2025

Notably, this switches back to the .pkg from the tarball, since mas-cli/mas#452 was fixed about three years ago (just after this package was last bumped) and tarballs are no longer published. Also, the Bash completion file isn’t included in the pkg (but it’s still in the repo).

Here are the intervening release notes:

And the list of (almost 600) commits since the version currently in Nixpkgs: mas-cli/mas@v1.8.6...v1.9.0

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 10.rebuild-darwin: 1 10.rebuild-darwin: 1-10 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Feb 6, 2025
@nix-owners nix-owners bot requested a review from zachcoyle February 6, 2025 16:18
@sellout
Copy link
Contributor Author

sellout commented Feb 6, 2025

I left the reformatting in a separate commit so that the first commit showing the actual changes can be reviewed more easily.

"aarch64-darwin"
];
maintainers = with maintainers; [ steinybot zachcoyle ];
platforms = [ "x86_64-darwin" "aarch64-darwin" ];
Copy link
Member

Choose a reason for hiding this comment

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

lib.platforms.darwin?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I considered this, but it was changed from lib.platforms.darwin in e55eb3d#diff-e9cddb1ec8d2c67121f7529df3f0326832437dea4108f3640057e02053ad5227L36. I assumed it was because the other -darwin systems aren’t supported.

testers,
mas,
}:
{ lib, stdenvNoCC, fetchurl, 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.

Copy link
Member

@emilazy emilazy left a comment

Choose a reason for hiding this comment

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

Please drop the formatting commit; the file was already formatted according to nixfmt-rfc-style rules, whereas it looks like you have formatted it with nixfmt-classic. Yes, confusing, I know; the error tells you how to get the right formatter.

Other than that and the comment I’ve left, this looks good to me. No need to handle trivial stuff like finalAttrs/meta.platforms in an unrelated PR.

Comment on lines 22 to 43
installPhase = ''
install -D './${version}/bin/mas' "$out/bin/mas"
installShellCompletion --cmd mas --bash './${version}/etc/bash_completion.d/mas'
mkdir -p $out/bin
cp mas $out/bin
'';
Copy link
Member

Choose a reason for hiding this comment

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

Preferably add runHook preInstall to the start and runHook postInstall to the end, but not blocking as it was already like this.

However, this is losing the shell completion. Hopefully it’s present in the .pkg and we can install it (and the Fish one too?); see Homebrew’s formula. Otherwise, it might be best to stick with the Homebrew bottle for now.

We should be able to build this from source and I might take a look at doing so another time.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately, no. As I mention in the description, the pkg doesn’t contain any completion files. It looks like the project has never included the completions in the .pkg files, and the tarballs aren’t produced for newer versions. So it looks like we’d wait until this is built from source.

Notably, this switches back to the .pkg from the tarball, since mas-cli/mas#452
was fixed about three years ago (just after this package was last bumped) and
tarballs are no longer published. Also, the Bash completion file isn’t included
in the pkg (but it’s still in the repo).

Here are the intervening release notes:
- https://github.com/mas-cli/mas/releases/tag/v1.8.7
- https://github.com/mas-cli/mas/releases/tag/v1.8.8
- https://github.com/mas-cli/mas/releases/tag/v1.9.0

And the list of (almost 600) commits since the version currently in Nixpkgs:
mas-cli/mas@v1.8.6...v1.9.0
Copy link
Contributor Author

@sellout sellout left a comment

Choose a reason for hiding this comment

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

Ok, I’ve addressed the comments.

Sorry about the formatting – I don’t know how that could have happened. I don’t have nixfmt on my PATH, so I don’t know how I would have run it without nix-shell.

"aarch64-darwin"
];
maintainers = with maintainers; [ steinybot zachcoyle ];
platforms = [ "x86_64-darwin" "aarch64-darwin" ];
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I considered this, but it was changed from lib.platforms.darwin in e55eb3d#diff-e9cddb1ec8d2c67121f7529df3f0326832437dea4108f3640057e02053ad5227L36. I assumed it was because the other -darwin systems aren’t supported.

Comment on lines 22 to 43
installPhase = ''
install -D './${version}/bin/mas' "$out/bin/mas"
installShellCompletion --cmd mas --bash './${version}/etc/bash_completion.d/mas'
mkdir -p $out/bin
cp mas $out/bin
'';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately, no. As I mention in the description, the pkg doesn’t contain any completion files. It looks like the project has never included the completions in the .pkg files, and the tarballs aren’t produced for newer versions. So it looks like we’d wait until this is built from source.

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Feb 10, 2025
Copy link
Member

@emilazy emilazy left a comment

Choose a reason for hiding this comment

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

Thank you! I think we can live without shell completion for now, as being on such an old version seems worse.

@emilazy emilazy merged commit ba4ca7f into NixOS:master Feb 10, 2025
28 checks passed
@sellout sellout deleted the upgrade-mas branch February 14, 2025 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux 12.approvals: 1 This PR was reviewed and approved by one reputable person
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants