libproxy: fix building on darwin

This commit is contained in:
Geoffrey Reedy 2018-02-09 08:32:28 -07:00
parent 04051ee9d0
commit 7f6c4e2703
2 changed files with 9 additions and 7 deletions

View File

@ -1,5 +1,6 @@
{ stdenv, lib, fetchFromGitHub, pkgconfig, cmake
, dbus, networkmanager, spidermonkey_38, pcre, python2, python3 }:
{ stdenv, lib, fetchFromGitHub, pkgconfig, cmake, zlib
, dbus, networkmanager, spidermonkey_38, pcre, python2, python3
, SystemConfiguration, CoreFoundation, JavaScriptCore }:
stdenv.mkDerivation rec {
name = "libproxy-${version}";
@ -16,7 +17,10 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig cmake ];
buildInputs = [ dbus networkmanager spidermonkey_38 pcre python2 python3 ];
buildInputs = [ pcre python2 python3 zlib ]
++ (if stdenv.hostPlatform.isDarwin
then [ SystemConfiguration CoreFoundation JavaScriptCore ]
else [ spidermonkey_38 dbus networkmanager ]);
preConfigure = ''
cmakeFlagsArray+=(
@ -27,7 +31,7 @@ stdenv.mkDerivation rec {
'';
meta = with stdenv.lib; {
platforms = platforms.linux;
platforms = platforms.linux ++ platforms.darwin;
license = licenses.lgpl21;
homepage = http://libproxy.github.io/libproxy/;
description = "A library that provides automatic proxy configuration management";

View File

@ -9894,9 +9894,7 @@ with pkgs;
};
libproxy = callPackage ../development/libraries/libproxy {
stdenv = if stdenv.isDarwin
then overrideCC stdenv gcc
else stdenv;
inherit (darwin.apple_sdk.frameworks) SystemConfiguration CoreFoundation JavaScriptCore;
};
libpseudo = callPackage ../development/libraries/libpseudo { };