Skip to content

Comments

shell.nix: include gh in the default shell#392828

Merged
JohnRTitor merged 1 commit intoNixOS:masterfrom
SigmaSquadron:push-swwktrqwytyy
Mar 25, 2025
Merged

shell.nix: include gh in the default shell#392828
JohnRTitor merged 1 commit intoNixOS:masterfrom
SigmaSquadron:push-swwktrqwytyy

Conversation

@SigmaSquadron
Copy link
Contributor

@SigmaSquadron SigmaSquadron commented Mar 24, 2025

GitHub's CLI is now used by nixpkgs-review to fetch Nixpkgs evaluation results from GitHub Actions. Including it in the default shell will allow all contributors to easily log-in to GitHub when nixpkgs-review tries to fetch evaluation results.

Spawned from a small discussion in the dev matrix channel about adding a Justfile to Nixpkgs. Adding just gh to the shell for now should be considerably less controversial.

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's CLI is now used by nixpkgs-review to fetch Nixpkgs evaluation
results from GitHub Actions. Including it in the default shell will
allow all contributors to easily log-in to GitHub when nixpkgs-review
tries to fetch evaluation results.

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Mar 24, 2025
@SigmaSquadron SigmaSquadron added the 6.topic: developer experience nixpkgs development workflow label Mar 24, 2025
@khaneliman
Copy link
Contributor

khaneliman commented Mar 24, 2025

Relevant bit: https://github.com/Mic92/nixpkgs-review/blob/df034b59d756e80d30532d0756809d4536307098/nixpkgs_review/cli/pr.py#L48-L56

Technically, should still be usable... should just fallback to the old behavior of always evaluating locally. But, is a better experience (much better) with using the results from CI.

@SigmaSquadron
Copy link
Contributor Author

Also, some users simply cannot run the local evaluation at all, due to memory constraints. Using GitHub Actions' evaluation should lower the barrier of entry for contributors with lower-end machines.

@khaneliman
Copy link
Contributor

Also, some users simply cannot run the local evaluation at all, due to memory constraints. Using GitHub Actions' evaluation should lower the barrier of entry for contributors with lower-end machines.

True, I used to oom my compositor when running with 4 parallel evaluations :P

@JohnRTitor
Copy link
Member

Sounds like a good addition to me.

Copy link
Member

@infinisil infinisil left a comment

Choose a reason for hiding this comment

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

LGTM!

@JohnRTitor JohnRTitor merged commit 2e76f1b into NixOS:master Mar 25, 2025
35 of 36 checks passed
@SigmaSquadron SigmaSquadron deleted the push-swwktrqwytyy branch April 26, 2025 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: developer experience nixpkgs development workflow 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants