1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 07:00:43 +00:00
Commit graph

18 commits

Author SHA1 Message Date
John Ericson b9bf90ca6c all-packages: Remove gccCrossStageFinal; any gcc will not work 2017-09-21 15:49:18 -04:00
John Ericson e19bb868dc all-packages: Remove forcedNativePackages; we no longer need it
Its kept around in the Hurd package set, but all that code is
presumably broken.
2017-09-20 00:59:19 -04:00
John Ericson a1a798f017 top-level: crossSystem is no longer exposed to packages. Use *Platform. 2017-01-24 11:37:56 -05:00
John Ericson bf17d6dacf 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
2017-01-24 11:37:56 -05:00
Eelco Dolstra 0645f5eab7 samba: Revert style changes and get rid of some dependencies
Packages like glusterfs are now optional dependencies. A bunch of
dependencies like subunit are gone: as far as I can tell, these are
only used by Samba's test suite, which we're not even running, so
they're pointless.

Fixes #8067.
2015-06-01 15:35:59 +02:00
Petr Rockai 559f423417 gnu: Fix (evaluation of the) call to forceSystem. 2014-07-28 20:46:32 +02:00
Eelco Dolstra e2d505b24e More renames 2012-12-28 19:42:10 +01:00
Eelco Dolstra 5be0a9acd7 Rename hostDrv -> crossDrv, buildDrv -> nativeDrv
This is for consistency with terminology in stdenv (and the terms
"hostDrv" and "buildDrv" are not very intuitive, even if they're
consistent with GNU terminology).
2012-12-28 19:08:19 +01:00
Ludovic Courtès e24eab9b87 GNU: Use `callPackage'.
svn path=/nixpkgs/trunk/; revision=33649
2012-04-06 13:18:58 +00:00
Ludovic Courtès dd822c7ece GNU: Fix stale references.
svn path=/nixpkgs/trunk/; revision=33595
2012-04-04 21:24:09 +00:00
Ludovic Courtès 3226d8b91d GNU: Avoid `__overrides' altogether, by using a non-recursive attrset.
Thanks to Eelco for the suggestion.

svn path=/nixpkgs/trunk/; revision=33587
2012-04-04 20:25:51 +00:00
Ludovic Courtès 1663ca3344 GNU: Use overrides' instead of __overrides' for the argument itself.
svn path=/nixpkgs/trunk/; revision=33585
2012-04-04 20:05:48 +00:00
Ludovic Courtès e0ca8e74ff GNU: Add an `__overrides' parameter.
svn path=/nixpkgs/trunk/; revision=33584
2012-04-04 19:50:15 +00:00
Ludovic Courtès 90b8995e04 GNU MIG: Add a raw' version, without forceSystem'.
svn path=/nixpkgs/trunk/; revision=33124
2012-03-15 20:28:07 +00:00
Ludovic Courtès 97bd4b7b00 GNU MIG: Use `forceSystem' instead of the custom hack.
svn path=/nixpkgs/trunk/; revision=33121
2012-03-15 20:27:53 +00:00
Ludovic Courtès 30c215a83a GNU: Add unionfs.
svn path=/nixpkgs/trunk/; revision=33054
2012-03-13 23:19:02 +00:00
Ludovic Courtès 3f523771bc Add SMBFS for GNU/Hurd.
svn path=/nixpkgs/trunk/; revision=32499
2012-02-23 00:01:29 +00:00
Ludovic Courtès 0f6979f5b9 Move GNU/Hurd package attributes under `os-specific/gnu/default.nix'.
svn path=/nixpkgs/trunk/; revision=30173
2011-11-01 22:10:51 +00:00