depot/third_party/nixpkgs/pkgs/development/libraries/mysocketw/default.nix
Default email 5b567aa208 Project import generated by Copybara.
GitOrigin-RevId: 16105403bdd843540cbef9c63fc0f16c1c6eaa70
2021-07-21 09:28:18 +02:00

27 lines
752 B
Nix

{ lib, stdenv, fetchurl, openssl }:
stdenv.mkDerivation rec {
pname = "mysocketw";
version = "031026";
src = fetchurl {
url = "https://www.digitalfanatics.org/cal/socketw/files/SocketW${version}.tar.gz";
sha256 = "0crinikhdl7xihzmc3k3k41pgxy16d5ci8m9sza1lbibns7pdwj4";
};
patches = [ ./gcc.patch ];
buildInputs = [ openssl ];
postPatch = lib.optionalString stdenv.isDarwin ''
substituteInPlace src/Makefile \
--replace -Wl,-soname, -Wl,-install_name,$out/lib/
'';
makeFlags = [ "PREFIX=$(out)" "CXX=${stdenv.cc.targetPrefix}c++" ];
meta = {
description = "Cross platform (Linux/FreeBSD/Unix/Win32) streaming socket C++";
license = lib.licenses.lgpl21Plus;
platforms = lib.platforms.all;
};
}