From 2e56008ef28109f0895b5918e2d0caeb16a08d8a Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sun, 12 May 2024 21:29:47 +0200 Subject: build: limit files passed to nix --- default.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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 ''; -- cgit 1.4.1