From dc689861429aeeab9c0757c29971c4eeb92aefce Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 21 Mar 2020 06:05:00 -0500 Subject: [PATCH] obfs4: fix build on darwin --- pkgs/tools/networking/obfs4/default.nix | 6 ++++-- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/networking/obfs4/default.nix b/pkgs/tools/networking/obfs4/default.nix index 005abb0968b6..93ebdeb0720c 100644 --- a/pkgs/tools/networking/obfs4/default.nix +++ b/pkgs/tools/networking/obfs4/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchgit, buildGoModule }: +{ stdenv, fetchgit, buildGoModule, Security }: buildGoModule rec { pname = "obfs4"; @@ -12,7 +12,9 @@ buildGoModule rec { modSha256 = "150kg22kznrdj5icjxk3qd70g7wpq8zd2zklw1y2fgvrggw8zvyv"; - meta = with lib; { + buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ]; + + meta = with stdenv.lib; { description = "A pluggable transport proxy"; homepage = https://www.torproject.org/projects/obfsproxy; repositories.git = https://git.torproject.org/pluggable-transports/obfs4.git; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9b6aa9636ef3..7200320ff7df 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5575,7 +5575,9 @@ in obexd = callPackage ../tools/bluetooth/obexd { }; - obfs4 = callPackage ../tools/networking/obfs4 { }; + obfs4 = callPackage ../tools/networking/obfs4 { + inherit (darwin.apple_sdk.frameworks) Security; + }; oci-image-tool = callPackage ../tools/misc/oci-image-tool { };