diff --git a/tests/default.nix b/tests/default.nix index d1ecddd3..5764ae15 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -3,40 +3,10 @@ let inherit (self.inputs) nixos; inherit (self.nixosConfigurations.NixOS.config.lib) testModule specialArgs; - # current release 20.09 does not support the specialArgs required for us - # to use tests as we would normally use hosts. Using the "testing-python.nix" - # from the override flake would build the test-vm from an unstable os - # different than the one our systems are running. Instead simply patch nixpkgs - # to include the updated version. This can be removed in the next release - patchedNixpkgs = - pkgs.stdenv.mkDerivation { - name = "nixpkgs-patched"; - - src = nixos; - patches = [ ./0004-nixos-testing-Add-support-for-specialArgs.patch ]; - - dontBuild = true; - dontFixup = true; - - versionSuffix = "pre${ - if nixos ? lastModified - then builtins.substring 0 8 (nixos.lastModifiedDate or nixos.lastModified) - else toString nixos.revCount}.${nixos.shortRev or "dirty"}"; - - configurePhase = '' - echo -n $VERSION_SUFFIX > .version-suffix - echo -n ${nixos.rev or nixos.shortRev or "dirty"} > .git-revision - ''; - - installPhase = '' - cp -r $PWD $out - ''; - }; - mkTest = let nixosTesting = - (import "${patchedNixpkgs}/nixos/lib/testing-python.nix" { + (import "${nixos}/nixos/lib/testing-python.nix" { inherit (pkgs.stdenv.hostPlatform) system; inherit specialArgs; inherit pkgs;