summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstuebinm2025-05-04 19:09:44 +0200
committerstuebinm2025-05-04 19:15:01 +0200
commit2e23053c8ef76416553973cc227ac976a9765128 (patch)
tree7afcbe4f151f02279d542fb9b4d076e3a63e6804
parent2ebb1305c8bd4ae069c5053ac8e33f19b43e9b09 (diff)
tests: use nixpkgs without unnecessary overlays
introduces a 'boring' nixpkgs used by default for running VM tests in this repo, i.e. do not force others to build my current version of things like lix, which I overlay & which are part of any system closure, but not actually important for testing.
-rw-r--r--default.nix2
-rw-r--r--inputs.nix10
-rw-r--r--tests/default.nix2
3 files changed, 12 insertions, 2 deletions
diff --git a/default.nix b/default.nix
index 1d100d1..55e130e 100644
--- a/default.nix
+++ b/default.nix
@@ -87,7 +87,7 @@ let
modules = import ./modules;
packages = import ./pkgs { inherit nixpkgs; };
- tests = import ./tests { inherit nixpkgs; };
+ tests = import ./tests { inherit nixpkgs; inherit system; };
};
in self
diff --git a/inputs.nix b/inputs.nix
index 8902303..7329531 100644
--- a/inputs.nix
+++ b/inputs.nix
@@ -34,6 +34,16 @@ let
];
} // { outPath = sources.nixpkgs.outPath; };
+ # 'boring' version of nixpkgs with fewer (used for vm tests,
+ # so they're buildable without having to compile e.g. the lix version
+ # from the overlay)
+ nixpkgs-boring = import sources.nixpkgs {
+ inherit system;
+ overlays = [
+ (import ./pkgs/overlay.nix { inherit inputs; })
+ ];
+ } // { outPath = sources.nixpkgs.outPath; };
+
nixpkgs-unstable =
import sources.nixpkgs-unstable { inherit system; }
// { outPath = sources.nixpkgs-unstable.outPath; };
diff --git a/tests/default.nix b/tests/default.nix
index 5c165db..06d2f52 100644
--- a/tests/default.nix
+++ b/tests/default.nix
@@ -1,4 +1,4 @@
-{ nixpkgs ? (import ../inputs.nix { }).nixpkgs }:
+{ system ? "x86_64-linux", nixpkgs ? (import ../inputs.nix { inherit system; }).nixpkgs-boring }:
{
bookwyrm = nixpkgs.nixosTest ./bookwyrm.nix;