feat(tvix/boot): Use buildGoModule instead of buildGo for tvix-init

//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
This commit is contained in:
Ilan Joselevich 2024-08-19 15:28:22 +03:00
parent 7b1acc5c16
commit 0714184b1f

View file

@ -1,13 +1,16 @@
{ depot, pkgs, ... }: { lib, pkgs, ... }:
rec { rec {
# A binary that sets up /nix/store from virtiofs, lists all store paths, and # A binary that sets up /nix/store from virtiofs, lists all store paths, and
# powers off the machine. # powers off the machine.
tvix-init = depot.nix.buildGo.program { tvix-init = pkgs.buildGoModule rec {
name = "tvix-init"; name = "tvix-init";
srcs = [ src = lib.fileset.toSource {
./tvix-init.go root = ./.;
]; fileset = ./tvix-init.go;
};
vendorHash = null;
postPatch = "go mod init ${name}";
}; };
# A kernel with virtiofs support baked in # A kernel with virtiofs support baked in