mysocketw: fix darwin build

/cc ZHF #36454
This commit is contained in:
Daiderd Jordan 2018-03-21 23:54:35 +01:00
parent 3783316b6a
commit 18474c1842
No known key found for this signature in database
GPG Key ID: D02435D05B810C96

View File

@ -1,4 +1,4 @@
{stdenv, fetchurl, openssl}: { stdenv, fetchurl, openssl }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "mysocketw-031026"; name = "mysocketw-031026";
@ -9,11 +9,14 @@ stdenv.mkDerivation rec {
patches = [ ./gcc.patch ]; patches = [ ./gcc.patch ];
configurePhase = '' buildInputs = [ openssl ];
sed -i s,/usr/local,$out, Makefile.conf
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace src/Makefile \
--replace -Wl,-soname, -Wl,-install_name,$out/lib/
''; '';
buildInputs = [ openssl ]; makeFlags = [ "PREFIX=$(out)" "CXX=c++" ];
meta = { meta = {
description = "Cross platform (Linux/FreeBSD/Unix/Win32) streaming socket C++"; description = "Cross platform (Linux/FreeBSD/Unix/Win32) streaming socket C++";