Skip to content

gitSetupHook: init#402320

Merged
drupol merged 2 commits intoNixOS:masterfrom
drupol:push-sossrzntquom
May 19, 2025
Merged

gitSetupHook: init#402320
drupol merged 2 commits intoNixOS:masterfrom
drupol:push-sossrzntquom

Conversation

@drupol
Copy link
Copy Markdown
Contributor

@drupol drupol commented Apr 27, 2025

This PR:

  • add a new hook gitSetupHook which initialize the git user.mail and user.name
  • update a couple of derivation by using that new hook

Note: the hook uses a hook substitution for gitMinimal so that the user is still able to customize the version of git in use in nativeCheckInputs.

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 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 6.topic: python Python is a high-level, general-purpose programming language. 6.topic: ocaml OCaml is a general-purpose, high-level, multi-paradigm programming language. 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. and removed 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Apr 27, 2025
@drupol drupol force-pushed the push-sossrzntquom branch from 7271d7e to 7a0ff59 Compare April 27, 2025 17:26
@github-actions github-actions bot added 10.rebuild-darwin: 2501-5000 This PR causes many rebuilds on Darwin and should target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. and removed 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Apr 27, 2025
@drupol drupol force-pushed the push-sossrzntquom branch 2 times, most recently from 4699e1f to dcb66d5 Compare April 27, 2025 18:12
@github-actions github-actions bot added 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. 10.rebuild-darwin: 2501-5000 This PR causes many rebuilds on Darwin and should target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. and removed 10.rebuild-darwin: 2501-5000 This PR causes many rebuilds on Darwin and should target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. labels Apr 27, 2025
@drupol drupol changed the title git-setup-hook: init gitSetupHook: init Apr 27, 2025
@drupol drupol marked this pull request as ready for review May 12, 2025 18:37
@drupol drupol force-pushed the push-sossrzntquom branch 2 times, most recently from 4856074 to f95e0a1 Compare May 12, 2025 20:03
Copy link
Copy Markdown
Member

@winterqt winterqt left a comment

Choose a reason for hiding this comment

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

Please reduce the diffs of the packages to just the setup hook usage, there is no point in doing that here—especially not in the same commits!

@nyabinary
Copy link
Copy Markdown
Contributor

Please reduce the diffs of the packages to just the setup hook usage, there is no point in doing that here—especially not in the same commits!

It really doesn't hurt anyone, it's mundane changes, if it can be done in this PR I don't see why not :P

@winterqt
Copy link
Copy Markdown
Member

It really doesn't hurt anyone, it's mundane changes, if it can be done in this PR I don't see why not :P

Hard disagree. They’re changes that don’t make any sense to do here, and especially not in the same commits that touch other areas of the packages.

@winterqt
Copy link
Copy Markdown
Member

@nyabinary Please see the contribution guidelines for more information on this subject.

@ethancedwards8
Copy link
Copy Markdown
Member

This feels like bikeshedding. Sure, they're not directly relevant, but reverting the changes would be wasting time and it would take even more time and reviewer/maintainer bandwidth to make the changes in another PR. Practically speaking, they're fine to stay in IMO. We are trying to maintain a complex and heavily used package ecosystem here, not be the perfect software development model. Just my two cents. Feel free to ignore.

@lilyball
Copy link
Copy Markdown
Member

You know what wastes time? Putting a bunch of unrelated changes into a PR, and then arguing about it. It's not even your PR and you're arguing!

@drupol
Copy link
Copy Markdown
Contributor Author

drupol commented May 13, 2025

Let's all calm down, splitting my work in two PRs is a matter of half a minute, it's actually super easy to do with jujutsu.

I am going to do it as soon as I am out of bed.

@drupol
Copy link
Copy Markdown
Contributor Author

drupol commented May 13, 2025

This feels like bikeshedding. Sure, they're not directly relevant, but reverting the changes would be wasting time and it would take even more time and reviewer/maintainer bandwidth to make the changes in another PR. Practically speaking, they're fine to stay in IMO. We are trying to maintain a complex and heavily used package ecosystem here, not be the perfect software development model. Just my two cents. Feel free to ignore.

You're right that, technically, we should avoid mixing concerns in a single commit or PR.

In this case, my PR does mix a few distinct changes:

  1. Switching to gitSetupHook
  2. Switching to finalAttrs
  3. Minor clean-up (e.g. removing "with lib;")

If I were reviewing this PR myself, I wouldn't have requested changes either, mainly because I know how limited our time and resources are, and I appreciate it when someone takes care of these improvements, even when bundled (In fact, I often take the same approach when reviewing, but I rarely ask for such commits to be split.).

However, the context here is slightly different. Self-merging isn't an option, and I'm still learning the ins and outs of hook usage. That’s why I’d rather have it reviewed thoroughly, even if it means splitting it.

No worries at all about the request, I'm not offended or frustrated. I know some contributors might have closed the PR in response to such feedback, but that’s not how I approach collaboration.

@drupol drupol force-pushed the push-sossrzntquom branch from f95e0a1 to 9b74269 Compare May 13, 2025 06:08
@github-actions github-actions bot removed 6.topic: python Python is a high-level, general-purpose programming language. 6.topic: ocaml OCaml is a general-purpose, high-level, multi-paradigm programming language. labels May 13, 2025
@drupol drupol mentioned this pull request May 13, 2025
13 tasks
@github-actions github-actions bot added 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. and removed 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. labels May 13, 2025
@drupol
Copy link
Copy Markdown
Contributor Author

drupol commented May 13, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 402320


x86_64-linux

⏩ 2 packages blacklisted:
  • nixos-install-tools
  • tests.nixos-functions.nixos-test
✅ 1 package built:
  • gitSetupHook

@drupol
Copy link
Copy Markdown
Contributor Author

drupol commented May 13, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 402320


x86_64-darwin

✅ 1 package built:
  • gitSetupHook

@ethancedwards8
Copy link
Copy Markdown
Member

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 402320


aarch64-darwin

✅ 1 package built:
  • gitSetupHook

@drupol
Copy link
Copy Markdown
Contributor Author

drupol commented May 19, 2025

@winterqt Planning to merge this by the end of the day, if you have some more feedback, please share them here so I can work on this.

Comment thread pkgs/by-name/gi/gitSetupHook/gitSetupHook.sh Outdated
Comment thread pkgs/by-name/gi/gitSetupHook/gitSetupHook.sh Outdated
Comment on lines 625 to 628
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not sure if we should add this to the changelog at this point -- we're already very close to release. cc @leona-ya

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This depends on what the first release that this changes reaches it. If it gets merged before release to 25.05, I'd say 25.05 changelog, otherwise 25.11

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fair enough, planning to merge this today by the end of the day, so 2505 is still fine.

@drupol drupol mentioned this pull request Jul 4, 2025
13 tasks
@drupol drupol mentioned this pull request Oct 7, 2025
13 tasks
@ethancedwards8 ethancedwards8 mentioned this pull request Feb 10, 2026
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog This PR adds or changes release notes 8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.