2022-08-21 13:32:41 +00:00
|
|
|
{ lib, stdenv, cmake, fetchFromGitHub, fetchpatch }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "1.1.5";
|
|
|
|
pname = "nanomsg";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nanomsg";
|
|
|
|
repo = "nanomsg";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "01ddfzjlkf2dgijrmm3j3j8irccsnbgfvjcnwslsfaxnrmrq5s64";
|
|
|
|
};
|
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
patches = [
|
|
|
|
# Add pkgconfig fix from https://github.com/nanomsg/nanomsg/pull/1085
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/nanomsg/nanomsg/commit/e3323f19579529d272cb1d55bd6b653c4f34c064.patch";
|
|
|
|
sha256 = "URz7TAqqpKxqjgvQqNX4WNSShwiEzAvO2h0hCZ2NhVY=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
# https://github.com/nanomsg/nanomsg/issues/1082
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/pkgconfig.in \
|
|
|
|
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description= "Socket library that provides several common communication patterns";
|
|
|
|
homepage = "https://nanomsg.org/";
|
|
|
|
license = licenses.mit;
|
2022-05-18 14:49:53 +00:00
|
|
|
mainProgram = "nanocat";
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|