From 0a955d0a4cb768db5b4d00050ed9c9e10efa7255 Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Thu, 27 Jan 2022 18:48:25 -0800 Subject: [PATCH] integration-tests: Also run apply test against stable nixpkgs --- flake.lock | 25 +++++++++++++++++++++---- flake.nix | 4 +++- integration-tests/default.nix | 6 ++++++ integration-tests/nixpkgs-stable.nix | 8 ++++++++ integration-tests/tools.nix | 2 +- 5 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 integration-tests/nixpkgs-stable.nix diff --git a/flake.lock b/flake.lock index 07f0ad3..907d1cb 100644 --- a/flake.lock +++ b/flake.lock @@ -68,16 +68,16 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1642492175, - "narHash": "sha256-lo5hxiY8U4eREChAR7JD94zns92hQqmp3wg3qTFolPA=", + "lastModified": 1643080866, + "narHash": "sha256-iO3Z6jw0HEiie8UnXVpq1SxphprDYBXrVzubEa5D4eE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9789ed45b759c8f770bcba4b06c1a1c5ec386664", + "rev": "c07b471b52be8fbc49a7dc194e9b37a6e19ee04d", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixpkgs-unstable", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } @@ -87,9 +87,26 @@ "flake-compat": "flake-compat", "nix-eval-jobs": "nix-eval-jobs", "nixpkgs": "nixpkgs_2", + "stable": "stable", "utils": "utils" } }, + "stable": { + "locked": { + "lastModified": 1642961095, + "narHash": "sha256-RLatktZmvwFBOyqdoIk4qdS4OGKB7aKIvvs4ZP2L8D8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "604c44137d97b5111be1ca5c0d97f6e24fbc5c2c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-21.11", + "repo": "nixpkgs", + "type": "github" + } + }, "utils": { "locked": { "lastModified": 1638122382, diff --git a/flake.nix b/flake.nix index 98d39a4..b04e551 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,9 @@ description = "A simple, stateless NixOS deployment tool modeled after NixOps."; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + stable.url = "github:NixOS/nixpkgs/nixos-21.11"; + utils.url = "github:numtide/flake-utils"; # not yet upstreamed diff --git a/integration-tests/default.nix b/integration-tests/default.nix index 1341f3c..a7450d8 100644 --- a/integration-tests/default.nix +++ b/integration-tests/default.nix @@ -7,4 +7,10 @@ flakes = import ./flakes {}; flakes-streaming = import ./flakes { evaluator = "streaming"; }; parallel = import ./parallel {}; + + apply-stable = let + test = import ./apply { pkgs = import ./nixpkgs-stable.nix; }; + in test.override (old: { + name = "apply-stable"; + }); } diff --git a/integration-tests/nixpkgs-stable.nix b/integration-tests/nixpkgs-stable.nix new file mode 100644 index 0000000..a23282b --- /dev/null +++ b/integration-tests/nixpkgs-stable.nix @@ -0,0 +1,8 @@ +let + flake = (import ../flake-compat.nix).defaultNix; +in import flake.inputs.stable.outPath { + overlays = [ + flake._evalJobsOverlay + flake.overlay + ]; +} diff --git a/integration-tests/tools.nix b/integration-tests/tools.nix index 1a4be9c..51552c5 100644 --- a/integration-tests/tools.nix +++ b/integration-tests/tools.nix @@ -174,7 +174,7 @@ let } // test // { testScript = fullScript; }; - in pkgs.nixosTest combined; + in lib.makeOverridable pkgs.nixosTest combined; in { inherit pkgs nodes colmena colmenaExec getStandaloneConfigFor inputClosureOf makeTest;