depot/third_party/nixpkgs/pkgs/development/libraries/mysocketw/default.nix
Default email bb5b50588c Project import generated by Copybara.
GitOrigin-RevId: 9816b99e71c3504b0b4c1f8b2e004148460029d4
2021-02-19 20:06:45 +01:00

26 lines
727 B
Nix

{ lib, stdenv, fetchurl, openssl }:
stdenv.mkDerivation {
name = "mysocketw-031026";
src = fetchurl {
url = "http://www.digitalfanatics.org/cal/socketw/files/SocketW031026.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;
};
}