about summary refs log tree commit diff
diff options
context:
space:
mode:
authorIlan Joselevich <personal@ilanjoselevich.com>2024-08-19T12·28+0300
committerIlan Joselevich <personal@ilanjoselevich.com>2024-08-19T12·42+0000
commit0714184b1fb74e7bd7f685ace098aacb07387edc (patch)
treec7636ff3cdba1be4fcce9029867a4ed2e1c9f52c
parent7b1acc5c16967b72f8a3aef7b47967808329744f (diff)
feat(tvix/boot): Use buildGoModule instead of buildGo for tvix-init r/8527
//tvix depending less on other parts of depot is prefered as it will
help with extending the josh workspace of tvix.

Change-Id: Ifcac3af1782dfd82e7543cb4c3ae57fbd186edff
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12250
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
-rw-r--r--tvix/boot/default.nix13
1 files changed, 8 insertions, 5 deletions
diff --git a/tvix/boot/default.nix b/tvix/boot/default.nix
index 7be05c815cdc..60eb2f1b7608 100644
--- a/tvix/boot/default.nix
+++ b/tvix/boot/default.nix
@@ -1,13 +1,16 @@
-{ depot, pkgs, ... }:
+{ lib, pkgs, ... }:
 
 rec {
   # A binary that sets up /nix/store from virtiofs, lists all store paths, and
   # powers off the machine.
-  tvix-init = depot.nix.buildGo.program {
+  tvix-init = pkgs.buildGoModule rec {
     name = "tvix-init";
-    srcs = [
-      ./tvix-init.go
-    ];
+    src = lib.fileset.toSource {
+      root = ./.;
+      fileset = ./tvix-init.go;
+    };
+    vendorHash = null;
+    postPatch = "go mod init ${name}";
   };
 
   # A kernel with virtiofs support baked in