nixos: Fix cross compilation of derivations defined in NixOS via pkgs#190358
nixos: Fix cross compilation of derivations defined in NixOS via pkgs#190358Artturin merged 2 commits intoNixOS:masterfrom
Conversation
|
Would this make changes like #190215 obsolete? |
|
After this PR, you have to write it like: pkgs.runCommand "validate-vector-conf" { nativeBuildInputs = [ pkgs.vector ]; } ''
vector validate --no-environment "${file}"
ln -s "${file}" "$out"
''You do not need to add |
Would you be so kind to add a fix for this to this PR? Otherwise with my limited knowledge I think this sounds good. |
|
Existing code will not break with this PR. Your PR is compatible with this PR. If you want, you can do a cleanup in one line nativeBuildInputs = [ pkgs.buildPackages.vector ];to nativeBuildInputs = [ pkgs.vector ];This PR allows you to write derivations as you do it for nixpkgs. |
9d35d14 to
4770866
Compare
|
I didn't receive an answer from @Ericson2314 so lets try it |
|
Thanks! We will see if we face issues. |
|
I'd like to understand this. @ck3d can you explain why |
So that the packages will have a __spliced attrset which contains buildHost hostTarget etc which are then selected by mkDerivation With callPackage the packages are gotten from the spliced set |
|
Ah I see now, normally packages are obtained via Is there a reason that |
Description of changes
Fixes #190289
Following example will fail without this patch:
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)nixos/doc/manual/md-to-db.shto update generated release notes