diff options
author | Shea Levy <shea@shealevy.com> | 2018-02-02 09:41:16 -0500 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2018-02-02 09:41:16 -0500 |
commit | 43f647e5b44a875a7928790a6a5628af1f9350c5 (patch) | |
tree | 0638443f20cf52c58afc4c264c356fd54a9c326c /nixos | |
parent | f8c59e083ab2f70457c0b4f2086100d916a60c77 (diff) | |
parent | 943592f69850fd07dd2422da062b1c1ebc45974d (diff) | |
download | nixpkgs-43f647e5b44a875a7928790a6a5628af1f9350c5.tar nixpkgs-43f647e5b44a875a7928790a6a5628af1f9350c5.tar.gz nixpkgs-43f647e5b44a875a7928790a6a5628af1f9350c5.tar.bz2 nixpkgs-43f647e5b44a875a7928790a6a5628af1f9350c5.tar.lz nixpkgs-43f647e5b44a875a7928790a6a5628af1f9350c5.tar.xz nixpkgs-43f647e5b44a875a7928790a6a5628af1f9350c5.tar.zst nixpkgs-43f647e5b44a875a7928790a6a5628af1f9350c5.zip |
Merge branch 'dynamic-function-args'
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/doc/manual/default.nix | 2 | ||||
-rw-r--r-- | nixos/lib/testing.nix | 2 | ||||
-rw-r--r-- | nixos/modules/misc/nixpkgs.nix | 6 | ||||
-rw-r--r-- | nixos/modules/profiles/clone-config.nix | 2 | ||||
-rw-r--r-- | nixos/tests/make-test.nix | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/nixos/doc/manual/default.nix b/nixos/doc/manual/default.nix index 9bc83be6610..8079a2feb29 100644 --- a/nixos/doc/manual/default.nix +++ b/nixos/doc/manual/default.nix @@ -12,7 +12,7 @@ let substFunction = x: if builtins.isAttrs x then lib.mapAttrs (name: substFunction) x else if builtins.isList x then map substFunction x - else if builtins.isFunction x then "<function>" + else if lib.isFunction x then "<function>" else x; # Clean up declaration sites to not refer to the NixOS source tree. diff --git a/nixos/lib/testing.nix b/nixos/lib/testing.nix index 532fff681d3..cf213d906f5 100644 --- a/nixos/lib/testing.nix +++ b/nixos/lib/testing.nix @@ -85,7 +85,7 @@ rec { testScript' = # Call the test script with the computed nodes. - if builtins.isFunction testScript + if lib.isFunction testScript then testScript { inherit nodes; } else testScript; diff --git a/nixos/modules/misc/nixpkgs.nix b/nixos/modules/misc/nixpkgs.nix index 1793c1447d6..b01f5431909 100644 --- a/nixos/modules/misc/nixpkgs.nix +++ b/nixos/modules/misc/nixpkgs.nix @@ -4,10 +4,10 @@ with lib; let isConfig = x: - builtins.isAttrs x || builtins.isFunction x; + builtins.isAttrs x || lib.isFunction x; optCall = f: x: - if builtins.isFunction f + if lib.isFunction f then f x else f; @@ -38,7 +38,7 @@ let overlayType = mkOptionType { name = "nixpkgs-overlay"; description = "nixpkgs overlay"; - check = builtins.isFunction; + check = lib.isFunction; merge = lib.mergeOneOption; }; diff --git a/nixos/modules/profiles/clone-config.nix b/nixos/modules/profiles/clone-config.nix index 77d86f8d740..5b4e68beb6a 100644 --- a/nixos/modules/profiles/clone-config.nix +++ b/nixos/modules/profiles/clone-config.nix @@ -17,7 +17,7 @@ let # you should use files). moduleFiles = # FIXME: use typeOf (Nix 1.6.1). - filter (x: !isAttrs x && !builtins.isFunction x) modules; + filter (x: !isAttrs x && !lib.isFunction x) modules; # Partition module files because between NixOS and non-NixOS files. NixOS # files may change if the repository is updated. diff --git a/nixos/tests/make-test.nix b/nixos/tests/make-test.nix index f3e26aa7e74..1b571a008e0 100644 --- a/nixos/tests/make-test.nix +++ b/nixos/tests/make-test.nix @@ -2,4 +2,4 @@ f: { system ? builtins.currentSystem, ... } @ args: with import ../lib/testing.nix { inherit system; }; -makeTest (if builtins.isFunction f then f (args // { inherit pkgs; inherit (pkgs) lib; }) else f) +makeTest (if lib.isFunction f then f (args // { inherit pkgs; inherit (pkgs) lib; }) else f) |