mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
gh: fix --version
showing date in the 80s
This commit is contained in:
parent
42bb244ece
commit
5ca2c4b225
1 changed files with 3 additions and 1 deletions
|
@ -23,9 +23,11 @@ buildGoModule rec {
|
|||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
# N.B.: using the Makefile is intentional.
|
||||
# We pass "nixpkgs" for build.Date to avoid `gh --version` reporting a very old date.
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
make GO_LDFLAGS="-s -w" GH_VERSION=${version} bin/gh ${lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) "manpages"}
|
||||
make GO_LDFLAGS="-s -w -X github.com/cli/cli/v${lib.versions.major version}/internal/build.Date=nixpkgs" GH_VERSION=${version} bin/gh ${lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) "manpages"}
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue