Skip to content

[python3Packages.]uv: Remove dependencies on cmake and pkg-config#407665

Merged
GaetanLepage merged 3 commits intoNixOS:masterfrom
bengsparks:uv-refactors
May 18, 2025
Merged

[python3Packages.]uv: Remove dependencies on cmake and pkg-config#407665
GaetanLepage merged 3 commits intoNixOS:masterfrom
bengsparks:uv-refactors

Conversation

@bengsparks
Copy link
Contributor

@bengsparks bengsparks commented May 16, 2025

There are no references to cmake in the entire project, but these dependencies have been included in the package since it was first added in 29a6185. The relevant PR #289151 does not include a rationale for this, and even back then, the repository at the time did not include CMakeLists.txt or *.cmake files.
Perhaps this was due to historical reasons, but nowadays there is no need for it :)

I've also added versionCheckHook to the Python package, so that inherit (pkgs.uv) versionCheckProgramArg; actually does something for the package.
Finally I've added myself to the maintainer list of uv, as I get to use uv from nixpkgs at work, and also responsible for the uv-build package, which inherits a fair amount from uv.

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 the 6.topic: python Python is a high-level, general-purpose programming language. label May 16, 2025
@bengsparks bengsparks changed the title [python3Packages.]uv: Remove dependencies on cmake and pkgs-config [python3Packages.]uv: Remove dependencies on cmake and pkg-config May 16, 2025
@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: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 501-1000 This PR causes many rebuilds on Linux and should normally target the staging branches. labels May 16, 2025
@bengsparks bengsparks marked this pull request as ready for review May 16, 2025 17:29
Copy link
Member

@Prince213 Prince213 left a comment

Choose a reason for hiding this comment

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

Please put the maintainer commit before rest of your changes. See https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#commit-conventions.

@bengsparks
Copy link
Contributor Author

bengsparks commented May 16, 2025

When adding yourself as maintainer in the same pull request, make a separate commit with the message maintainers: add <handle>.
Add the commit before those making changes to the package or module. See Nixpkgs Maintainers for details.

@Prince213 I believe the convention you are referring to is about adding oneself to the maintainer-list.nix, then adding the new handle to the maintainers list of a package.
The commit conventions clue in on this by requiring a maintainers: prefix, and not specifying the package at all, which would be wrong here.

@bengsparks
Copy link
Contributor Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 407665 --skip-package-regex home-assistant.*


aarch64-darwin

⏩ 4 packages marked as broken and skipped:
  • python312Packages.bentoml
  • python312Packages.bentoml.dist
  • python313Packages.bentoml
  • python313Packages.bentoml.dist
✅ 9 packages built:
  • hatch
  • hatch.dist
  • prefect
  • prefect.dist
  • python312Packages.uv
  • python312Packages.uv.dist
  • python313Packages.uv
  • python313Packages.uv.dist
  • uv

@Prince213
Copy link
Member

@Prince213 I believe the convention you are referring to is about adding oneself to the maintainer-list.nix, then adding the new handle to the maintainers list of a package. The commit conventions clue in on this by requiring a maintainers: prefix, and not specifying the package at all, which would be wrong here.

I still feel that both changing maintainer-list.nix and maintainers of a package should come before any other changes. But it's not a explicit requirements I think.

Copy link
Member

@Prince213 Prince213 left a comment

Choose a reason for hiding this comment

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

Otherwise Diff LGTM

@Prince213 Prince213 added the 12.approvals: 1 This PR was reviewed and approved by one person. label May 17, 2025
Copy link
Contributor

@GaetanLepage GaetanLepage left a comment

Choose a reason for hiding this comment

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

Thanks!

@GaetanLepage GaetanLepage requested a review from kirillrdy May 17, 2025 23:49
@GaetanLepage GaetanLepage merged commit 455782d into NixOS:master May 18, 2025
43 of 44 checks passed
@bengsparks bengsparks deleted the uv-refactors branch May 18, 2025 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: python Python is a high-level, general-purpose programming language. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 501-1000 This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants