mirror of
https://github.com/nix-community/disko.git
synced 2026-12-01 21:43:29 +01:00
This requires a lot of restructuring. The .nix files have to be bundled together with the python files, so they need to follow python's module system structure. I ran `nix-fast-build --no-link -j 2 --eval-workers 3 --flake .#checks` and it succeeded, so I'm reasonably confident I changed everything as required.
21 lines
782 B
Nix
21 lines
782 B
Nix
{ makeTest ? import <nixpkgs/nixos/tests/make-test-python.nix>
|
|
, eval-config ? import <nixpkgs/nixos/lib/eval-config.nix>
|
|
, pkgs ? import <nixpkgs> { }
|
|
}:
|
|
let
|
|
lib = pkgs.lib;
|
|
diskoLib = import ../src/disko_lib { inherit lib makeTest eval-config; };
|
|
|
|
allTestFilenames =
|
|
builtins.map (lib.removeSuffix ".nix") (
|
|
builtins.filter
|
|
(x: lib.hasSuffix ".nix" x && x != "default.nix")
|
|
(lib.attrNames (builtins.readDir ./.))
|
|
);
|
|
incompatibleTests = lib.optionals pkgs.buildPlatform.isRiscV64 [ "zfs" "zfs-over-legacy" "cli" "module" "complex" ];
|
|
allCompatibleFilenames = lib.subtractLists incompatibleTests allTestFilenames;
|
|
|
|
allTests = lib.genAttrs allCompatibleFilenames (test: import (./. + "/${test}.nix") { inherit diskoLib pkgs; });
|
|
in
|
|
allTests
|