mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-12-02 13:06:11 +01:00
cc362a70e4
Signed-off-by: magic_rb <magic_rb@redalder.org>
39 lines
792 B
Nix
39 lines
792 B
Nix
{self, ...}: {
|
|
perSystem = {pkgs, ...}: {
|
|
checks.router = pkgs.stdenv.mkDerivation {
|
|
name = "router";
|
|
phases = [
|
|
"runPhase"
|
|
];
|
|
|
|
env.ROUTER_CMD =
|
|
(self.nixosConfigurations.liveusb.extendModules {
|
|
modules = [
|
|
"${pkgs.path}/nixos/modules/testing/test-instrumentation.nix"
|
|
];
|
|
})
|
|
.config
|
|
.system
|
|
.build
|
|
.vm;
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
iproute2
|
|
(python3.withPackages (ps:
|
|
with ps; [
|
|
ptpython
|
|
colorama
|
|
junit-xml
|
|
]))
|
|
];
|
|
|
|
runPhase = ''
|
|
PYTHONPATH=${pkgs.path}/nixos/lib/test-driver python ${./router.py}
|
|
|
|
mkdir -p $out
|
|
touch $out/success
|
|
'';
|
|
};
|
|
};
|
|
}
|