The previous commit redefines `stdenv.cross` for the sake of normal
libaries, the most common use-case of that attribute. Some compilers
however relied on the old definition so we have them use
`targetPlatform` instead. This special casing is fine because we
eventually want to remove `stdenv.cross` and use either `hostPlatform`
or `targetPlatform` instead.
In practice, this is a strictly stronger condition than target != build
as we never have build = target != host. Really, the attribute should
be removed altogether, but for now we make it work for plain libraries,
which do not care about the target platform. In the few cases where the
compilers use this and actually care about the target platform, I'll
manually change them to use `targetPlatform` instead.
- `ccWrapperFun` can be used in a few more places instead of
duplicating its definition.
- `ccWrapper` parameter on `wrapCC` is always substituted with
`ccWrapperFun` so just get rid of that parameter.
Each bootstrapping stage ought to just depend on the previous stage, but
poorly-written compilers break this elegence. This provides an easy-enough
way to depend on the next stage: targetPackages. PLEASE DO NOT USE IT
UNLESS YOU MUST!
I'm hoping someday in a pleasant future I can revert this commit :)
- `pkgs` is self-similar, and thus already spliced
- `buildPackages` is an ingredient of splicing and should be kept as is
- The platforms are not packages or package sets and couldn't be spliced
There's probably other things that shouldn't be spliced too. The best long-
term solution is simply to stop splicing altogether.
This reverts commit 6b7c5ba535.
Unfortunately it seems like this broke slim, lightdm and gdm (see #25068
and #23264). This is already reverted in the 17.03 branch (99dfb6d).
TODO: We need tests for slim and lightdm and fix the test for gdm
(failing since 2016-10-26) to prevent such breakage in the future.
On my local nixos machine, `useSandbox = true;` wasn't enabled. This exposed the fact that various scripts weren't shebang-patched. @cleverca22 has provided the fix.
cc @peti @domenkozar @Ericson2314
When not using sandboxing, /usr/share/git-core/templates may leak into the
nix build through the libgit2 hardcoded default template search path. We now
explictly set the templatedir to avoid this problem.
See https://github.com/bennofs/nix-index/issues/2#issuecomment-296268983 for
an example case of nondeterminism.
This typo was likely introduced by copy-pasting the error message from elsewhere and forgetting to change the text, during the MD5 deprecation process (#4491).