From 3b369190bfef752042a16f6f3ed466dbcf889672 Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone <exarkun@twistedmatrix.com> Date: Tue, 5 Oct 2021 10:01:07 -0400 Subject: [PATCH] now we can easily parameterize pkgs, too --- default.nix | 4 ++-- nixos/system-tests.nix | 5 ++--- nixos/unit-tests.nix | 3 +-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/default.nix b/default.nix index 9d9784d5..6441675a 100644 --- a/default.nix +++ b/default.nix @@ -6,9 +6,9 @@ # Run some system integration tests in VMs covering some of the software # we're integrating (ie, application functionality). - system-tests = import ./nixos/system-tests.nix; + system-tests = pkgs.callPackage ./nixos/system-tests.nix { }; # Run some unit tests of the Nix that ties all of these things together (ie, # PrivateStorageio-internal library functionality). - unit-tests = import ./nixos/unit-tests.nix; + unit-tests = pkgs.callPackage ./nixos/unit-tests.nix { }; } diff --git a/nixos/system-tests.nix b/nixos/system-tests.nix index 7b6d382a..218132fe 100644 --- a/nixos/system-tests.nix +++ b/nixos/system-tests.nix @@ -1,7 +1,6 @@ # The overall system test suite for PrivateStorageio NixOS configuration. -let - pkgs = import ../nixpkgs-2105.nix { }; -in { +{ pkgs }: +{ private-storage = pkgs.nixosTest ./tests/private-storage.nix; spending = pkgs.nixosTest ./tests/spending.nix; tahoe = pkgs.nixosTest ./tests/tahoe.nix; diff --git a/nixos/unit-tests.nix b/nixos/unit-tests.nix index 75016a17..b9f72bf9 100644 --- a/nixos/unit-tests.nix +++ b/nixos/unit-tests.nix @@ -1,7 +1,6 @@ # The overall unit test suite for PrivateStorageio NixOS configuration. +{ pkgs }: let - pkgs = import <nixpkgs> { }; - # Total the numbers in a list. sum = builtins.foldl' (a: b: a + b) 0; -- GitLab