Branch: refs/heads/master
Home: https://github.com/NixOS/nixpkgs
Commit: bf17d6dacf2408436ffb5a2f8c87a31c88ec28e2
https://github.com/NixOS/nixpkgs/commit/bf17d6dacf2408436ffb5a2f8c87a31c88ec28e2
Author: John Ericson <[email protected]>
Date: 2017-01-24 (Tue, 24 Jan 2017)
Changed paths:
M pkgs/os-specific/gnu/default.nix
M pkgs/stdenv/adapters.nix
M pkgs/stdenv/booter.nix
M pkgs/stdenv/cross/default.nix
M pkgs/stdenv/generic/default.nix
M pkgs/stdenv/linux/make-bootstrap-tools-cross.nix
M pkgs/top-level/all-packages.nix
M pkgs/top-level/release-cross.nix
M pkgs/top-level/release-lib.nix
A pkgs/top-level/splice.nix
M pkgs/top-level/stage.nix
Log Message:
-----------
top-level: Introduce `buildPackages` for resolving build-time deps
[N.B., this package also applies to the commits that follow it in the same
PR.]
In most cases, buildPackages = pkgs so things work just as before. For
cross compiling, however, buildPackages is resolved as the previous
bootstrapping stage. This allows us to avoid the mkDerivation hacks cross
compiling currently uses today.
To avoid a massive refactor, callPackage will splice together both package
sets. Again to avoid churn, it uses the old `nativeDrv` vs `crossDrv` to do
so. So now, whether cross compiling or not, packages with get a `nativeDrv`
and `crossDrv`---in the non-cross-compiling case they are simply the same
derivation. This is good because it reduces the divergence between the
cross and non-cross dataflow. See `pkgs/top-level/splice.nix` for a comment
along the lines of the preceding paragraph, and the code that does this
splicing.
Also, `forceNativeDrv` is replaced with `forceNativePackages`. The latter
resolves `pkgs` unless the host platform is different from the build
platform, in which case it resolves to `buildPackages`. Note that the
target platform is not important here---it will not prevent
`forcedNativePackages` from resolving to `pkgs`.
--------
Temporarily, we make preserve some dubious decisions in the name of preserving
hashes:
Most importantly, we don't distinguish between "host" and "target" in the
autoconf sense. This leads to the proliferation of *Cross derivations
currently used. What we ought to is resolve native deps of the cross "build
packages" (build = host != target) package set against the "vanilla
packages" (build = host = target) package set. Instead, "build packages"
uses itself, with (informally) target != build in all cases.
This is wrong because it violates the "sliding window" principle of
bootstrapping stages that shifting the platform triple of one stage to the
left coincides with the next stage's platform triple. Only because we don't
explicitly distinguish between "host" and "target" does it appear that the
"sliding window" principle is preserved--indeed it is over the reductionary
"platform double" of just "build" and "host/target".
Additionally, we build libc, libgcc, etc in the same stage as the compilers
themselves, which is wrong because they are used at runtime, not build
time. Fixing this is somewhat subtle, and the solution and problem will be
better explained in the commit that does fix it.
Commits after this will solve both these issues, at the expense of breaking
cross hashes. Native hashes won't be broken, thankfully.
--------
Did the temporary ugliness pan out? Of the packages that currently build in
`release-cross.nix`, the only ones that have their hash changed are
`*.gcc.crossDrv` and `bootstrapTools.*.coreutilsMinimal`. In both cases I
think it doesn't matter.
1. GCC when doing a `build = host = target = foreign` build (maximally
cross), still defines environment variables like `CPATH`[1] with
packages. This seems assuredly wrong because whether gcc dynamically
links those, or the programs built by gcc dynamically link those---I
have no idea which case is reality---they should be foreign. Therefore,
in all likelihood, I just made the gcc less broken.
2. Coreutils (ab)used the old cross-compiling infrastructure to depend on
a native version of itself. When coreutils was overwritten to be built
with fewer features, the native version it used would also be
overwritten because the binding was tight. Now it uses the much looser
`BuildPackages.coreutils` which is just fine as a richer build dep
doesn't cause any problems and avoids a rebuild.
So, in conclusion I'd say the conservatism payed off. Onward to actually
raking the muck in the next PR!
[1]: https://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html
Commit: eee7cafaf7961b762cb74edd1670b42e5a7547a9
https://github.com/NixOS/nixpkgs/commit/eee7cafaf7961b762cb74edd1670b42e5a7547a9
Author: John Ericson <[email protected]>
Date: 2017-01-24 (Tue, 24 Jan 2017)
Changed paths:
M pkgs/tools/misc/coreutils/default.nix
Log Message:
-----------
coreutils: Use `buildPackages` instead of `self` hack for native version
Commit: 94df8e7e4d9024abe9883f310dd6c2c7929f4ce0
https://github.com/NixOS/nixpkgs/commit/94df8e7e4d9024abe9883f310dd6c2c7929f4ce0
Author: John Ericson <[email protected]>
Date: 2017-01-24 (Tue, 24 Jan 2017)
Changed paths:
M pkgs/development/libraries/openssl/default.nix
Log Message:
-----------
openssl: Output-santizing hack properly uses native perl again
Commit: d27403b17b9e7baa902f90be25391d65c22fe19d
https://github.com/NixOS/nixpkgs/commit/d27403b17b9e7baa902f90be25391d65c22fe19d
Author: John Ericson <[email protected]>
Date: 2017-01-24 (Tue, 24 Jan 2017)
Changed paths:
M pkgs/top-level/all-packages.nix
Log Message:
-----------
libiconv: TEMP force building library improperly for target plat like libc
Commit: 5b88f09ec4d6b3ac953cd9d252ebfd6663205c57
https://github.com/NixOS/nixpkgs/commit/5b88f09ec4d6b3ac953cd9d252ebfd6663205c57
Author: David Grayson <[email protected]>
Date: 2017-01-24 (Tue, 24 Jan 2017)
Changed paths:
M pkgs/tools/misc/coreutils/default.nix
Log Message:
-----------
coreutils: Fix indentation after removing `self` in `buildPackages` commit
Commit: 92edcb7ebbf5b4b324288ec62bebbc58a3f96ef6
https://github.com/NixOS/nixpkgs/commit/92edcb7ebbf5b4b324288ec62bebbc58a3f96ef6
Author: John Ericson <[email protected]>
Date: 2017-01-24 (Tue, 24 Jan 2017)
Changed paths:
M pkgs/stdenv/adapters.nix
M pkgs/stdenv/cross/default.nix
M pkgs/stdenv/custom/default.nix
M pkgs/stdenv/darwin/default.nix
M pkgs/stdenv/default.nix
M pkgs/stdenv/freebsd/default.nix
M pkgs/stdenv/linux/default.nix
M pkgs/stdenv/native/default.nix
M pkgs/stdenv/nix/default.nix
M pkgs/top-level/default.nix
M pkgs/top-level/stage.nix
Log Message:
-----------
top-level: Lay the groundwork for `{build,host,target}Platform`
The long term goal is a big replace:
{ inherit system platform; } => buildPlatform
crossSystem => hostPlatform
stdenv.cross => targetPlatform
And additionally making sure each is defined even when not cross compiling.
This commit refactors the bootstrapping code along that vision, but leaves
the old identifiers with their null semantics in place so packages can be
modernized incrementally.
Commit: 09401d44eb402a368b1eb6908a68e5b5a3e64e05
https://github.com/NixOS/nixpkgs/commit/09401d44eb402a368b1eb6908a68e5b5a3e64e05
Author: John Ericson <[email protected]>
Date: 2017-01-24 (Tue, 24 Jan 2017)
Changed paths:
M pkgs/build-support/cc-wrapper/default.nix
Log Message:
-----------
cc-wrapper: Remove unneeded crossAttrs
Commit: 1c0365bd88b7d98377ff639b5ede5f725e05663b
https://github.com/NixOS/nixpkgs/commit/1c0365bd88b7d98377ff639b5ede5f725e05663b
Author: John Ericson <[email protected]>
Date: 2017-01-24 (Tue, 24 Jan 2017)
Changed paths:
M pkgs/stdenv/adapters.nix
Log Message:
-----------
cross-stdenv: Inline useless bindings and reindent
Semantics should be unchanged
Commit: a1a798f01788bc3efe4ca477f2c9e8545eeafddc
https://github.com/NixOS/nixpkgs/commit/a1a798f01788bc3efe4ca477f2c9e8545eeafddc
Author: John Ericson <[email protected]>
Date: 2017-01-24 (Tue, 24 Jan 2017)
Changed paths:
M pkgs/development/compilers/ghc/head.nix
M pkgs/os-specific/gnu/default.nix
M pkgs/stdenv/linux/make-bootstrap-tools-cross.nix
M pkgs/top-level/all-packages.nix
M pkgs/top-level/haskell-packages.nix
M pkgs/top-level/stage.nix
Log Message:
-----------
top-level: `crossSystem` is no longer exposed to packages. Use `*Platform`.
Commit: 4c17cd555f6443207144da9af6e1c2b1304afd8b
https://github.com/NixOS/nixpkgs/commit/4c17cd555f6443207144da9af6e1c2b1304afd8b
Author: John Ericson <[email protected]>
Date: 2017-01-24 (Tue, 24 Jan 2017)
Changed paths:
M pkgs/top-level/default.nix
Log Message:
-----------
top-level: Document the `{local,cross}System, contrasting with `*Platform`
This is an implementation detail of how the bootstrapping chain is chosen,
and thus need not be in the manual.
Commit: bfb147b6a8c4a3ddc581aab0b8a29b418db3b7a6
https://github.com/NixOS/nixpkgs/commit/bfb147b6a8c4a3ddc581aab0b8a29b418db3b7a6
Author: John Ericson <[email protected]>
Date: 2017-01-24 (Tue, 24 Jan 2017)
Changed paths:
M pkgs/stdenv/booter.nix
M pkgs/top-level/splice.nix
M pkgs/top-level/stage.nix
Log Message:
-----------
top-level: Only splice as needed for performance
Commit: 7dc4e43837a83d1b938b7eba0541b32f4e9bce72
https://github.com/NixOS/nixpkgs/commit/7dc4e43837a83d1b938b7eba0541b32f4e9bce72
Author: John Ericson <[email protected]>
Date: 2017-01-24 (Tue, 24 Jan 2017)
Changed paths:
M nixos/doc/manual/release-notes/rl-1703.xml
Log Message:
-----------
nixos doc: Mention cross overhaul in 17.03 release notes
Commit: 76ea89aa78c9099a2e5c5121942cdaa8b2d52c89
https://github.com/NixOS/nixpkgs/commit/76ea89aa78c9099a2e5c5121942cdaa8b2d52c89
Author: John Ericson <[email protected]>
Date: 2017-01-24 (Tue, 24 Jan 2017)
Changed paths:
M doc/stdenv.xml
Log Message:
-----------
nixpkgs doc: Talk about nativeBuildInputs and propgatedNativeBuildInputs
Do so in the stdenv section where the other two are discussed. This can be
done without brining up cross-compilation by talking about build-time vs
run-time.
Commit: 39fb46f5384bd4d28f1b10580ac9227c4ed36da2
https://github.com/NixOS/nixpkgs/commit/39fb46f5384bd4d28f1b10580ac9227c4ed36da2
Author: John Ericson <[email protected]>
Date: 2017-01-24 (Tue, 24 Jan 2017)
Changed paths:
A doc/cross-compilation.xml
M doc/manual.xml
Log Message:
-----------
nixpkgs docs: Cross compilation docs
Commit: 5ad696b06763b7c5c6e1aa7ed848a50bff78c8d5
https://github.com/NixOS/nixpkgs/commit/5ad696b06763b7c5c6e1aa7ed848a50bff78c8d5
Author: John Ericson <[email protected]>
Date: 2017-01-24 (Tue, 24 Jan 2017)
Changed paths:
A doc/cross-compilation.xml
M doc/manual.xml
M doc/stdenv.xml
M nixos/doc/manual/release-notes/rl-1703.xml
M pkgs/build-support/cc-wrapper/default.nix
M pkgs/development/compilers/ghc/head.nix
M pkgs/development/libraries/openssl/default.nix
M pkgs/os-specific/gnu/default.nix
M pkgs/stdenv/adapters.nix
M pkgs/stdenv/booter.nix
M pkgs/stdenv/cross/default.nix
M pkgs/stdenv/custom/default.nix
M pkgs/stdenv/darwin/default.nix
M pkgs/stdenv/default.nix
M pkgs/stdenv/freebsd/default.nix
M pkgs/stdenv/generic/default.nix
M pkgs/stdenv/linux/default.nix
M pkgs/stdenv/linux/make-bootstrap-tools-cross.nix
M pkgs/stdenv/native/default.nix
M pkgs/stdenv/nix/default.nix
M pkgs/tools/misc/coreutils/default.nix
M pkgs/top-level/all-packages.nix
M pkgs/top-level/default.nix
M pkgs/top-level/haskell-packages.nix
M pkgs/top-level/release-cross.nix
M pkgs/top-level/release-lib.nix
A pkgs/top-level/splice.nix
M pkgs/top-level/stage.nix
Log Message:
-----------
Merge pull request #22107 from Ericson2314/cross-tepid
Somewhat saner cross-compiling through bootstrapping
Compare: https://github.com/NixOS/nixpkgs/compare/54df14267213...5ad696b06763_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits