mirror of
https://github.com/nix-community/disko
synced 2024-11-10 06:14:14 +00:00
3979285062
This was recently changed in nixpkgs to be an alias; if nixpkgs is configured to disable aliases, this usage will fail.
20 lines
779 B
Nix
20 lines
779 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 ../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.stdenv.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
|