make flake.nix test pure

This commit is contained in:
Jörg Thalheim
2025-11-11 15:39:23 +01:00
parent 281b49208c
commit b254962aa8
4 changed files with 24 additions and 10 deletions

View File

@@ -1,4 +1,6 @@
with import ./config.nix;
{ system ? builtins.currentSystem }:
with import ./config.nix { inherit system; };
{
empty_dir =
mkDerivation {

View File

@@ -1,9 +1,11 @@
{ system ? builtins.currentSystem }:
rec {
path = "@testPath@";
mkDerivation = args:
derivation ({
system = builtins.currentSystem;
inherit system;
PATH = path;
} // args);
mkContentAddressedDerivation = args: mkDerivation ({

View File

@@ -1,6 +1,11 @@
{
outputs = { ... }: {
checks =
import ./basic.nix;
};
outputs = { self, ... }:
let
systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forAllSystems = f: builtins.listToAttrs (map (system: { name = system; value = f system; }) systems);
in {
checks = forAllSystems (system:
import ./basic.nix { inherit system; }
);
};
}

View File

@@ -1,6 +1,11 @@
{
outputs = { ... }: {
hydraJobs =
import ./basic.nix;
};
outputs = { self, ... }:
let
systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forAllSystems = f: builtins.listToAttrs (map (system: { name = system; value = f system; }) systems);
in {
hydraJobs = forAllSystems (system:
import ./basic.nix { inherit system; }
);
};
}