flake: fixup version embedding (#9997)

It looks like `gitCommitStamp` is the new "entrypoint" for setting this
information.

Fixes #9996.

Signed-off-by: Cole Helbling <cole.helbling@determinate.systems>
This commit is contained in:
Cole Helbling 2023-11-21 09:49:34 -08:00 committed by GitHub
parent 17501ea31a
commit a8647b3c37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@
# tailscaleRev is the git commit at which this flake was imported,
# or the empty string when building from a local checkout of the
# tailscale repo.
tailscaleRev = if builtins.hasAttr "rev" self then self.rev else "";
tailscaleRev = self.rev or "";
# tailscale takes a nixpkgs package set, and builds Tailscale from
# the same commit as this flake. IOW, it provides "tailscale built
# from HEAD", where HEAD is "whatever commit you imported the
@ -68,7 +68,7 @@
src = ./.;
vendorSha256 = pkgs.lib.fileContents ./go.mod.sri;
nativeBuildInputs = pkgs.lib.optionals pkgs.stdenv.isLinux [ pkgs.makeWrapper ];
ldflags = ["-X tailscale.com/version.GitCommit=${tailscaleRev}"];
ldflags = ["-X tailscale.com/version.gitCommitStamp=${tailscaleRev}"];
CGO_ENABLED = 0;
subPackages = [ "cmd/tailscale" "cmd/tailscaled" ];
doCheck = false;