Skip to content

Commit

Permalink
waypoint: 0.3.1 -> 0.3.2
Browse files Browse the repository at this point in the history
Disable check phase to avoid error log
Add completion
  • Loading branch information
06kellyjac committed May 14, 2021
1 parent 0755dee commit e10ce7e
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions pkgs/applications/networking/cluster/waypoint/default.nix
@@ -1,20 +1,20 @@
{ lib, buildGoModule, fetchFromGitHub, go-bindata }:
{ lib, buildGoModule, fetchFromGitHub, go-bindata, installShellFiles }:

buildGoModule rec {
pname = "waypoint";
version = "0.3.1";
version = "0.3.2";

src = fetchFromGitHub {
owner = "hashicorp";
repo = pname;
rev = "v${version}";
sha256 = "sha256-WzKUVfc7oGMh0TamL5b6gsm/BAfSCZ6EB3Hg4Tg/3Hw=";
sha256 = "sha256-57DHImPYVFK+MXWGeArvc5fwHmqa3zodLytfDoAxglo=";
};

deleteVendor = true;
vendorSha256 = "sha256-VxKUYD92DssoSjWxR+1gZLq34vCVM/4U2ju5felLWzI=";
vendorSha256 = "sha256-HxrY35SqfUbT6VCCXkLUjAsxgtMzpOeoicAGLwD2OyA=";

nativeBuildInputs = [ go-bindata ];
nativeBuildInputs = [ go-bindata installShellFiles ];

# GIT_{COMMIT,DIRTY} filled in blank to prevent trying to run git and ending up blank anyway
buildPhase = ''
Expand All @@ -23,9 +23,29 @@ buildGoModule rec {
runHook postBuild
'';

doCheck = false;

installPhase = ''
runHook preInstall
local INSTALL="$out/bin/waypoint"
install -D waypoint $out/bin/waypoint
# Write to a file as it doesn't like EOF within <()
cat > waypoint.fish <<EOF
function __complete_waypoint
set -lx COMP_LINE (commandline -cp)
test -z (commandline -ct)
and set COMP_LINE "$COMP_LINE "
$INSTALL
end
complete -f -c waypoint -a "(__complete_waypoint)"
EOF
installShellCompletion --cmd waypoint \
--bash <(echo "complete -C $INSTALL waypoint") \
--fish <(cat waypoint.fish) \
--zsh <(echo "complete -o nospace -C $INSTALL waypoint")
runHook postInstall
'';

Expand Down

0 comments on commit e10ce7e

Please sign in to comment.