(Translated by https://www.hiragana.jp/)
sheldon: enable on unix platforms by yasunori0418 · Pull Request #339149 · NixOS/nixpkgs · GitHub
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

sheldon: enable on unix platforms #339149

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

yasunori0418
Copy link
Contributor

@yasunori0418 yasunori0418 commented Sep 3, 2024

…is not possible in mac environment

Description of changes

When installing sheldon on x86_64-darwin, it failed because the platform was not supported.
So, when I tried building it directly at hand, I was able to build it in the environment I was using, so I don't think it is necessary to specify platforms.

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/)
  • 24.11 Release Notes (or backporting 23.11 and 24.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.

@NixOSInfra NixOSInfra added the 12. first-time contribution This PR is the author's first one; please be gentle! label Sep 3, 2024
@ofborg ofborg bot added the 8.has: package (new) This PR adds a new package label Sep 3, 2024
@ofborg ofborg bot requested a review from seqizz September 3, 2024 03:03
@ofborg ofborg bot added 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Sep 3, 2024
@donovanglover
Copy link
Member

Welcome to nixpkgs! Please follow the commit message guidelines in CONTRIBUTING.md. You should also edit the PR title to match the new commit message.

As an example, your commit message can be something like this: sheldon: enable on all platforms

@yasunori0418 yasunori0418 changed the title fix: Delete unnecessary platforms specification because installation … sheldon: enable on all platforms Sep 3, 2024
@yasunori0418
Copy link
Contributor Author

Welcome to nixpkgs! Please follow the commit message guidelines in CONTRIBUTING.md. You should also edit the PR title to match the new commit message.

As an example, your commit message can be something like this: sheldon: enable on all platforms

Sorry, I have corrected the commit message and PR title.

@Bot-wxt1221
Copy link
Member

@yasunori0418 We must ask the maintainers if they can maintain darwin. If not, you can help with this.

@yasunori0418
Copy link
Contributor Author

@yasunori0418 We must ask the maintainers if they can maintain darwin. If not, you can help with this.

The Mac book I'm currently using is not personally owned but by a company, so it's difficult to continue using it for package maintenance and become a maintainer...
I'm sorry that I can't help you as a maintainer.

@@ -61,7 +61,6 @@ rustPlatform.buildRustPackage rec {
homepage = "https://github.com/rossmacarthur/sheldon";
license = with licenses; [ mit ];
maintainers = with maintainers; [ seqizz ];
platforms = platforms.linux;
Copy link
Member

Choose a reason for hiding this comment

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

Platforms should still be set and to include darwin and other unix systems platforms.unix or to inclide non unix systems could also be set to platforms.all

platforms = platforms.unix;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jopejoe1

Thank you for your review.
I think platforms.unix is better because sheldon has binary releases for linux and mac.
I will try building again with this fix.

Copy link
Contributor

Choose a reason for hiding this comment

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

There's no reason to artificially restrict the platforms, IMO it should stay unset and use the defaults from the rust builder.

Copy link
Member

Choose a reason for hiding this comment

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

Interesting, did not know that the rust builder sets them by default.

@jopejoe1
Copy link
Member

jopejoe1 commented Sep 3, 2024

@yasunori0418 We must ask the maintainers if they can maintain darwin. If not, you can help with this.

Increasing platform availability should not be hold back by a maintainer not being able to support it, if it does not increase maintenance burden by too much, which this pr is definitely not.

@Bot-wxt1221
Copy link
Member

@jopejoe1 It is not the reason why we don't merge this PR. However, it is better if someone test app on darwin every time. ofborg only reports whether it builds successfully.

@yasunori0418
Copy link
Contributor Author

Result of nixpkgs-review pr 339149 run on x86_64-darwin 1

1 package built:
  • sheldon

@jopejoe1
Copy link
Member

jopejoe1 commented Sep 3, 2024

Of course, it's always better to tested for as many platforms as possible, but it's definitely not a requirement that updates need to be tested for all platforms or that the there needs to be a maintainer to all supported platforms.

@yasunori0418
Copy link
Contributor Author

Result of nixpkgs-review pr 339149 run on x86_64-darwin 1

1 package built:
  • sheldon

@yasunori0418
Copy link
Contributor Author

#339149 (comment)

Platforms should still be set and to include darwin and other unix systems platforms.unix or to inclide non unix systems could also be set to platforms.all

Based on the above comment, I tried changing platforms = platforms.unix with commit 2433b4f.
And the build with this fix appears to be working normally.
-> #339149 (comment)

Copy link
Member

@Bot-wxt1221 Bot-wxt1221 left a comment

Choose a reason for hiding this comment

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

Wait for nixpkgs committer.

@natsukium
Copy link
Member

Please squash your commits.

Delete unnecessary platforms specification because installation is not possible in mac environment
@yasunori0418 yasunori0418 changed the title sheldon: enable on all platforms sheldon: enable on unix platforms Sep 3, 2024
@emilazy
Copy link
Member

emilazy commented Sep 3, 2024

This program looks specific to Unix shells (it is a shell plugin manager that supports Bash and Zsh), so it should probably be lib.platforms.unix rather than lib.platforms.all. (Sorry, didn’t realize this had already been done…)

@yasunori0418 We must ask the maintainers if they can maintain darwin. If not, you can help with this.

If it breaks on Darwin and pinging @NixOS/darwin-maintainers doesn’t get it fixed quickly, setting broken = stdenv.isDarwin; is more accurate than leaving it out of platforms.

Copy link
Member

@natsukium natsukium left a comment

Choose a reason for hiding this comment

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

I agree with @eclairevoyant 's comment and suggest removing meta.platforms, but I don't think it's wrong to specify platforms.unix explicitly, since this package targets unix shells, as @emilazy said.
In any case, I don't think this is a blocker, so I'll merge it.

Thanks for your contribution! Welcome to nixpkgs🎉

@natsukium natsukium merged commit 4bbea8e into NixOS:master Sep 5, 2024
28 of 29 checks passed
@yasunori0418 yasunori0418 deleted the fix-sheldon-platforms branch September 5, 2024 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: package (new) This PR adds a new package 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. first-time contribution This PR is the author's first one; please be gentle!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants