From 3f36f949d5a1bbc01539458a1c675bd7ea520aac Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Fri, 10 May 2024 17:10:27 +0200 Subject: [PATCH] caddy: Disable manpage and shell completion on cross-compile --- pkgs/by-name/ca/caddy/package.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/by-name/ca/caddy/package.nix b/pkgs/by-name/ca/caddy/package.nix index c9bb2c103b50..73ab67366483 100644 --- a/pkgs/by-name/ca/caddy/package.nix +++ b/pkgs/by-name/ca/caddy/package.nix @@ -5,6 +5,7 @@ , caddy , testers , installShellFiles +, stdenv }: let version = "2.7.6"; @@ -44,6 +45,9 @@ buildGoModule { --replace-fail "/usr/bin/caddy" "$out/bin/caddy" substituteInPlace $out/lib/systemd/system/caddy-api.service \ --replace-fail "/usr/bin/caddy" "$out/bin/caddy" + '' + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + # Generating man pages and completions fail on cross-compilation + # https://github.com/NixOS/nixpkgs/issues/308283 $out/bin/caddy manpage --directory manpages installManPage manpages/*