fix nt depends on pipe-operators

This commit is contained in:
Emile Clark-Boman 2026-01-28 08:49:21 +10:00
parent d3690e9813
commit c84d84231b

View file

@ -5,30 +5,44 @@
... ...
}: 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}\""
default = checks = forAllSystems (
nixpkgs.legacyPackages.${system}.runCommand "tests" system: pkgs: {
{ default =
nativeBuildInputs = [nix-unit.packages.${system}.default]; pkgs.runCommand "tests"
} {
'' nativeBuildInputs = [nix-unit.packages.${system}.default];
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. ''
nix-unit --eval-store "$HOME" \ export HOME="$(realpath .)"
--extra-experimental-features flakes \ # The nix derivation must be able to find all used inputs in the nix-store because it cannot download it during buildTime.
--override-input nixpkgs ${nixpkgs} \ nix-unit --eval-store "$HOME" \
--flake ${flake}#tests --extra-experimental-features "${enable-experimental}" \
touch $out --override-input nixpkgs ${nixpkgs} \
''; --flake ${flake}\#tests
}); touch $out
'';
}
);
} }