mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-30 11:50:06 +00:00
cloudfoundry-cli: Update ldflags to fix corrupted version (#565862)
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
fetchFromGitHub,
|
||||
fetchurl,
|
||||
installShellFiles,
|
||||
versionCheckHook,
|
||||
writableTmpDirAsHomeHook,
|
||||
}:
|
||||
|
||||
buildGoModule (finalAttrs: {
|
||||
@@ -32,8 +34,9 @@ buildGoModule (finalAttrs: {
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
"-X code.cloudfoundry.org/cli/version.binaryBuildDate=1970-01-01"
|
||||
"-X code.cloudfoundry.org/cli/version.binaryVersion=${finalAttrs.version}"
|
||||
"-X code.cloudfoundry.org/cli/v8/version.binaryBuildDate=1970-01-01"
|
||||
"-X code.cloudfoundry.org/cli/v8/version.binaryVersion=${finalAttrs.version}"
|
||||
"-X code.cloudfoundry.org/cli/v8/version.binarySHA=${finalAttrs.src.rev}"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
@@ -41,6 +44,15 @@ buildGoModule (finalAttrs: {
|
||||
installShellCompletion --bash $bashCompletionScript
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
|
||||
versionCheckKeepEnvironment = [ "HOME" ];
|
||||
|
||||
nativeInstallCheckInputs = [
|
||||
versionCheckHook
|
||||
writableTmpDirAsHomeHook
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Official command line client for Cloud Foundry";
|
||||
homepage = "https://github.com/cloudfoundry/cli";
|
||||
|
||||
Reference in New Issue
Block a user