about summary refs log tree commit diff stats
path: root/default.nix
diff options
context:
space:
mode:
authorAlan Pearce2024-05-12 21:29:47 +0200
committerAlan Pearce2024-05-12 21:34:57 +0200
commit2e56008ef28109f0895b5918e2d0caeb16a08d8a (patch)
tree5753f9214942c903535dd53148a6027a91ea5128 /default.nix
parent53c9fb2f72cbc82177404b76a4aad14283f8ced1 (diff)
downloadsearchix-2e56008ef28109f0895b5918e2d0caeb16a08d8a.tar.lz
searchix-2e56008ef28109f0895b5918e2d0caeb16a08d8a.tar.zst
searchix-2e56008ef28109f0895b5918e2d0caeb16a08d8a.zip
build: limit files passed to nix
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix15
1 files changed, 14 insertions, 1 deletions
diff --git a/default.nix b/default.nix
index b47c0be..506be0e 100644
--- a/default.nix
+++ b/default.nix
@@ -18,7 +18,20 @@ rec {
   searchix = pkgs.buildGoApplication {
     pname = "searchix";
     version = "0.1";
-    src = builtins.filterSource (_: type: type != "symlink") ./.;
+    src = with pkgs.lib.fileset; toSource {
+      root = ./.;
+      fileset = intersection
+        (unions [
+          ./go.mod
+          ./go.sum
+          ./serve
+          ./import
+          ./internal
+          ./frontend
+        ])
+        (gitTracked ./.);
+    };
+
     patchPhase = ''
       cp ${css} frontend/static/base.css
     '';