caddy: Disable manpage and shell completion on cross-compile

This commit is contained in:
Jonas Heinrich 2024-05-10 17:10:27 +02:00
parent 544289dfb9
commit 3f36f949d5

View File

@ -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/*