summary refs log tree commit diff
path: root/pkgs/development/tools/continuous-integration/dagger/default.nix
diff options
context:
space:
mode:
authorWeijia Wang <9713184+wegank@users.noreply.github.com>2023-09-22 12:31:33 +0200
committerWeijia Wang <9713184+wegank@users.noreply.github.com>2023-09-22 12:31:33 +0200
commit19f57f4ebd1fa9f0c97a9a814e980c3526ffc4dc (patch)
treed30b17a894d4d778f219a6d52e49df5b4429336c /pkgs/development/tools/continuous-integration/dagger/default.nix
parenta81165dccd04220c7dc01424063672c0c28c9616 (diff)
downloadnixpkgs-19f57f4ebd1fa9f0c97a9a814e980c3526ffc4dc.tar
nixpkgs-19f57f4ebd1fa9f0c97a9a814e980c3526ffc4dc.tar.gz
nixpkgs-19f57f4ebd1fa9f0c97a9a814e980c3526ffc4dc.tar.bz2
nixpkgs-19f57f4ebd1fa9f0c97a9a814e980c3526ffc4dc.tar.lz
nixpkgs-19f57f4ebd1fa9f0c97a9a814e980c3526ffc4dc.tar.xz
nixpkgs-19f57f4ebd1fa9f0c97a9a814e980c3526ffc4dc.tar.zst
nixpkgs-19f57f4ebd1fa9f0c97a9a814e980c3526ffc4dc.zip
dagger: disable shell completion on cross builds
Diffstat (limited to 'pkgs/development/tools/continuous-integration/dagger/default.nix')
-rw-r--r--pkgs/development/tools/continuous-integration/dagger/default.nix4
1 files 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 8bbf57848ac..9b695e53819 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) \