about summary refs log tree commit diff
path: root/pkgs/stdenv/adapters.nix
AgeCommit message (Collapse)AuthorFilesLines
2017-02-01~/.nixpkgs -> ~/.config/nixpkgsEelco Dolstra1-1/+1
The former is still respected as a fallback for config.nix for backwards compatibility (but not for overlays because they're a new feature).
2017-01-25stdenv: Add updateAutoconfGnuConfigScriptsHook for aarch64Tuomas Tynkkynen1-0/+1
This is required for Aarch64 since a lot of source tarballs ship with outdated configure scripts that don't recognize aarch64. Simply replacing the config.guess and config.sub with new versions from upstream makes them build again. This same approach is used by at least Buildroot and Fedora. In principle this could be enabled for all architectures but conditionalizing this on aarch64 avoids a mass rebuild on x86.
2017-01-24cross-stdenv: Inline useless bindings and reindentJohn Ericson1-55/+53
Semantics should be unchanged
2017-01-24top-level: Lay the groundwork for `{build,host,target}Platform`John Ericson1-1/+1
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.
2017-01-24top-level: Introduce `buildPackages` for resolving build-time depsJohn Ericson1-13/+5
[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
2016-06-20Remove more dead code: `stdenvDarwinNaked` no longer existsJohn Ericson1-7/+0
2016-06-20Remove dead code in stdenvCross adaptorJohn Ericson1-1/+0
2016-04-23stdenv on mingw: fix 64-bin DLL detection in some casesVladimír Čunát1-2/+6
In particular, this makes 64-bit libpng create DLL now, and thus depending packages won't fail anymore (e.g. freetype).
2016-04-01useOldCXXAbi: Change into a setup hookEelco Dolstra1-6/+0
Stdenv adapters considered weird.
2016-03-31stdenvAdapters.useOldCXXAbi: add new adapterNikolay Amiantov1-0/+7
2015-08-10enableDebugging: use more suitable gcc flagsVladimír Čunát1-1/+1
-ggdb is supposed to provide better symbol information when used with gdb -Og is the recommended optimization level for debugging purposes
2015-05-04useGoldLinker: Fix appending to $NIX_CFLAGS_LINKEelco Dolstra1-1/+1
2015-02-05Fix cross compiling regression due to gcc->cc renaming.Ambroz Bizjak1-0/+1
2015-01-14rename gcc-wrapper to cc-wrapper.Eric Seidel1-1/+1
also makes cc-wrapper compatible with clang in the darwin fork.
2014-12-26Restore accidentally-dropped stdenv adapterShea Levy1-0/+5
2014-12-26Change occurrences of gcc to the more general ccJohn Wiegley1-6/+1
This is done for the sake of Yosemite, which does not have gcc, and yet this change is also compatible with Linux.
2014-11-16Merge remote-tracking branch 'origin/glibc-2.20' into stagingEelco Dolstra1-57/+0
2014-11-12useGoldLinker: Don't set dontStripEelco Dolstra1-1/+0
Probably caused by a bad cut&paste...
2014-10-29Remove obsolete useKlibc stdenv adapterEelco Dolstra1-27/+0
2014-10-29Remove obsolete useDietLibC stdenv adapterEelco Dolstra1-30/+0
2014-10-10gcc-wrapper: Wrap ld.goldEelco Dolstra1-13/+7
This ensures that gcc's ‘-fuse-ld=gold’ flag works.
2014-10-09Merge remote-tracking branch 'origin/staging' into darwin-clang-stdenvEelco Dolstra1-2/+2
Conflicts: pkgs/tools/security/gnupg/default.nix
2014-10-06stdenv-linux: Turn allowedRequisites back onEelco Dolstra1-2/+2
2014-09-09fix even more clang buildsJoel Taylor1-0/+5
2014-04-22Typo/commentEelco Dolstra1-1/+3
2014-03-03Move generation of coverage reports from nixos/lib/testing to releaseToolsEelco Dolstra1-39/+1
Also, turn some stdenv adapters into setup hooks.
2014-02-05Turn the coverage analysis stdenv adapters into setup hooksEelco Dolstra1-23/+1
Stdenv adapters are kinda weird and un-idiomatic (especially when they don't actually change stdenv). It's more idiomatic to say buildInputs = [ makeCoverageAnalysisReport ];
2014-02-05addCoverageInstrumentation: Set NIX_CFLAGS_COMPILE as an attributeEelco Dolstra1-17/+14
This allows it to show up in nix-shell.
2014-02-05Apply makeOverridable to stdenvEelco Dolstra1-10/+4
This removes the need for hacks like stdenv.regenerate. It also ensures that overrideGCC is now stackable (so ‘stdenv = useGoldLinker clangStdenv’ works).
2014-02-05Add a stdenv adapter ‘useGoldLinker’ to force use of GoldEelco Dolstra1-9/+21
2012-12-28More renamesEelco Dolstra1-9/+9
2012-12-28More random cleanupEelco Dolstra1-14/+12
2012-12-28Random cleanup: use "or" in adapters.nixEelco Dolstra1-27/+16
2012-12-28Rename buildNativeInputs -> nativeBuildInputsEelco Dolstra1-11/+11
Likewise for propagatedBuildNativeInputs, etc. "buildNativeInputs" sounds like an imperative rather than a noun phrase.
2012-12-28Rename hostDrv -> crossDrv, buildDrv -> nativeDrvEelco Dolstra1-11/+11
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-10-31Add a stdenv adapter ‘keepDebugInfo’ to make a debug buildEelco Dolstra1-15/+27
This adapter causes the resulting binaries to have debug info and no optimisations. Example use (in all-packages.nix): foo = callPackage ./foo.nix { stdenv = keepDebugInfo stdenv; };
2012-01-18* "ensureDir" -> "mkdir -p". "ensureDir" is a rather pointlessEelco Dolstra1-3/+3
function, so obsolete it. svn path=/nixpkgs/branches/stdenv-updates/; revision=31644
2011-12-14* Streamline the stdenv bootstrap and resulting closure by removingEelco Dolstra1-4/+5
some redundant builds (e.g., GMP was built three times). * Updated GMP to 5.0.2. * Updated PPL to 0.11.2. * Remove ad hoc flags to build GCC's dependencies statically. Instead, use the ‘makeStaticLibraries’ stdenv adapter. * Build GMP with C++ support by default. svn path=/nixpkgs/branches/stdenv-updates/; revision=30891
2011-11-20validateLicenses: Warn about derivations lacking licensing information.Ludovic Courtès1-2/+8
svn path=/nixpkgs/trunk/; revision=30496
2011-11-20stdenv adapters: Use `toString' instead of `exprToString'.Ludovic Courtès1-7/+5
svn path=/nixpkgs/trunk/; revision=30494
2011-10-19Bootstrap clang with itselfShea Levy1-0/+1
svn path=/nixpkgs/trunk/; revision=29901
2011-07-01* Typo.Eelco Dolstra1-1/+1
svn path=/nixpkgs/trunk/; revision=27569
2011-01-20* makeStaticBinaries: handle the case where configureFlags isEelco Dolstra1-1/+1
an array. svn path=/nixpkgs/trunk/; revision=25641
2010-11-30Making the addCoverageInformation stdenv adapter better in the sense that itLluís Batlle i Rossell1-6/+7
does not override NIX_CFLAGS_COMPILE anymore in the mkDerivation parameter attributes. This way, apacheHttpd can be built properly with coverage information. An indication of this problem came from the nixos tests.subversion failure. svn path=/nixpkgs/branches/stdenv-updates/; revision=24938
2010-08-07Updating from trunkLluís Batlle i Rossell1-1/+1
svn path=/nixpkgs/branches/stdenv-updates/; revision=23027
2010-08-06TyposYury G. Kudryashov1-1/+1
svn path=/nixpkgs/trunk/; revision=23011
2010-03-06Making gcc cross-buildable, at least for glibc.Lluís Batlle i Rossell1-1/+3
svn path=/nixpkgs/branches/stdenv-updates/; revision=20454
2010-03-04Fixing the cross build stdenv adapter so it tolerates buildInputs with ↵Lluís Batlle i Rossell1-5/+10
'null' elements. svn path=/nixpkgs/trunk/; revision=20381
2010-02-27Adding a new special attribute for mkDerivation: crossAttrs. It sits next toLluís Batlle i Rossell1-1/+1
"meta" and "passthru", and these attributes will be appended to the usual mkDerivation attributes only if the package is cross built. This allows putting some of the cross-building logic in the mkDerivation nix parameters, and not only in the final builder script, as it was until now. svn path=/nixpkgs/trunk/; revision=20272
2010-01-26* Fix splashutils.Eelco Dolstra1-4/+3
svn path=/nixpkgs/branches/stdenv-updates/; revision=19662