konstraint: 0.18.0 -> 0.19.0
This commit is contained in:
parent
ece776133d
commit
c584898c0b
|
@ -1,22 +1,39 @@
|
||||||
{ lib, buildGoModule, fetchFromGitHub }:
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "konstraint";
|
pname = "konstraint";
|
||||||
version = "0.18.0";
|
version = "0.19.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "plexsystems";
|
owner = "plexsystems";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-UHdmC6UoDxl/GfvUOmuBctPpxIYljOurnm1J3eEPFHA=";
|
sha256 = "sha256-BoH/lT+kYiwOtW82mmhhLZY3Xk2pRZHmNrEKJzPiG54=";
|
||||||
};
|
};
|
||||||
vendorSha256 = "sha256-UssvmmZhq+SO3cPpZi3Diji7tIxrpyhqNIBajqzRjh8=";
|
vendorSha256 = "sha256-G6WigkkKZj/k+kYlKItSfnoXN8UZ60lFEkZcQaI9J5c=";
|
||||||
|
|
||||||
# Exclude go within .github folder
|
# Exclude go within .github folder
|
||||||
excludedPackages = ".github";
|
excludedPackages = ".github";
|
||||||
|
|
||||||
|
nativeBuildInputs = [ installShellFiles ];
|
||||||
|
|
||||||
ldflags = [ "-s" "-w" "-X github.com/plexsystems/konstraint/internal/commands.version=${version}" ];
|
ldflags = [ "-s" "-w" "-X github.com/plexsystems/konstraint/internal/commands.version=${version}" ];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
installShellCompletion --cmd konstraint \
|
||||||
|
--bash <($out/bin/konstraint completion bash) \
|
||||||
|
--fish <($out/bin/konstraint completion fish) \
|
||||||
|
--zsh <($out/bin/konstraint completion zsh)
|
||||||
|
'';
|
||||||
|
|
||||||
|
doInstallCheck = true;
|
||||||
|
installCheckPhase = ''
|
||||||
|
runHook preInstallCheck
|
||||||
|
$out/bin/konstraint --help
|
||||||
|
$out/bin/konstraint --version | grep "${version}"
|
||||||
|
runHook postInstallCheck
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/plexsystems/konstraint";
|
homepage = "https://github.com/plexsystems/konstraint";
|
||||||
changelog = "https://github.com/plexsystems/konstraint/releases/tag/v${version}";
|
changelog = "https://github.com/plexsystems/konstraint/releases/tag/v${version}";
|
||||||
|
|
Loading…
Reference in a new issue