diff --git a/pkgs/development/tools/continuous-integration/dagger/default.nix b/pkgs/development/tools/continuous-integration/dagger/default.nix index 816702d263ed..9b695e53819d 100644 --- a/pkgs/development/tools/continuous-integration/dagger/default.nix +++ b/pkgs/development/tools/continuous-integration/dagger/default.nix @@ -1,17 +1,17 @@ -{ lib, buildGoModule, fetchFromGitHub, testers, dagger }: +{ lib, stdenv, buildGoModule, fetchFromGitHub, installShellFiles, testers, dagger }: buildGoModule rec { pname = "dagger"; - version = "0.8.4"; + version = "0.8.7"; src = fetchFromGitHub { owner = "dagger"; repo = "dagger"; rev = "v${version}"; - hash = "sha256-iFuPbSat555QHPqqP6j/6uTid19x1+OtRHADmGxTYzs="; + hash = "sha256-vlHLqqUMZAuBgI5D1L2g6u3PDZsUp5oUez4x9ydOUtM="; }; - vendorHash = "sha256-DWmHq8BIR00QTh3ZcbEgTtbHwTmsMFAhV7kQVRSKNdQ="; + vendorHash = "sha256-B8Qvyvh9MRGFDBvc/Hu+IitBBdHvEU3QjLJuIy1S04A="; proxyVendor = true; subPackages = [ @@ -20,6 +20,15 @@ buildGoModule rec { ldflags = [ "-s" "-w" "-X github.com/dagger/dagger/engine.Version=${version}" ]; + nativeBuildInputs = [ installShellFiles ]; + + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + installShellCompletion --cmd dagger \ + --bash <($out/bin/dagger completion bash) \ + --fish <($out/bin/dagger completion fish) \ + --zsh <($out/bin/dagger completion zsh) + ''; + passthru.tests.version = testers.testVersion { package = dagger; command = "dagger version";