treewide: handle *Phases variables __structuredAttrs-agnostically#339117
treewide: handle *Phases variables __structuredAttrs-agnostically#339117philiptaron merged 6 commits intoNixOS:stagingfrom
*Phases variables __structuredAttrs-agnostically#339117Conversation
Always specify the prePhases attribute as a list instead of a string. Append elements to the prePhases Bash variable using appendToVar instead of string or Bash array concatenation.
Always specify the preConfigurePhases attribute as a list instead of a string. Append elements to the preConfigurePhases Bash variable using appendToVar instead of string or Bash array concatenation.
Always specify the preInstallPhases attribute as a list instead of a string. Append elements to the preInstallPhases Bash variable using appendToVar instead of string or Bash array concatenation.
Always specify the preDistPhases attribute as a list instead of a string. Append elements to the preDistPhases Bash variable using appendToVar instead of string or Bash array concatenation. Handle element insertion before a specific element using string substitution as before, but handle both structured and unstructured attributes.
Always specify the postPhases attribute as a list instead of a string. Append elements to the postPhases Bash variable using appendToVar instead of string or Bash array concatenation.
Require the elements of *Phases not to contain spaces. Require the *Phases attribute to be specified as Nix Language lists.
corngood
left a comment
There was a problem hiding this comment.
+1 for dotnet stuff. I promise to keep an eye out for this in the future. :)
|
Test Test Test I'm unsure how to test the I'm unsure how to test the I'm unsure how to test Test I'm unsure how to test the setup hook of Test Test Test Test Test Test Test Test the setup hook of pytest for Python 2 (PyPy is still supporting Python2, and will continue to support it): Test Test I'm unsure how to test the changes in I'm unsure how to test the changes in |
(FWIW although PyPy2 will of course continue to be packaged, I’m quite sure |
philiptaron
left a comment
There was a problem hiding this comment.
One two things in here look scary at all to me.
I did a "quick" staging build on those two and everything came up roses. 🌹🌹🦌🌹🌹
Result of nixpkgs-review pr 339117 -p python3Packages.pytest-forked -p python3Packages.pytest-xdist run on x86_64-linux 1
4 packages built:
- python3Packages.pytest-forked
- python3Packages.pytest-forked.dist (python3Packages.pytest-forked.dist.dist)
- python3Packages.pytest-xdist
- python3Packages.pytest-xdist.dist (python3Packages.pytest-xdist.dist.dist)
|
I intend to merge this within the next day. |
It would be great if they could be handled more gracefully (e.g. without string substitutions or if-blocks). Still, I wonder if it worths it to craft a generic global Bash helper function (like |
Yeah, I see no need to do so at the present juncture; it's likely that these two derivations could get golfed into something neater, in fact I'm certain of it, but no need to make the perfect be the enemy of this quite good PR. |
|
This might have caused #351010 |
This PR changed the semantics of the The breakage of Does |
Doing a bisect on the problematic branches, it appears that the breakage appeared here which doesn't seem to be part of this branch. |
Description of changes
Always specify the preDistPhases attribute as a list instead of a string.
Append elements to the preDistPhases Bash variable using appendToVar instead of string or Bash array concatenation.
Handle element insertion before a specific element using string substitution as before, but handle both structured and unstructured attributes.
State explicitly in the Nixpkgs Manual, "*Phases attributes are lists" and "elements of *Phases variables contain no spaces."
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.