Skip to content

buildPerlPackage: don't mess with pname and phase out use of name#176792

Merged
SuperSandro2000 merged 2 commits intoNixOS:stagingfrom
malob:fix-buildPerlPackages-pname
Jun 23, 2022
Merged

buildPerlPackage: don't mess with pname and phase out use of name#176792
SuperSandro2000 merged 2 commits intoNixOS:stagingfrom
malob:fix-buildPerlPackages-pname

Conversation

@malob
Copy link
Copy Markdown
Member

@malob malob commented Jun 7, 2022

Description of changes

Currently buildPerlPackage prefixes the Perl version to the package's pname, which results in nix run not being able to work for any packages build with it out of the box. This commit corrects that and phases out the ability to set name directly, as well as refactors the code to not require cleanedAttrs.

I don't have any real experience with the Perl echo system in nixpkgs so careful review from someone who does is essential here.

This PR also requires essentially a full rebuild of nixpkgs so if there are any other changes folks have been wanting to make to how perl packaging works in nixpkgs, I'd be happy to add those onto the PR.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • 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/)
  • 22.11 Release Notes (or backporting 22.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
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

malob added 2 commits June 7, 2022 12:20
Currently `buildPerlPackage` prefixes the Perl version to the package's
`pname`, which results in `nix run` not being able to work for any
packages build with it out of the box. This commit corrects that and
phases out the ability to set `name` directly, as well as refactors the
code to not require `cleanedAttrs`.
@malob malob requested review from stigtsp and zakame as code owners June 7, 2022 19:50
@github-actions github-actions bot added the 8.has: documentation This PR adds or changes documentation label Jun 7, 2022
@ofborg ofborg bot added 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux-stdenv This PR causes stdenv to rebuild on Linux and must target a staging branch. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin 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-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Jun 7, 2022
@SuperSandro2000
Copy link
Copy Markdown
Member

Thanks for starting this!

Lets wait what stigtsp has to say on this.

@malob
Copy link
Copy Markdown
Member Author

malob commented Jun 7, 2022

To test this change I ran:

nix build -f . perlPackages.ack

Built for me without issue on aarch64-darwin (though of course it took a while).

@malob
Copy link
Copy Markdown
Member Author

malob commented Jun 15, 2022

Politely poking @stigtsp

@malob malob requested a review from SuperSandro2000 June 22, 2022 18:11
@SuperSandro2000 SuperSandro2000 merged commit fe72f92 into NixOS:staging Jun 23, 2022
@SuperSandro2000
Copy link
Copy Markdown
Member

here goes nothing

@malob malob deleted the fix-buildPerlPackages-pname branch June 23, 2022 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux 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-stdenv This PR causes stdenv to rebuild on Linux and must target a staging branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants