diff options
author | Artturi <Artturin@artturin.com> | 2022-04-08 22:53:05 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-08 22:53:05 +0300 |
commit | d7fbc9308a4809bcc44e7384dc4fa1fa13583102 (patch) | |
tree | b98e17f822f7c73e8da967ddcb34af2ae5caf8e9 | |
parent | 710f27aca38ba97a3b5af81fef6670e9a289c857 (diff) | |
parent | c584898c0bc15f5eb04a3c0866efab1a9a37a390 (diff) |
Merge pull request #167878 from 06kellyjac/konstraint
-rw-r--r-- | pkgs/development/tools/konstraint/default.nix | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/pkgs/development/tools/konstraint/default.nix b/pkgs/development/tools/konstraint/default.nix index d83f6db701a85..0c36636992a2e 100644 --- a/pkgs/development/tools/konstraint/default.nix +++ b/pkgs/development/tools/konstraint/default.nix @@ -1,22 +1,39 @@ -{ lib, buildGoModule, fetchFromGitHub }: +{ lib, buildGoModule, fetchFromGitHub, installShellFiles }: buildGoModule rec { pname = "konstraint"; - version = "0.18.0"; + version = "0.19.0"; src = fetchFromGitHub { owner = "plexsystems"; repo = pname; 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 excludedPackages = ".github"; + nativeBuildInputs = [ installShellFiles ]; + 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; { homepage = "https://github.com/plexsystems/konstraint"; changelog = "https://github.com/plexsystems/konstraint/releases/tag/v${version}"; |