nixpkgs-suyu/pkgs/applications/networking/cluster/waypoint/default.nix

61 lines
1.7 KiB
Nix
Raw Normal View History

{ lib, buildGoModule, fetchFromGitHub, go-bindata }:
buildGoModule rec {
pname = "waypoint";
2021-04-21 17:50:17 +02:00
version = "0.3.1";
src = fetchFromGitHub {
owner = "hashicorp";
repo = pname;
rev = "v${version}";
2021-04-21 17:50:17 +02:00
sha256 = "sha256-WzKUVfc7oGMh0TamL5b6gsm/BAfSCZ6EB3Hg4Tg/3Hw=";
};
deleteVendor = true;
2021-04-09 00:25:48 +02:00
vendorSha256 = "sha256-VxKUYD92DssoSjWxR+1gZLq34vCVM/4U2ju5felLWzI=";
nativeBuildInputs = [ go-bindata ];
# GIT_{COMMIT,DIRTY} filled in blank to prevent trying to run git and ending up blank anyway
buildPhase = ''
runHook preBuild
make bin GIT_DESCRIBE="v${version}" GIT_COMMIT="" GIT_DIRTY=""
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -D waypoint $out/bin/waypoint
runHook postInstall
'';
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}"
runHook postInstallCheck
'';
# Binary is static
dontPatchELF = true;
dontPatchShebangs = true;
meta = with lib; {
homepage = "https://waypointproject.io";
changelog = "https://github.com/hashicorp/waypoint/blob/v${version}/CHANGELOG.md";
description = "A tool to build, deploy, and release any application on any platform";
longDescription = ''
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.
'';
license = licenses.mpl20;
maintainers = with maintainers; [ winpat jk ];
platforms = platforms.linux;
};
}