From 03401f0200310afa450cd26efebe5891049972b6 Mon Sep 17 00:00:00 2001 From: Steven Keuchel Date: Sun, 3 Nov 2024 17:51:12 +0100 Subject: [PATCH] git-lfs: fix cross compilation Hides the `installShellCompletion` behind a `stdenv.buildPlatform.canExecute stdenv.hostPlatform` guard. cf https://github.com/NixOS/nixpkgs/issues/308283 --- pkgs/applications/version-management/git-lfs/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/version-management/git-lfs/default.nix b/pkgs/applications/version-management/git-lfs/default.nix index f53586e75705..8021e165e6c6 100644 --- a/pkgs/applications/version-management/git-lfs/default.nix +++ b/pkgs/applications/version-management/git-lfs/default.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchFromGitHub, asciidoctor, installShellFiles, git, testers, git-lfs }: +{ lib, buildGoModule, fetchFromGitHub, asciidoctor, installShellFiles, git, testers, git-lfs, stdenv }: buildGoModule rec { pname = "git-lfs"; @@ -39,6 +39,7 @@ buildGoModule rec { postInstall = '' installManPage man/man*/* + '' + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' installShellCompletion --cmd git-lfs \ --bash <($out/bin/git-lfs completion bash) \ --fish <($out/bin/git-lfs completion fish) \