2020-12-21 10:30:19 +01:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, go-bindata }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "waypoint";
|
2021-04-21 17:50:17 +02:00
|
|
|
version = "0.3.1";
|
2020-12-21 10:30:19 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hashicorp";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-04-21 17:50:17 +02:00
|
|
|
sha256 = "sha256-WzKUVfc7oGMh0TamL5b6gsm/BAfSCZ6EB3Hg4Tg/3Hw=";
|
2020-12-21 10:30:19 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
deleteVendor = true;
|
2021-04-09 00:25:48 +02:00
|
|
|
vendorSha256 = "sha256-VxKUYD92DssoSjWxR+1gZLq34vCVM/4U2ju5felLWzI=";
|
2020-12-21 10:30:19 +01:00
|
|
|
|
|
|
|
nativeBuildInputs = [ go-bindata ];
|
|
|
|
|
2021-02-07 18:00:41 +01:00
|
|
|
# GIT_{COMMIT,DIRTY} filled in blank to prevent trying to run git and ending up blank anyway
|
2020-12-21 10:30:19 +01:00
|
|
|
buildPhase = ''
|
2021-02-24 14:56:21 +01:00
|
|
|
runHook preBuild
|
2021-02-07 18:00:41 +01:00
|
|
|
make bin GIT_DESCRIBE="v${version}" GIT_COMMIT="" GIT_DIRTY=""
|
2021-02-24 14:56:21 +01:00
|
|
|
runHook postBuild
|
2020-12-21 10:30:19 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2021-02-24 14:56:21 +01:00
|
|
|
runHook preInstall
|
2021-02-07 18:00:41 +01:00
|
|
|
install -D waypoint $out/bin/waypoint
|
2021-02-24 14:56:21 +01:00
|
|
|
runHook postInstall
|
2020-12-21 10:30:19 +01:00
|
|
|
'';
|
|
|
|
|
2021-02-24 14:56:21 +01:00
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
|
|
runHook preInstallCheck
|
|
|
|
# `version` tries to write to ~/.config/waypoint
|
|
|
|
export HOME="$TMPDIR"
|
|
|
|
|
|
|
|
$out/bin/waypoint --help
|
2021-04-21 17:50:17 +02:00
|
|
|
$out/bin/waypoint version | grep "CLI: v${version}"
|
2021-02-24 14:56:21 +01:00
|
|
|
runHook postInstallCheck
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Binary is static
|
2021-02-07 18:00:41 +01:00
|
|
|
dontPatchELF = true;
|
|
|
|
dontPatchShebangs = true;
|
|
|
|
|
2020-12-21 10:30:19 +01:00
|
|
|
meta = with lib; {
|
2021-02-07 18:00:41 +01:00
|
|
|
homepage = "https://waypointproject.io";
|
|
|
|
changelog = "https://github.com/hashicorp/waypoint/blob/v${version}/CHANGELOG.md";
|
2020-12-21 10:30:19 +01:00
|
|
|
description = "A tool to build, deploy, and release any application on any platform";
|
|
|
|
longDescription = ''
|
2021-02-07 18:00:41 +01:00
|
|
|
Waypoint allows developers to define their application build, deploy, and
|
|
|
|
release lifecycle as code, reducing the time to deliver deployments
|
|
|
|
through a consistent and repeatable workflow.
|
2020-12-21 10:30:19 +01:00
|
|
|
'';
|
|
|
|
license = licenses.mpl20;
|
|
|
|
maintainers = with maintainers; [ winpat jk ];
|
2021-02-07 18:00:41 +01:00
|
|
|
platforms = platforms.linux;
|
2020-12-21 10:30:19 +01:00
|
|
|
};
|
|
|
|
}
|