about summary refs log tree commit diff
path: root/pkgs/top-level/default.nix
AgeCommit message (Collapse)AuthorFilesLines
2022-05-10pkgs/top-level/config.nix: Add warnUndeclaredOptionsRobert Hensing1-4/+2
2021-12-22lib.throwIfNot: initRobert Hensing1-1/+1
2021-12-22nixpkgs: Check overlays typesRobert Hensing1-1/+10
This seems to be a common mistake and is worth checking so we can provide a better error message.
2021-01-23top-level: Simplify impure and pure fallbackJohn Ericson1-14/+10
This is now possible, since the `platform` attribute has been removed in PR #107214. I've been waiting to do a cleanup like this for a long time!
2020-10-01top-level: ignore unexpected argsCole Helbling1-0/+3
This fixes both `nix-shell` failing to eval with `nixUnstable`, as well as ofborg's failure to eval on aarch64 due to passing an "unexpected arg" (https://github.com/NixOS/ofborg/blob/1112e3a8c8621203fae71283d700e0383b5e1e80/ofborg/src/nix.rs#L334-L340).
2019-06-04systems: allow passing in string for cross/localSystemMatthew Bauer1-2/+2
This makes things a little bit more convenient. Just pass in like: $ nix-build ’<nixpkgs>’ -A hello --argstr localSystem x86_64-linux --argstr crossSystem aarch64-linux
2019-03-08pkgs/top-level/stage.nix: don't override `overlays` and `config` in `nixpkgsFun`Jan Malakhovski1-0/+8
`nixpkgsFun` already sets them via `args`. Doing this also introduces unexpected hard to debug errors, see the patch.
2019-03-08pkgs/top-level: check types of `nixpkgs.config`Jan Malakhovski1-6/+21
This patch simply introduces a plain simple NixOS module and passes `nixpkgs.config` through it via `evalModules` (with some temporary hackery to passthru undefined options).
2019-02-03top-level: fix a typoJan Malakhovski1-1/+1
2018-12-04stdenv: implement crossOverlaysMatthew Bauer1-5/+8
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.
2018-03-20top-level: Move comma for stylistic consistencyJohn Ericson1-2/+2
2018-01-31Add setFunctionArgs lib function.Shea Levy1-1/+1
Among other things, this will allow *2nix tools to output plain data while still being composable with the traditional callPackage/.override interfaces.
2017-04-19Fix typo in commentBjørn Forsman1-1/+1
2017-04-17Elaborate `localSystem` and `crossSystem` in a consistent mannerJohn Ericson1-6/+10
2017-04-17lib: Collect system/platform related filesJohn Ericson1-1/+1
Previously, platforms was a random thing in top-level
2017-02-08top-level: Allow nixpkgs to take localSystem directlyJohn Ericson1-30/+17
This is instead of both system and platform, which is kind of ugly.
2017-01-24top-level: Document the `{local,cross}System, contrasting with `*Platform`John Ericson1-0/+16
This is an implementation detail of how the bootstrapping chain is chosen, and thus need not be in the manual.
2017-01-24top-level: Lay the groundwork for `{build,host,target}Platform`John Ericson1-1/+2
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-16Add overlays mechanism to Nixpkgs.Nicolas B. Pierron1-1/+4
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.
2017-01-13top-level: Normalize stdenv bootingJohn Ericson1-10/+13
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.
2016-12-20top-level: missing parenthesesEric Litak1-2/+2
2016-12-15top-level: avoid another `assert false` while we're at itJohn Ericson1-2/+2
2016-12-03top-level: Allow manually specifying a stdenv, and fix stdenv testsJohn Ericson1-1/+5
- The darwin test can now force the use of the freshly-booted darwin stdenv - The linux test now passes enough dummy arguments This may make debugging harder, if so, check out #20889
2016-12-01top-level: Document why `nixpkgsFun` doesn't close over inferred default ↵John Ericson1-2/+9
arguments
2016-12-01top-level: Move default-choosing logic to top-level/platforms.nixJohn Ericson1-17/+7
This mirrors stdenv/default.nix
2016-11-30top-level: Close over fewer arguments for stdenv stagesJohn Ericson1-2/+3
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`.
2016-11-30top-level: Remove cycles: stdenv calls in top-level but not vice versaJohn Ericson1-9/+28
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
2016-11-30top-level: Split some of `pkgs/top-level/default.nix` to ↵John Ericson1-90/+8
`pkgs/top-level/stage.nix` This is preparation for the latter just building a single stage, and the former building a package set with the bootstrapped stdenv.
2016-11-06top-level: `top-level/stdenv.nix` no longer needs `pkg` argumentJohn Ericson1-1/+1
2016-11-06top-level: Make stdenvCross which appears at first glance normal...John Ericson1-1/+6
...but actually is weird just like the original
2016-11-02top-level: Remove redundant arguments from top-level/{all-package,stdenv}.nixJohn Ericson1-2/+2
2016-11-02top-level: Inline topLevelArugments, and make pkg named arg for stdenvJohn Ericson1-6/+7
[Trying my best to indent properly while avoiding excessive drift]
2016-11-02top-level: Remove redundant parenthesesJohn Ericson1-2/+2
2016-11-02top-level: Use `nixpkgsFun` to avoid import ../..John Ericson1-4/+14
2016-10-13top-level: Use foldl' to make the list of package functions top to bottomJohn Ericson1-8/+8
2016-10-13top-level: Make `overridePackages` extend rather than replace existing overridesJohn Ericson1-51/+60
2016-09-29runCommand: Use stdenvNoCCEelco Dolstra1-1/+1
This ensures that most "trivial" derivations used to build NixOS configurations no longer depend on GCC. For commands that do invoke gcc, there is runCommandCC.
2016-07-14Separate fix-point from config importing hacks and other impuritiesJohn Ericson1-16/+3
2016-07-09Make default config an argument default instead of using null checkJohn Ericson1-25/+19
Thanks @Mathnerd314 for this idea
2016-06-22Remove gccWith* arguments which are unusedJohn Ericson1-6/+1
2016-06-21top-level: builtins.toPath no longer neededJohn Ericson1-6/+3
2016-06-17Remove unecessary branching on old nix versionszimbatm1-2/+2
All these builtins are available since 1.10 or earlier (1.10 being the lib/minver.nix)
2016-03-24Fix comments typos.Nicolas B. Pierron1-5/+5
2016-03-20Move stdenvOverrides under pkgsWithOverrides.Nicolas B. Pierron1-11/+11
2016-03-20Replace the merge operators by the fix' and extends functions.Nicolas B. Pierron1-14/+10
2016-03-20Under pkgsWithOverrides, replace the last uses of pkgs by the corresponding ↵Nicolas B. Pierron1-3/+5
argument.
2016-03-20Change the customOverrides to use the stdenvOverrides instead of the ↵Nicolas B. Pierron1-1/+1
original package set.
2016-03-20Move the customOverrides after the stdenvOverrides.Nicolas B. Pierron1-2/+2
This change is not backward compatible, in the sense that this allow you to override the packages which used to be overriden by the last stage of stdenv. Note, this does not mean that these packages would be used by stdenv.
2016-03-20Add bootStdenv condition around the overrider.Nicolas B. Pierron1-1/+4
This condition used to be implicit in the sense that the stdenvOverrides uses pkgs_6, instead of pkgs_7 as its super set, and also that each stage of the compiler is build again the bootstrap packages of the previous stage, thus overriden by the stdenv.override function.
2016-03-20Add extra argument to better identity with the extend function later.Nicolas B. Pierron1-12/+13