diff options
author | Sinan Mohd <sinan@sinanmohd.com> | 2024-08-17 18:41:32 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-17 18:41:32 +0530 |
commit | 37d813bf6be0570c6feab070002451bd6042b0d7 (patch) | |
tree | f27f3cb024e4d114ef0acfe28cdae9f85d0265db /flake.nix | |
parent | 316b86f2c4a757f378787c1a2244bd2474f2762e (diff) | |
parent | 59b1063ec5174bc0848f4bea37c8b603e23aa967 (diff) |
Merge pull request #14 from sinanmohd/feat/nixosTests
nixosTests: WIP integration tests
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -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; + } + ); }; } |