waypoint: 0.2.2 -> 0.2.3
- add installCheckPhase - add runHooks to build and install
This commit is contained in:
parent
4d0c9f2c27
commit
c939abf9a1
|
@ -2,29 +2,45 @@
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "waypoint";
|
pname = "waypoint";
|
||||||
version = "0.2.2";
|
version = "0.2.3";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "hashicorp";
|
owner = "hashicorp";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-JeuVrlm6JB8MgSUmgMLQPuPmlKSScSdsVga9jUwLWHM=";
|
sha256 = "sha256-FTBBDKFUoyC+Xdm3+2QWXK57fLwitYrFP89OvAyHHVY=";
|
||||||
};
|
};
|
||||||
|
|
||||||
deleteVendor = true;
|
deleteVendor = true;
|
||||||
vendorSha256 = "sha256-ArebHOjP3zvpASVAoaPXpSbrG/jq+Jbx7+EaQ1uHSVY=";
|
vendorSha256 = "sha256-ihelAumTRgLALevJdVq3V3SISitiRPCQZUh2h5/eczA=";
|
||||||
|
|
||||||
nativeBuildInputs = [ go-bindata ];
|
nativeBuildInputs = [ go-bindata ];
|
||||||
|
|
||||||
# GIT_{COMMIT,DIRTY} filled in blank to prevent trying to run git and ending up blank anyway
|
# GIT_{COMMIT,DIRTY} filled in blank to prevent trying to run git and ending up blank anyway
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
|
runHook preBuild
|
||||||
make bin GIT_DESCRIBE="v${version}" GIT_COMMIT="" GIT_DIRTY=""
|
make bin GIT_DESCRIBE="v${version}" GIT_COMMIT="" GIT_DIRTY=""
|
||||||
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
install -D waypoint $out/bin/waypoint
|
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
|
||||||
|
$out/bin/waypoint version # | grep "Waypoint v${version}"
|
||||||
|
runHook postInstallCheck
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Binary is static
|
||||||
dontPatchELF = true;
|
dontPatchELF = true;
|
||||||
dontPatchShebangs = true;
|
dontPatchShebangs = true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue