xen: finish moving to by-name; refactor#406638
Conversation
ad5eb0a to
67a5f8d
Compare
drupol
left a comment
There was a problem hiding this comment.
Added a minor opinonated feedback to switch from optional to the more explicit optionals (singular to plural form) to reduce the cognitive load for newcomers.
IMO, it also makes sense to me to use it when dealing with lists (plural form), like buildInputs or knownVulnerabilities.
67a5f8d to
51db1fb
Compare
51db1fb to
8a20062
Compare
philiptaron
left a comment
There was a problem hiding this comment.
It's a pretty steep deprecation, but I trust the Xen project to judge whether that's too fast.
|
I should clarify that as a breaking change, this will need to wait for the branch-off. |
8a20062 to
9c56049
Compare
9c56049 to
83cf4af
Compare
83cf4af to
0a95f78
Compare
85e0b92 to
fcf0f22
Compare
philiptaron
left a comment
There was a problem hiding this comment.
Lots of agreement with the TODOs in the derivation.
Deprecation schedule now looks quite sane.
fcf0f22 to
9dc73c0
Compare
|
behold the unholy patch (doing this was quite nice. I managed to find several dependencies that weren't in the PATH wrapper) |
59f5d55 to
09636ee
Compare
This causes the removal of buildXenPackage, as the recommended way to build a custom Xen is to override the package. Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
The old `buildXenPackage` builder was a curried function that had to be completed with a second call with attributes like `pname` and `version`. As it is no longer necessary to call a generic builder to build custom variants of Xen, the package must comply with the `by-name` checks, which include the requirement that all `package.nix` files in this directory hierarchy resolve to a derivation. (and not a function) Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
Shuffles the input lists to ensure Xen works with `strictDeps` enabled. There are more derivations in `nativeBuildInputs` than strictly necessary for a successful build, but Xen calls for the OCaml and dev86 binaries during certain situations when building certain components. Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
Changes some (long overdue) TODO comments and uses `lib.getExe` instead of hardcoding /bin paths. Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
308cd14 to
fe2444a
Compare
philiptaron
left a comment
There was a problem hiding this comment.
My quick rg math says that dropping the three IMO erroneous substitutions of echo, kill, and test (which are already dependency injected through patching the bash shebang at the top) drops 203 mutations in the patch file.
This looks like the right direction to me, though, megapatch though it may be.
pkgs/by-name/xe/xen/0002-scripts-external-executable-calls.patch
Outdated
Show resolved
Hide resolved
This replaces the brittle PATH wrapper and substituteInPlace calls that ensured the systemd services and the Xen scripts had all the necessary dependencies. The new patch can replace the calls to external executables much more effectively. Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
fe2444a to
5c3b43a
Compare
| "WGET=${getExe' coreutils "false"}" | ||
| "EFI_VENDOR=${finalAttrs.vendor}" | ||
| "INSTALL_EFI_STRIP=1" | ||
| "LD=${getExe' binutils-unwrapped-all-targets "ld"}" |
There was a problem hiding this comment.
I suspect we'll need to replace this with something like the following
preBuild = ''
appendToVar makeFlags "LD=$(LD)"
'';
due to building with cross-compilation.
|
Follow-up to the second Xen refactor:
This finally moves the builder to
by-name, as we can now easily override Xen for a custom build thanks tofinalAttrs.Also does some minor refactoring, like enabling
strictDepsand usinggetExe.Things done
nix-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.