about summary refs log tree commit diff
path: root/pkgs/top-level/impure.nix
AgeCommit message (Collapse)AuthorFilesLines
2021-12-16top-level/impure.nix: refactor by removing 'with builtins'Serhii Khoma1-14/+13
2021-01-23top-level: Simplify impure and pure fallbackJohn Ericson1-20/+14
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-01Revert "top-level: fix nix-shell eval w/nixUnstable"Cole Helbling1-1/+1
This reverts commit fa6064ad86a020f52a75219bff044714f2a9ebbd.
2020-09-11top-level: fix nix-shell eval w/nixUnstableMaximilian Bosch1-1/+1
For a full description of the underlying issue please read https://github.com/NixOS/nix/issues/4003
2019-11-03Revert "stdenv/check-meta: getEnv if the attribute is unset (#72376)" (#72752)Dmitry Kalinkin1-12/+1
This reverts commit 71184f8e157672789602d3f28bdd3c8079800687.
2019-11-03stdenv/check-meta: getEnv if the attribute is unset (#72376)zimbatm1-1/+12
There were two issues: * builtins.getEnv was called deep into the nixpkgs tree making it hard to discover. This is solved by moving the call into pkgs/top-level/impure.nix * when the config was explicitly set by the user to false, it would still try and load the environment variable. This meant that it was not possible to guarantee the same outcome on two different systems.
2019-06-04systems: allow passing in string for cross/localSystemMatthew Bauer1-2/+3
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-04-19top-level/impure.nix: expose crossOverlaysMatthew Bauer1-1/+3
2019-02-03top-level: cleanup whitespaceJan Malakhovski1-5/+5
2018-06-25impure.nix: fix handling of localSystemMatthew Bauer1-1/+2
If we passed a localSystem in, we don’t want the current system to override it. Now we check for localSystem first to avoid getting "mixed" localSystem values from commands like this: nix-build --arg localSystem '{config="x86_64-unknown-linux-musl";}' -A hello Which would eventually evaluate localSystem to this: { config = "x86_64-unknown-linux-musl"; system = "x86_64-darwin"; } & Nix would not be able to run it correctly. Fixes #41599 /cc @Ericson2314
2018-05-04impure.nix: stringify path from NIX_PATHYorick1-1/+1
If impure.nix gets the path from NIX_PATH, the type is `path`, and `path+"/."` is a no-op. Stringify it first so `isDir` will return false if it's not, in fact, a dir. This way, single files can be specified with nixpkgs-overlays in the NIX_PATH.
2017-09-14treewide: Escape backslash in strings properlyTuomas Tynkkynen1-1/+1
"\." is apparently the same as "." wheras the correct one is "\\."
2017-08-17Overlays: allow overlays to be specified in a fileMichael Peyton Jones1-11/+29
2017-04-29impure.nix: add crossSystem as argMatthew Bauer1-1/+2
2017-02-25Allow directories with a default.nix to be imported as an overlay. Closes ↵Tom Hunger1-1/+1
#23016. Note that ${} substitution doesn't work because of the "cannot refer to other paths" constraint. The paranthesis are needed to enforce right-first evaluation.
2017-02-09top-level: Hack around Nix's --arg logic not handling unnamed paramsJohn Ericson1-0/+5
2017-02-08top-level: Allow nixpkgs to take localSystem directlyJohn Ericson1-4/+15
This is instead of both system and platform, which is kind of ugly.
2017-02-01Remove unnecessary "sort" callEelco Dolstra1-1/+1
attrNames already returns names in sorted order.
2017-02-01~/.nixpkgs -> ~/.config/nixpkgsEelco Dolstra1-3/+5
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-02-01$NIXPKGS_OVERLAYS -> <nixpkgs-overlays>Eelco Dolstra1-11/+16
The Nix search path is the established mechanism for specifying the location of Nix expressions, so let's use it instead of adding another environment variable.
2017-02-01Only read overlays ending in .nixEelco Dolstra1-1/+3
For example, this prevents Nix from barfing on editor backup files in ~/.nixpkgs/overlays.
2017-01-16Throw an error if NIXPKGS_OVERLAYS is invalid and improve documentation.Nicolas B. Pierron1-1/+3
2017-01-16Add overlays mechanism to Nixpkgs.Nicolas B. Pierron1-1/+18
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.
2016-07-14Separate fix-point from config importing hacks and other impuritiesJohn Ericson1-0/+24