summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorSinan Mohd <sinan@sinanmohd.com>2024-08-17 18:41:32 +0530
committerGitHub <noreply@github.com>2024-08-17 18:41:32 +0530
commit37d813bf6be0570c6feab070002451bd6042b0d7 (patch)
treef27f3cb024e4d114ef0acfe28cdae9f85d0265db /flake.nix
parent316b86f2c4a757f378787c1a2244bd2474f2762e (diff)
parent59b1063ec5174bc0848f4bea37c8b603e23aa967 (diff)
Merge pull request #14 from sinanmohd/feat/nixosTests
nixosTests: WIP integration tests
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix28
1 files changed, 28 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
index 06beed8..b87e287 100644
--- a/flake.nix
+++ b/flake.nix
@@ -27,6 +27,7 @@
inputsFrom = [ self.packages.${system}.evanix ];
packages = with pkgs; [
+ nixfmt-rfc-style
gdb
ccls
valgrind
@@ -34,6 +35,8 @@
flamegraph
nix-eval-jobs
linuxKernel.packages.linux_6_6.perf
+ hyperfine
+ nix-eval-jobs
];
shellHook = ''
@@ -69,5 +72,30 @@
});
}
);
+ legacyPackages = forAllSystems (
+ { pkgs, ... }:
+ {
+ nixosTests = pkgs.callPackage ./nixos/tests/all-tests.nix { };
+ }
+ );
+ checks = forAllSystems (
+ { system, pkgs, ... }:
+ let
+ inherit (pkgs.lib)
+ filterAttrs
+ isDerivation
+ mapAttrs'
+ nameValuePair
+ pipe
+ ;
+ in
+ pipe self.legacyPackages.${system}.nixosTests [
+ (filterAttrs (_: p: isDerivation p))
+ (mapAttrs' (name: nameValuePair "nixosTests-${name}"))
+ ]
+ // {
+ inherit (self.packages.${system}) evanix evanix-py;
+ }
+ );
};
}