2022-01-27 00:19:43 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, openssl, cmake }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-21 07:28:18 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "mysocketw";
|
2022-01-27 00:19:43 +00:00
|
|
|
version = "3.10.27";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-27 00:19:43 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "RigsOfRods";
|
|
|
|
repo = "socketw";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "0xqcgwb1lyc2d8834sq5adbmggyn6vvb26jw20862sxa15j0qfd4";
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-27 00:19:43 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ openssl ];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
postPatch = lib.optionalString stdenv.isDarwin ''
|
2020-04-24 23:36:52 +00:00
|
|
|
substituteInPlace src/Makefile \
|
|
|
|
--replace -Wl,-soname, -Wl,-install_name,$out/lib/
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Cross platform (Linux/FreeBSD/Unix/Win32) streaming socket C++";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = lib.licenses.lgpl21Plus;
|
|
|
|
platforms = lib.platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|