about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2024-05-10 23:06:47 +0200
committerAlan Pearce2024-05-10 23:06:47 +0200
commit38c96a03c347395af9afe2c0e19266d6caa0ae0c (patch)
tree607c9d30fabde6f7f09bcac77b26db4915a01743
parent3bbb49e74b8eab7714c2df1162d086f6d731e1e8 (diff)
downloadsearchix-38c96a03c347395af9afe2c0e19266d6caa0ae0c.tar.lz
searchix-38c96a03c347395af9afe2c0e19266d6caa0ae0c.tar.zst
searchix-38c96a03c347395af9afe2c0e19266d6caa0ae0c.zip
build: enable building with nix with embedded frontend
-rw-r--r--default.nix9
1 files changed, 6 insertions, 3 deletions
diff --git a/default.nix b/default.nix
index 3de02f2..b47c0be 100644
--- a/default.nix
+++ b/default.nix
@@ -10,7 +10,7 @@ in
     }
   )
 }:
-{
+rec {
   css = pkgs.fetchurl {
     inherit (sources.simple-css) url sha256;
   };
@@ -18,8 +18,11 @@ in
   searchix = pkgs.buildGoApplication {
     pname = "searchix";
     version = "0.1";
-    pwd = ./.;
-    src = ./.;
+    src = builtins.filterSource (_: type: type != "symlink") ./.;
+    patchPhase = ''
+      cp ${css} frontend/static/base.css
+    '';
+    tags = [ "embed" ];
     modules = ./gomod2nix.toml;
   };