From 90f347c3e1dd4b387f1a5e5bea1010beee955c06 Mon Sep 17 00:00:00 2001 From: Mark Sagi-Kazar Date: Fri, 22 Sep 2023 00:52:53 +0200 Subject: [PATCH 1/3] dagger: 0.8.4 -> 0.8.7 Signed-off-by: Mark Sagi-Kazar --- .../tools/continuous-integration/dagger/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/continuous-integration/dagger/default.nix b/pkgs/development/tools/continuous-integration/dagger/default.nix index 816702d263ed..ef0e151c938c 100644 --- a/pkgs/development/tools/continuous-integration/dagger/default.nix +++ b/pkgs/development/tools/continuous-integration/dagger/default.nix @@ -2,16 +2,16 @@ 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 = [ From a81165dccd04220c7dc01424063672c0c28c9616 Mon Sep 17 00:00:00 2001 From: Mark Sagi-Kazar Date: Fri, 22 Sep 2023 00:55:04 +0200 Subject: [PATCH 2/3] dagger: add shell completion Signed-off-by: Mark Sagi-Kazar --- .../tools/continuous-integration/dagger/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/continuous-integration/dagger/default.nix b/pkgs/development/tools/continuous-integration/dagger/default.nix index ef0e151c938c..8bbf57848ac8 100644 --- a/pkgs/development/tools/continuous-integration/dagger/default.nix +++ b/pkgs/development/tools/continuous-integration/dagger/default.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchFromGitHub, testers, dagger }: +{ lib, buildGoModule, fetchFromGitHub, installShellFiles, testers, dagger }: buildGoModule rec { pname = "dagger"; @@ -20,6 +20,15 @@ buildGoModule rec { ldflags = [ "-s" "-w" "-X github.com/dagger/dagger/engine.Version=${version}" ]; + nativeBuildInputs = [ installShellFiles ]; + + postInstall = '' + 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"; From 19f57f4ebd1fa9f0c97a9a814e980c3526ffc4dc Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Fri, 22 Sep 2023 12:31:33 +0200 Subject: [PATCH 3/3] dagger: disable shell completion on cross builds --- .../tools/continuous-integration/dagger/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/continuous-integration/dagger/default.nix b/pkgs/development/tools/continuous-integration/dagger/default.nix index 8bbf57848ac8..9b695e53819d 100644 --- a/pkgs/development/tools/continuous-integration/dagger/default.nix +++ b/pkgs/development/tools/continuous-integration/dagger/default.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchFromGitHub, installShellFiles, testers, dagger }: +{ lib, stdenv, buildGoModule, fetchFromGitHub, installShellFiles, testers, dagger }: buildGoModule rec { pname = "dagger"; @@ -22,7 +22,7 @@ buildGoModule rec { nativeBuildInputs = [ installShellFiles ]; - postInstall = '' + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' installShellCompletion --cmd dagger \ --bash <($out/bin/dagger completion bash) \ --fish <($out/bin/dagger completion fish) \