nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, stdenv
3, fetchFromGitHub
4, openssl
5, cmake
6}:
7
8stdenv.mkDerivation rec {
9 pname = "mysocketw";
10 version = "3.11.0";
11
12 src = fetchFromGitHub {
13 owner = "RigsOfRods";
14 repo = "socketw";
15 rev = version;
16 hash = "sha256-mpfhmKE2l59BllkOjmURIfl17lAakXpmGh2x9SFSaAo=";
17 };
18
19 nativeBuildInputs = [
20 cmake
21 ];
22
23 buildInputs = [
24 openssl
25 ];
26
27 postPatch = lib.optionalString stdenv.isDarwin ''
28 substituteInPlace src/Makefile \
29 --replace -Wl,-soname, -Wl,-install_name,$out/lib/
30 '';
31
32 meta = with lib; {
33 description = "Cross platform (Linux/FreeBSD/Unix/Win32) streaming socket C++";
34 homepage = "https://github.com/RigsOfRods/socketw";
35 license = licenses.lgpl21Plus;
36 maintainers = with maintainers; [ ];
37 };
38}