From e260f4861c5d5b034427eac98005f228a316d478 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 21 Mar 2020 04:56:00 -0500 Subject: [PATCH] caddy: fix build on darwin --- pkgs/servers/caddy/default.nix | 4 +++- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) 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 { };