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>
pull/10352/head
Cole Helbling 1 year ago committed by GitHub
parent 17501ea31a
commit a8647b3c37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -44,7 +44,7 @@
# tailscaleRev is the git commit at which this flake was imported, # tailscaleRev is the git commit at which this flake was imported,
# or the empty string when building from a local checkout of the # or the empty string when building from a local checkout of the
# tailscale repo. # 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 # tailscale takes a nixpkgs package set, and builds Tailscale from
# the same commit as this flake. IOW, it provides "tailscale built # the same commit as this flake. IOW, it provides "tailscale built
# from HEAD", where HEAD is "whatever commit you imported the # from HEAD", where HEAD is "whatever commit you imported the
@ -68,7 +68,7 @@
src = ./.; src = ./.;
vendorSha256 = pkgs.lib.fileContents ./go.mod.sri; vendorSha256 = pkgs.lib.fileContents ./go.mod.sri;
nativeBuildInputs = pkgs.lib.optionals pkgs.stdenv.isLinux [ pkgs.makeWrapper ]; 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; CGO_ENABLED = 0;
subPackages = [ "cmd/tailscale" "cmd/tailscaled" ]; subPackages = [ "cmd/tailscale" "cmd/tailscaled" ];
doCheck = false; doCheck = false;

Loading…
Cancel
Save