The native CLI
This executable sets up a local development cluster with a pass-through
container registry, mount-through nix store and external load balancer. It’s
automatically accessible as a tool in the nativelink development flake and
self contained to be usable in external projects.
To run the cluster:
native upTo shut the cluster down:
native downTo run the cluster from outside of the development flake:
nix run github:TraceMachina/nativelink#native upTo shut the cluster down from outside of the development flake:
nix run github:TraceMachina/nativelink#native downFrom within the Nix flake:
go get -u ./...go mod tidyThen go to default.nix
and adjust the vendorHash field:
-
Change one character in the hash to invalidate it. Otherwise nix would wrongly reuse locally cached go modules the package updates.
-
Run
nix develop -
You should see an error message like:
error: hash mismatch in fixed-output derivation ...specified: XXXgot: YYY -
Substitute the old
vendorHashvalue withYYY. -
Re-run
nix develop. It should now build.
Ensure that the entire application remains self-contained. This means that no
dynamic paths should point into the nativelink repository. Instead, use the
//go:embed directive to embed for example
templates into the executable rather than reading them disk at runtime.
The same applies to the packaging logic in default.nix.
Pulumi should be bundled via a nix wrapper so that we don’t rely on a user’s
local Pulumi installation.