From a8647b3c37ccdd469545155e74c288ad92085f4b Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Tue, 21 Nov 2023 09:49:34 -0800 Subject: [PATCH] flake: fixup version embedding (#9997) It looks like `gitCommitStamp` is the new "entrypoint" for setting this information. Fixes #9996. Signed-off-by: Cole Helbling --- flake.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 73f0128ea..181b6046f 100644 --- a/flake.nix +++ b/flake.nix @@ -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;