From e575c235702855afaec15ea9485859a39e64beea Mon Sep 17 00:00:00 2001 From: David Arnold Date: Fri, 28 May 2021 17:39:22 -0500 Subject: [PATCH] rm: fix nixosPath nixosPath would get reified in the nix store as /nix/store/-nixos which breakes any referenced from within ./nixpkgs/nixos to ../lib or ../pkgs --- src/kubenix.nix | 1 - src/modules/testing/default.nix | 2 +- src/modules/testing/runtime/nixos-k8s.nix | 5 ++--- tests/default.nix | 4 +--- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/kubenix.nix b/src/kubenix.nix index d0f4ebe..240c07a 100644 --- a/src/kubenix.nix +++ b/src/kubenix.nix @@ -10,7 +10,6 @@ let defaultSpecialArgs = { inherit kubenix; - nixosPath = pkgs.path + "/nixos"; }; # evalModules with same interface as lib.evalModules and kubenix as diff --git a/src/modules/testing/default.nix b/src/modules/testing/default.nix index ec324b8..b813b3d 100644 --- a/src/modules/testing/default.nix +++ b/src/modules/testing/default.nix @@ -1,4 +1,4 @@ -{ nixosPath, config, pkgs, lib, kubenix, ... }: +{ config, pkgs, lib, kubenix, ... }: with lib; let diff --git a/src/modules/testing/runtime/nixos-k8s.nix b/src/modules/testing/runtime/nixos-k8s.nix index fde5540..7251ceb 100644 --- a/src/modules/testing/runtime/nixos-k8s.nix +++ b/src/modules/testing/runtime/nixos-k8s.nix @@ -1,7 +1,6 @@ # nixos-k8s implements nixos kubernetes testing runtime -{ nixosPath -, config +{ config , pkgs , lib , ... @@ -74,7 +73,7 @@ let ''; test = - with import "${nixosPath}/tests/kubernetes/base.nix" { inherit pkgs; inherit (pkgs) system; }; + with import "${pkgs.path}/nixos/tests/kubernetes/base.nix" { inherit pkgs; inherit (pkgs) system; }; mkKubernetesSingleNodeTest { inherit extraConfiguration; inherit (config.testing) name; diff --git a/tests/default.nix b/tests/default.nix index 63cc31c..9b26103 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -2,8 +2,6 @@ , lib ? pkgs.lib , kubenix ? (import ../. { }).default -, nixosPath ? toString - , k8sVersion ? "1.21" , registryUrl ? throw "Registry url not defined" , throwError ? true # whether any testing error should throw an error @@ -58,7 +56,7 @@ let inherit pkgs; }; specialArgs = { - inherit kubenix nixosPath; + inherit kubenix; }; }).config; in