about summary refs log tree commit diff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix20
1 files changed, 16 insertions, 4 deletions
diff --git a/flake.nix b/flake.nix
index 900d879..4de70c6 100644
--- a/flake.nix
+++ b/flake.nix
@@ -187,12 +187,25 @@
     };
     rust-bin = pkgs.rust-bin.stable.latest;
     packages = {
-      kittybox = { stdenv, lib, openssl, zlib, pkg-config, protobuf, naersk-lib, lld, mold }:
+      kittybox = { stdenv, lib, runCommandNoCC, openssl, zlib, pkg-config, protobuf, naersk-lib, lld, mold }:
       naersk-lib.buildPackage {
         pname = "kittybox";
         version = "0.1.0";
 
-        src = ./.;
+        /*src = builtins.filterSource (name: type: builtins.elem (builtins.elemAt (lib.splitString "/" name) 4) [
+          "Cargo.toml" "Cargo.lock"
+          "src" "templates" "util"
+          "fonts"
+        ]) ./.;*/
+        src = runCommandNoCC "kittybox-src" {} ''
+          mkdir -p $out
+          cp -r ${./Cargo.toml} $out/Cargo.toml
+          cp -r ${./Cargo.lock} $out/Cargo.lock
+          cp -r ${./src} $out/src
+          cp -r ${./templates} $out/templates
+          cp -r ${./util} $out/util
+          cp -r ${./fonts} $out/fonts
+        '';
 
         checkInputs = [ openssl.dev zlib ];
         nativeBuildInputs = [ pkg-config protobuf ];
@@ -200,8 +213,6 @@
 
         doCheck = stdenv.hostPlatform == stdenv.targetPlatform;
 
-        singleStep = true;
-
         meta = with lib.meta; {
           maintainers = with lib.maintainers; [ vikanezrimaya ];
           platforms = supportedSystems;
@@ -221,6 +232,7 @@
 
     checks = {
       kittybox = self.packages.${system}.kittybox;
+      distributed-test = pkgs.nixosTest (import ./distributed-test.nix self);
       nixos-test = (pkgs.nixosTest ({ lib }: {
         name = "nixos-kittybox";