luaPackages.wrapLua: Fix the wrapper on cross#481464
Conversation
The wrapper was using a makeWrapper targeting the buildPlatform This is a leftover from a fix I did before I converted luaPackages to use makeScopeWithSplicing Fixes: https://www.github.com/NixOS/nixpkgs/issues/481454
|
Fails to evaluate |
mkDerivation instead of using the raw list
```
… while evaluating attribute 'propagatedBuildInputs' of derivation 'wrap-lua-hook'
at /home/art/nixgits/my-nixpkgs/pkgs/stdenv/generic/make-derivation.nix:600:13:
599| depsHostHostPropagated = elemAt (elemAt propagatedDependencies 1) 0;
600| propagatedBuildInputs = elemAt (elemAt propagatedDependencies 1) 1;
| ^
601| depsTargetTargetPropagated = elemAt (elemAt propagatedDependencies 2) 0;
… while calling the 'getAttr' builtin
at «nix-internal»/derivation-internal.nix:50:17:
49| value = commonAttrs // {
50| outPath = builtins.getAttr outputName strict;
| ^
51| drvPath = strict.drvPath;
… while calling the 'derivationStrict' builtin
at «nix-internal»/derivation-internal.nix:37:12:
36|
37| strict = derivationStrict drvAttrs;
| ^
38|
… while evaluating derivation 'make-shell-wrapper-hook'
whose name attribute is located at /home/art/nixgits/my-nixpkgs/pkgs/stdenv/generic/make-derivation.nix:541:13
… while evaluating attribute 'shell' of derivation 'make-shell-wrapper-hook'
at /home/art/nixgits/my-nixpkgs/pkgs/top-level/all-packages.nix:716:7:
715| # targetPackages.runtimeShell only exists when pkgs == targetPackages (when targetPackages is not __raw)
716| shell =
| ^
717| if targetPackages ? runtimeShell then
… while calling the 'throw' builtin
at /home/art/nixgits/my-nixpkgs/pkgs/top-level/all-packages.nix:720:11:
719| else
720| throw "makeWrapper/makeShellWrapper must be in nativeBuildInputs";
| ^
721| };
error: makeWrapper/makeShellWrapper must be in nativeBuildInputs
```
| @@ -142,7 +142,7 @@ let | |||
| luarocksConfig = | |||
| let | |||
| externalDepsGenerated = lib.filter (drv: !drv ? luaModule) ( | |||
| self.nativeBuildInputs ++ self.propagatedBuildInputs ++ self.buildInputs | |||
| self.finalPackage.nativeBuildInputs ++ self.propagatedBuildInputs ++ self.buildInputs | |||
There was a problem hiding this comment.
This wasn't made with cross in mind so dunno if the buildHost should be picked or the hostTarget
If the hostTarget should be picked then the list has to be mapped and x.__spliced.hostTarget picked
There was a problem hiding this comment.
This wasn't made with cross in mind so dunno if the
buildHostshould be picked or thehostTargetIf thehostTargetshould be picked then the list has to be mapped andx.__spliced.hostTargetpicked
I think this works fine. The correct Bash is used in the wrappers of:
nix build -Lf. pkgsCross.armv7l-hf-multiplatform.lua54Packages.cjson
However still the 2 other commits available in #481511 are needed.
|
I'm running now a nixpkgs-review on x86_64-linux to learn about the peculiar amount of rebuilds (less then in #481511 and more then 10). |
|
|
All files in |
|
Oh and that |
|
(while I dont mind breaking a few packages for some big/complex PRs, rocks.nvim is a neovim plugin manager, one of those root packages we dont wanna break. And this has nothing to do with me using it ;) ) |
|
The rocks failure doesn't seem related, could be a lua bug or upstream builder bug |
|
As I said, that failure was a false negative. |
|
funnily enough I just had a rocks.nvim failure when rebuilding that disappeared on second attempt. Do you remember if this was similiar to : cc @mrcjkb |
It was. See the logs in nixpkgs-review previous comment. |
Hmm, looks like it could be a flaky test. |
The wrapper was using a makeWrapper targeting the buildPlatform
This is a leftover from a fix I did before I converted luaPackages to use makeScopeWithSplicing
Fixes: #481454
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.