Skip to content

Commit

Permalink
Merge pull request #46024 from Ericson2314/fix-45993
Browse files Browse the repository at this point in the history
mkDerivation: Fix cross compilation for 18.09
  • Loading branch information
John Ericson authored Sep 4, 2018
2 parents a2aacb2 + 06cd7c1 commit 46f4a93
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pkgs/stdenv/generic/make-derivation.nix
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,15 @@ rec {
builder = attrs.realBuilder or stdenv.shell;
args = attrs.args or ["-e" (attrs.builder or ./default-builder.sh)];
inherit stdenv;
inherit (stdenv.hostPlatform) system;

# The `system` attribute of a derivation has special meaning to Nix.
# Derivations set it to choose what sort of machine could be used to
# execute the build, The build platform entirely determines this,
# indeed more finely than Nix knows or cares about. The `system`
# attribute of `buildPlatfom` matches Nix's degree of specificity.
# exactly.
inherit (stdenv.buildPlatform) system;

userHook = config.stdenv.userHook or null;
__ignoreNulls = true;

Expand Down

0 comments on commit 46f4a93

Please sign in to comment.