fix nt depends on pipe-operators
This commit is contained in:
parent
d3690e9813
commit
c84d84231b
1 changed files with 33 additions and 19 deletions
|
|
@ -5,19 +5,32 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit
|
inherit
|
||||||
(deps)
|
(builtins)
|
||||||
nixpkgs
|
concatStringsSep
|
||||||
nix-unit
|
|
||||||
;
|
;
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
(this.util)
|
(this.util)
|
||||||
forAllSystems
|
forAllSystems
|
||||||
;
|
;
|
||||||
|
|
||||||
|
inherit
|
||||||
|
(deps)
|
||||||
|
nixpkgs
|
||||||
|
nix-unit
|
||||||
|
;
|
||||||
|
in let
|
||||||
|
enable-experimental = concatStringsSep " " [
|
||||||
|
"flakes"
|
||||||
|
"nix-command"
|
||||||
|
"pipe-operators"
|
||||||
|
];
|
||||||
in {
|
in {
|
||||||
checks = forAllSystems (system: {
|
# XXX: TODO: assert false || throw "TEST: type of flake is \"${builtins.typeOf flake}\""
|
||||||
|
checks = forAllSystems (
|
||||||
|
system: pkgs: {
|
||||||
default =
|
default =
|
||||||
nixpkgs.legacyPackages.${system}.runCommand "tests"
|
pkgs.runCommand "tests"
|
||||||
{
|
{
|
||||||
nativeBuildInputs = [nix-unit.packages.${system}.default];
|
nativeBuildInputs = [nix-unit.packages.${system}.default];
|
||||||
}
|
}
|
||||||
|
|
@ -25,10 +38,11 @@ in {
|
||||||
export HOME="$(realpath .)"
|
export HOME="$(realpath .)"
|
||||||
# The nix derivation must be able to find all used inputs in the nix-store because it cannot download it during buildTime.
|
# The nix derivation must be able to find all used inputs in the nix-store because it cannot download it during buildTime.
|
||||||
nix-unit --eval-store "$HOME" \
|
nix-unit --eval-store "$HOME" \
|
||||||
--extra-experimental-features flakes \
|
--extra-experimental-features "${enable-experimental}" \
|
||||||
--override-input nixpkgs ${nixpkgs} \
|
--override-input nixpkgs ${nixpkgs} \
|
||||||
--flake ${flake}#tests
|
--flake ${flake}\#tests
|
||||||
touch $out
|
touch $out
|
||||||
'';
|
'';
|
||||||
});
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue