summaryrefslogtreecommitdiff
path: root/pkgs/stdenv/default.nix (follow)
Commit message (Expand)AuthorAgeFilesLines
* stdenv: add comment explaining replaceStdenv fallbackbyteforge382026-01-161-0/+1
* stdenv: keep replaceStdenv fallback for non-module contextsbyteforge382026-01-151-1/+1
* stdenv: simplify replaceStdenv null checkbyteforge382026-01-151-1/+1
* config: add replaceStdenv, cudaCapabilities, cudaForwardCompat optionsbyteforge382026-01-111-1/+1
* treewide: format all inactive Nix files•••After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-build https://github.com/infinisil/treewide-nixpkgs-reformat-script/archive/a08b3a4d199c6124ac5b36a889d9099b4383463f.tar.gz \ --argstr baseRev b32a0943687d2a5094a6d92f25a4b6e16a76b5b7 result/bin/apply-formatting $NIXPKGS_PATH Silvan Mosberger2024-12-101-12/+24
* darwin.stdenv: refactor stdenv definition•••In preparation for bumping the LLVM used by Darwin, this change refactors and reworks the stdenv build process. When it made sense, existing behaviors were kept to avoid causing any unwanted breakage. However, there are some differences. The reasoning and differences are discussed below. - Improved cycle times - Working on the Darwin stdenv was a tedious process because `allowedRequisites` determined what was allowed between stages. If you made a mistake, you might have to wait a considerable amount of time for the build to fail. Using assertions makes many errors fail at evaluation time and makes moving things around safer and easier to do. - Decoupling from bootstrap tools - The stdenv build process builds as much as it can in the early stages to remove the requirement that the bootstrap tools need bumped in order to bump the stdenv itself. This should lower the barrier to updates and make it easier to bump in the future. It also allows changes to be made without requiring additional tools be added to the bootstrap tools. - Patterned after the Linux stdenv - I tried to follow the patterns established in the Linux stdenv with adaptations made to Darwin’s needs. My hope is this makes the Darwin stdenv more approable for non-Darwin developers who made need to interact with it. It also allowed some of the hacks to be removed. - Documentation - Comments were added explaining what was happening and why things were being done. This is particular important for some stages that might not be obvious (such as the sysctl stage). - Cleanup - Converting the intermediate `allowedRequisites` to assertions revealed that many packages were being referenced that no longer exist or have been renamed. Removing them reduces clutter and should help make the stdenv bootstrap process be more understandable. Randy Eckenrode2023-07-021-1/+1
* stdenv: Simplify dispatch•••This is a change for `powerpc-linux` but that is ancient and I don't think it matters. The impure bootstrap that was previously assigned to it has probably bitrotted anyways. John Ericson2022-07-291-22/+4
* lib/systems: add mips64el definitions•••MIPS has a large space of {architecture,abi,endianness}; this commit adds all of them to lib/systems/platforms.nix so we can be done with it. Currently lib/systems/inspect.nix has a single "isMips" predicate, which is a bit ambiguous now that we will have both mips32 and mips64 support, with the latter having two ABIs. Let's add four new predicates (isMips32, isMips64, isMips64n32, and isMips64n64) and treat the now-ambiguous isMips as deprecated in favor of the more-specific predicates. These predicates are used mainly for enabling/disabling target-specific workarounds, and it is extremely rare that a platform-specific workaround is needed, and both mips32 and mips64 need exactly the same workaround. The separate predicates (isMips64n32 and isMips64n64) for ABI distinctions are, unfortunately, useful. Boost's user-scheduled threading (used by nix) does does not currently supports mips64n32, which is a very desirable ABI on routers since they rarely have more than 2**32 bytes of DRAM. Adam Joseph2022-03-101-0/+1
* stdenv: add bootstrap files for riscv64•••Bootstrap files are from https://hydra.nixos.org/build/159891432 and https://hydra.nixos.org/build/159891436 oxalica2021-11-301-0/+1
* stdenv/darwin: Apple Silicon supportAndrew Childs2021-05-171-0/+1
* stdenv: add powerpc64-linuxRyan Burns2021-01-301-0/+1
* treewide: remove redundant quotesvolth2019-08-261-21/+21
* stdenv/linux: use isCompatible to find bootstrap tools•••This avoids part of the issue where things like armv7a don’t work because the system doesn’t realize it can use the armv7l bootstrap tools. Matthew Bauer2019-04-191-0/+6
* Merge pull request #51628 from ju1m/arm•••stdenv: add armv7a-linux systemMatthew Bauer2019-03-011-0/+1
|\
| * stdenv: add armv7a-linux systemJulien Moutinho2018-12-061-0/+1
* | stdenv: implement crossOverlays•••crossOverlays only apply to the packages being built, not the build packages. It is useful when you don’t care what is used to build your packages, just what is being built. The idea relies heavily on the cross compiling infrastructure. Using this implies that we need to create a cross stdenv. Matthew Bauer2018-12-041-2/+2
|/
* [RFC] ppc64le enablement (#45340)•••* ppc64le enablement * gcc, glibc: properly handle __float128 * lib/systems, stdenv: syntax cleanup * gcc7: remove ugly hack * gcc: add/update __float128 flags * stdenv: add another pair of quotes for consistency * gcc: move __float128 flag for ppc64le-glibc into common/platform-flags.nix CrystalGamma2018-08-211-0/+1
* lib, treewide: Add missing MIPS arches, and fix existing usage•••Existing "mips64el" should be "mipsel". This is just the barest minimum so that nixpkgs can recognize them as systems - although required for building individual derivations onto MIPS boards, it is not sufficient if you want to actually build nixos on those targets Daniel Barlow2018-02-231-1/+1
* stdenv: Bringup aarch64 architecture supportTuomas Tynkkynen2017-01-251-0/+1
* 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. John Ericson2017-01-241-2/+2
* Add overlays mechanism to Nixpkgs.•••This patch add a new argument to Nixpkgs default expression named "overlays". By default, the value of the argument is either taken from the environment variable `NIXPKGS_OVERLAYS`, or from the directory `~/.nixpkgs/overlays/`. If the environment variable does not name a valid directory then this mechanism would fallback on the home directory. If the home directory does not exists it will fallback on an empty list of overlays. The overlays directory should contain the list of extra Nixpkgs stages which would be used to extend the content of Nixpkgs, with additional set of packages. The overlays, i-e directory, files, symbolic links are used in alphabetical order. The simplest overlay which extends Nixpkgs with nothing looks like: ```nix self: super: { } ``` More refined overlays can use `super` as the basis for building new packages, and `self` as a way to query the final result of the fix-point. An example of overlay which extends Nixpkgs with a small set of packages can be found at: https://github.com/nbp/nixpkgs-mozilla/blob/nixpkgs-overlay/moz-overlay.nix To use this file, checkout the repository and add a symbolic link to the `moz-overlay.nix` file in `~/.nixpkgs/overlays` directory. Nicolas B. Pierron2017-01-161-1/+1
* linux stdenv: Inline stage funs to conform to new convention•••Code is just moved around John Ericson2017-01-131-1/+1
* top-level: Normalize stdenv booting•••Introduce new abstraction, `stdenv/booter.nix` for composing bootstraping stages, and use it everywhere for consistency. See that file for more doc. Stdenvs besides Linux and Darwin are completely refactored to utilize this. Those two, due to their size and complexity, are minimally edited for easier reviewing. No hashes should be changed. John Ericson2017-01-131-45/+33
* top-level: turn the screw••• - Non-cross stdenvs are honest and assert that `crossSystem` is null - `crossSystem` is a mandatory argument to top-level/stage.nix, just like `system` and `platform` - Broken default arguments on stdenvs for testing are gone. - All stdenvs (but little-used stdenvNix) take the same arguments for easy testing. John Ericson2016-12-011-8/+8
* top-level: Close over fewer arguments for stdenv stages•••This makes the flow of data easier to understand. There's little downside because the args in question are already inspected by the stdenvs. cross-compiling in particular is simpler because we don't need to worry about overriding the config closed over by `allPackages`. John Ericson2016-11-301-4/+6
* top-level: Remove cycles: stdenv calls in top-level but not vice versa•••This commit changes the dependencies of stdenv, and clean-up the stdenv story by removing the `defaultStdenv` attribute as well as the `bootStdenv` parameter. Before, the final bootstrapping stage's stdenv was provided by all-packages, which was iterating multiple times over the top-level/default.nix expression, and non-final bootstrapping stages' stdenvs were explicitly specified with the `bootStdenv` parameter. Now, all stages' stdenvs are specified with the `stdenv` parameter. For non-final bootstrapping stages, this is a small change---basically just rename the parameter. For the final stage, top-level/default.nix takes the chosen stdenv and makes the final stage with it. `allPackages` is used to make all bootstrapping stages, final and non-final alike. It's basically the expression of `stage.nix` (along with a few partially-applied default arguments) Note, the make-bootstrap-tools scripts are temporarily broken John Ericson2016-11-301-2/+3
* top-level: Stop exposing all stdenvsJohn Ericson2016-11-301-4/+3
* Add initial basic support for cross-compiling to iOSShea Levy2016-11-151-2/+4
* top-level: Make config-overriden stdenv bootstrap more normallyJohn Ericson2016-11-061-0/+3
* top-level: Make stdenvCross which appears at first glance normal...•••...but actually is weird just like the original John Ericson2016-11-061-2/+5
* top-level: Make `stdenv/default.nix` more concise with `inherit (expr) id;` s...John Ericson2016-10-271-6/+4
* Merge branch 'master' into stagingVladimír Čunát2016-01-051-8/+1
|\
| * stdenv-darwin: allow easier testing of bootstrap tools•••This un-hardcodes the bootstrap tools passed into the Darwin stdenv and thus allows us to quickly iterate on improving the design of the full bootstrap process. We can easily change the contents of the bootstrap tools and evaluate an entire bootstrap all the way up to real packages. Dan Peebles2016-01-031-1/+1
| * stdenv-darwin: rename folder and associated attribute•••No point in calling it pure-darwin anymore. It's the only stdenv we haveDan Peebles2016-01-031-6/+2
| * stdenv-darwin: kill old impure Darwin stdenv•••I'll be moving the other one over it next commit (I split it into two to improve git's rename detection)Dan Peebles2016-01-031-3/+0
* | FreeBSD: use own stdenv, do not run libtiff tests, use PIC for zlibjanus2016-01-011-0/+3
|/
* switch stdenvsJude Taylor2015-10-021-1/+1
* move pure stdenv into a new directory, bring back the old one•••remove __impure from non-darwin OSes Jude Taylor2015-06-181-1/+7
* pure darwin stdenvJude Taylor2015-06-181-1/+1
* cygwin: stdenvFlorian Friesdorf2015-05-281-0/+2
* new darwin stdenvEric Seidel2015-02-031-21/+2
* Merge branch 'darwin-stdenv' of github.com:joelteon/nixpkgs into staging•••Conflicts: pkgs/development/interpreters/ruby/ruby-19.nix pkgs/development/libraries/libc++/default.nix pkgs/development/libraries/libc++abi/default.nix pkgs/tools/text/sgml/opensp/default.nix Eelco Dolstra2014-09-231-1/+21
|\
| * build nix head successfullyJoel Taylor2014-09-091-1/+7
| * livcxx buildJoel Taylor2014-09-091-0/+8
| * suitable clang stdenvJoel Taylor2014-09-091-1/+7
* | Prevent an unnecessary evaluation of libEelco Dolstra2014-08-091-3/+3
|/
* Remove the unmaintained (and AFAIK unused) stdenv for mingwEelco Dolstra2014-06-301-24/+10
* Attempt at getting GCC 4.7 compiled on Illumos...•••No success yet :-( Danny Wilson2013-02-281-0/+1
* Merge branch 'stdenv-updates' into pi-stdenv-updates•••Conflicts: pkgs/development/compilers/gcc/4.6/default.nix pkgs/development/compilers/gcc/4.7/default.nix The 4.7 had some weird parameters added in crossAttrs; I've removed them, but I don't understand where they come from. Lluís Batlle i Rossell2012-12-281-3/+4
|\
| * Add an option ‘stdenv.userHook’ to set a global stdenv setup hook•••This allows various applications. It allows users to set global optimisation flags, e.g. stdenv.userHook = ''NIX_CFLAGS_COMPILE+=" -funroll-loops"''; But the impetus is as an alternative to issue #229, allowing impure stdenv setup for people who want to use distcc: stdenv.userHook = "source /my/impure/setup-script.sh"; This is probably a bad idea, but at least now it's a bad idea in people's configuration and not in Nixpkgs. :-) Eelco Dolstra2012-12-281-3/+4