summary refs log tree commit diff
path: root/pkgs/top-level/splice.nix
Commit message (Collapse)AuthorAge
* top-level: Create `pkgs{Build,Host,Target}{Build,Host,Target}`John Ericson2019-03-24
| | | | | | | This is needed to avoid confusing and repeated boilerplate for `fooForTarget`. The vast majority of use-cases can still use `buildPackages or `targetPackages`, which are now defined in terms of these.
* xorg: don't splice scope attributes into main package setAndrew Childs2018-10-11
|
* __splicedPackages: Don't include xorgJohn Ericson2018-10-11
| | | | | For historical reasons, callPackage has the xorg packages in scope. This unstable building block is more versatile without the xorg hack baked in.
* treewide: Remove usage of remaining redundant platform compatability stuffJohn Ericson2018-08-30
| | | | | Want to get this out of here for 18.09, so it can be deprecated thereafter.
* haskell infra: Fix built-time overridesJohn Ericson2018-07-09
| | | | These should all come from `buildHaskellPackages`
* Haskell infra: Do callPackage splicingJohn Ericson2018-07-09
|
* top-level: Expose `splicePackages` for `newScope` usersJohn Ericson2018-07-09
| | | | | | | | | | | Otherwise extra packages in scope can't be made to work for cross. As much as I think splicing is an evil trick, I think it's best to do this and at least have it work consistently for now. It would seems simpler to expose a `newScopeWithSplicing`, but there's a few attrs (like `buildPackages` or `buildHaskellPackages`) that shouldn't be spliced. Users should instead splice, override the splicing on those packages, and apply `newScope` to that.
* make-derivation: Don't add host-suffix to fixed-output derivations namesWill Dietz2018-07-09
| | | | | | | | Not only does the suffix unnecessarily reduce sharing, but it also breaks unpacker setup hooks (e.g. that of `unzip`) which identify interesting tarballs using the file extension. This also means we can get rid of the splicing hacks for fetchers.
* top-level: Splice in more package sets for new types of depsJohn Ericson2017-12-30
| | | | | This is done in preparation for the next commit where, among other changes, I add support for the new `dep*` attributes.
* top-level: Fix splicing, againJohn Ericson2017-12-10
|
* top-level: Fix splicing in the presence of evaluation errorsJohn Ericson2017-12-09
| | | | | | | | | | - No more `or {}`, this was misleading at best since those values wouldn't be used unless the attr they are defined from was present anyways. - `tryEval` for get outputs. This ensures that if some derivations fail, they won't take out the others. This benefited from the `or {}` before, but that was never good enough. `tryEval` is strictly better.
* Rename `__targetPackages` to `targetPackages`John Ericson2017-11-05
|
* Revert "Merge branch 'improved-make-overridable' of ↵Shea Levy2017-09-29
| | | | | | | git://github.com/ElvishJerricco/nixpkgs" This reverts commit c3af1210b4c5d7ef380e75add463b37574fdcc8b, reversing changes made to 49f175cd0c80a39e1d05fc687c4a2a40e0aba58c.
* Revert "Avoid polluting lib namespace unncessarily"Shea Levy2017-09-29
| | | | | | Reverting #27319 This reverts commit 01a3f0b8aabdb321b15dc7cc0e2287ce8232f797.
* Avoid polluting lib namespace unncessarilyShea Levy2017-09-28
|
* Merge branch 'improved-make-overridable' of ↵Shea Levy2017-09-28
|\ | | | | | | git://github.com/ElvishJerricco/nixpkgs
| * Added `self` views of the interface in `makeExtensibleWithInterface`Will Fancher2017-07-14
| | | | | | | | Fixing the `overrideScope` in `haskellpackages`.
| * Added `callPackageWithSelfWith` and `callPackageWithSelf`Will Fancher2017-07-12
| |
* | stdenv: Also splice unlisted default "out" outputJohn Ericson2017-09-19
|/ | | | | | | Otherwise, some cross builds will use the wrong type of dep. This won't affect native builds, and perhaps no extant cross buids either.
* top-level: Introduce targetPackages and a "double link fold"John Ericson2017-04-23
| | | | | | | | | 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 :)
* top-level: Do not splice `pkgs`, `buildPackages` or `*Platform`John Ericson2017-04-23
| | | | | | | | | - `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.
* top-level: no more need to expose `splicedPackages`John Ericson2017-01-25
| | | | | This was just done temporarily on the last cross-overhauling PR for testing purposes.
* top-level: Only splice as needed for performanceJohn Ericson2017-01-24
|
* top-level: Introduce `buildPackages` for resolving build-time depsJohn Ericson2017-01-24
[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