diff options
author | Daiderd Jordan <daiderd@gmail.com> | 2017-02-14 23:18:44 +0100 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2017-03-03 13:45:22 +0100 |
commit | d88721e4408988202a0ae3cea3f5551ebfa13168 (patch) | |
tree | 5eca06d1133b1615b7c6e667ba7c42f7e97548b3 /lib/tests/modules | |
parent | bb9a37a2a56249483cd98ef09c254b78e736af1a (diff) |
modules: add support for module replacement with disabledModules
This is based on a prototype Nicolas B. Pierron worked on during a
discussion we had at FOSDEM.
A new version with a workaround for problems of the reverted original.
Discussion: https://github.com/NixOS/nixpkgs/commit/3f2566689
Diffstat (limited to 'lib/tests/modules')
-rw-r--r-- | lib/tests/modules/default.nix | 1 | ||||
-rw-r--r-- | lib/tests/modules/disable-declare-enable.nix | 5 | ||||
-rw-r--r-- | lib/tests/modules/disable-define-enable.nix | 5 | ||||
-rw-r--r-- | lib/tests/modules/disable-enable-modules.nix | 5 |
4 files changed, 16 insertions, 0 deletions
diff --git a/lib/tests/modules/default.nix b/lib/tests/modules/default.nix index c5ce9cb3e3b8..5b0947104198 100644 --- a/lib/tests/modules/default.nix +++ b/lib/tests/modules/default.nix @@ -3,5 +3,6 @@ { inherit (lib.evalModules { inherit modules; + specialArgs.modulesPath = ./.; }) config options; } diff --git a/lib/tests/modules/disable-declare-enable.nix b/lib/tests/modules/disable-declare-enable.nix new file mode 100644 index 000000000000..a373ee7e550e --- /dev/null +++ b/lib/tests/modules/disable-declare-enable.nix @@ -0,0 +1,5 @@ +{ lib, ... }: + +{ + disabledModules = [ ./declare-enable.nix ]; +} diff --git a/lib/tests/modules/disable-define-enable.nix b/lib/tests/modules/disable-define-enable.nix new file mode 100644 index 000000000000..0d84a7c3cb6c --- /dev/null +++ b/lib/tests/modules/disable-define-enable.nix @@ -0,0 +1,5 @@ +{ lib, ... }: + +{ + disabledModules = [ ./define-enable.nix ]; +} diff --git a/lib/tests/modules/disable-enable-modules.nix b/lib/tests/modules/disable-enable-modules.nix new file mode 100644 index 000000000000..c325f4e07431 --- /dev/null +++ b/lib/tests/modules/disable-enable-modules.nix @@ -0,0 +1,5 @@ +{ lib, ... }: + +{ + disabledModules = [ "define-enable.nix" "declare-enable.nix" ]; +} |