From 436fbb08e8c70dec921953ba15c340680a314a62 Mon Sep 17 00:00:00 2001 From: Timothy DeHerrera Date: Tue, 16 Mar 2021 15:49:33 -0600 Subject: [PATCH] tests: patched nixpkgs no longer needed --- tests/default.nix | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) 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;