summary refs log tree commit diff
path: root/nixos/lib/testing-python.nix
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2020-11-07 13:04:50 +0100
committerJonathan Ringer <jonringer@users.noreply.github.com>2021-06-03 11:03:31 -0700
commit3edde6562e19698da69a499881e0a2e4f5a497a2 (patch)
tree72f5322d4a0504bb9081fb4c4d54a36462e3c1a9 /nixos/lib/testing-python.nix
parent049bbd281b619bbb198cc2569db06bf8d6e42ba0 (diff)
downloadnixpkgs-3edde6562e19698da69a499881e0a2e4f5a497a2.tar
nixpkgs-3edde6562e19698da69a499881e0a2e4f5a497a2.tar.gz
nixpkgs-3edde6562e19698da69a499881e0a2e4f5a497a2.tar.bz2
nixpkgs-3edde6562e19698da69a499881e0a2e4f5a497a2.tar.lz
nixpkgs-3edde6562e19698da69a499881e0a2e4f5a497a2.tar.xz
nixpkgs-3edde6562e19698da69a499881e0a2e4f5a497a2.tar.zst
nixpkgs-3edde6562e19698da69a499881e0a2e4f5a497a2.zip
make-test-python: disallow aliases
When importing Nixpkgs within Nixpkgs, we should not consider aliases
to ensure we don't rely on them internally.

There are probably more places that need to be converted.
Diffstat (limited to 'nixos/lib/testing-python.nix')
-rw-r--r--nixos/lib/testing-python.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/nixos/lib/testing-python.nix b/nixos/lib/testing-python.nix
index c9d4f0f0861..99d0a9a0bfa 100644
--- a/nixos/lib/testing-python.nix
+++ b/nixos/lib/testing-python.nix
@@ -130,7 +130,13 @@ rec {
               {
                 virtualisation.qemu.package = qemu_pkg;
               }
-            );
+            ) ++ [(
+              {
+                # Ensure we do not use aliases. Ideally this is only set
+                # when the test framework is used by Nixpkgs NixOS tests.
+                nixpkgs.config.allowAliases = false;
+              }
+            )];
           };
 
           # FIXME: get this pkg from the module system