diff --git a/pkgs/servers/caddy/default.nix b/pkgs/servers/caddy/default.nix index bcd4b7065b58..8b51e584e3ec 100644 --- a/pkgs/servers/caddy/default.nix +++ b/pkgs/servers/caddy/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildGoModule, fetchFromGitHub }: +{ stdenv, buildGoModule, fetchFromGitHub, Security }: buildGoModule rec { pname = "caddy"; @@ -16,6 +16,8 @@ buildGoModule rec { }; modSha256 = "1gc0xvsihr4zp7hkrdfrplvzkaphz1y4q53rgwn2jhd8s98l57an"; + buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ]; + preBuild = '' cat << EOF > caddy/main.go package main diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index abc4b8fbaa54..09506da906f4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1400,7 +1400,9 @@ in ''; }); - caddy = callPackage ../servers/caddy { }; + caddy = callPackage ../servers/caddy { + inherit (darwin.apple_sdk.frameworks) Security; + }; caddy2 = callPackage ../servers/caddy/v2.nix { }; traefik = callPackage ../servers/traefik { };