···678{ # The system (e.g., `i686-linux') for which to build the packages.
9- system ? builtins.currentSystem
1011, # The standard environment to use. Only used for bootstrapping. If
12 # null, the default standard environment is used.
···19 && system != "x86_64-solaris"
20 && system != "x86_64-kfreebsd-gnu")
2122-, # Allow a configuration attribute set to be passed in as an
23- # argument. Otherwise, it's read from $NIXPKGS_CONFIG or
24- # ~/.nixpkgs/config.nix.
25- #
26- # [For NixOS (nixos-rebuild), use nixpkgs.config option to set.]
27- config ? let
28- inherit (builtins) getEnv pathExists;
29-30- configFile = getEnv "NIXPKGS_CONFIG";
31- homeDir = getEnv "HOME";
32- configFile2 = homeDir + "/.nixpkgs/config.nix";
33- in
34- if configFile != "" && pathExists configFile then import configFile
35- else if homeDir != "" && pathExists configFile2 then import configFile2
36- else {}
3738, crossSystem ? null
39, platform ? null
···678{ # The system (e.g., `i686-linux') for which to build the packages.
9+ system
1011, # The standard environment to use. Only used for bootstrapping. If
12 # null, the default standard environment is used.
···19 && system != "x86_64-solaris"
20 && system != "x86_64-kfreebsd-gnu")
2122+, # Allow a configuration attribute set to be passed in as an argument.
23+ config ? {}
00000000000002425, crossSystem ? null
26, platform ? null
+24
pkgs/top-level/impure.nix
···000000000000000000000000
···1+/* Impure default args for `pkgs/top-level/default.nix`. See that file
2+ for the meaning of each argument. */
3+4+{ # Fallback: Assume we are building packages for the current (host, in GNU
5+ # Autotools parlance) system.
6+ system ? builtins.currentSystem
7+8+, # Fallback: The contents of the configuration file found at $NIXPKGS_CONFIG or
9+ # $HOME/.nixpkgs/config.nix.
10+ config ? let
11+ inherit (builtins) getEnv pathExists;
12+13+ configFile = getEnv "NIXPKGS_CONFIG";
14+ homeDir = getEnv "HOME";
15+ configFile2 = homeDir + "/.nixpkgs/config.nix";
16+ in
17+ if configFile != "" && pathExists configFile then import configFile
18+ else if homeDir != "" && pathExists configFile2 then import configFile2
19+ else {}
20+21+, ...
22+} @ args:
23+24+import ./. (args // { inherit system config; })