about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2023-07-09 01:36:52 +0300
committerVika <vika@fireburn.ru>2023-07-09 01:36:52 +0300
commit63148c502c11fcbe99f335c5d214fba84eda1c1c (patch)
tree6040f67c7eafc1e584d868545009b4b878df368c
parent7724c54b4bd8edc9c9cca3e0ae1b459b4550e0fb (diff)
downloadkittybox-63148c502c11fcbe99f335c5d214fba84eda1c1c.tar.zst
Passthru NixOS VM tests
-rw-r--r--flake.nix3
-rw-r--r--kittybox.nix8
2 files changed, 9 insertions, 2 deletions
diff --git a/flake.nix b/flake.nix
index bcbb7dc..bb4ef65 100644
--- a/flake.nix
+++ b/flake.nix
@@ -32,6 +32,9 @@
       kittybox = pkgs.callPackage ./kittybox.nix {
         naersk = naersk.lib.${system};
         inherit (pkgs.nodePackages) typescript;
+        nixosTests = {
+          smokeTest = self.checks.${system}.nixos-test;
+        };
       };
       default = self.packages.${system}.kittybox;
     };
diff --git a/kittybox.nix b/kittybox.nix
index 2dd6ee6..d7577fd 100644
--- a/kittybox.nix
+++ b/kittybox.nix
@@ -1,6 +1,6 @@
 { stdenv, lib, naersk, lld, mold, typescript
-, openssl, zlib, pkg-config, protobuf
-, useWebAuthn ? false }:
+, useWebAuthn ? false, openssl, zlib, pkg-config, protobuf
+, nixosTests }:
 
 assert useWebAuthn -> openssl != null && pkg-config != null;
 
@@ -17,6 +17,10 @@ naersk.buildPackage {
   buildInputs = lib.optional useWebAuthn openssl;
   nativeBuildInputs = [ typescript ] ++ (lib.optional useWebAuthn pkg-config);
 
+  passthru = {
+    tests = nixosTests;
+  };
+
   meta = with lib.meta; {
     maintainers = with lib.maintainers; [ vikanezrimaya ];
     platforms = ["aarch64-linux" "x86_64-linux"];