1 { lib, stdenv, cmake, fetchFromGitHub, fetchpatch }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
11 sha256 = "01ddfzjlkf2dgijrmm3j3j8irccsnbgfvjcnwslsfaxnrmrq5s64";
15 # Add pkgconfig fix from https://github.com/nanomsg/nanomsg/pull/1085
17 url = "https://github.com/nanomsg/nanomsg/commit/e3323f19579529d272cb1d55bd6b653c4f34c064.patch";
18 sha256 = "URz7TAqqpKxqjgvQqNX4WNSShwiEzAvO2h0hCZ2NhVY=";
22 nativeBuildInputs = [ cmake ];
24 # https://github.com/nanomsg/nanomsg/issues/1082
26 substituteInPlace src/pkgconfig.in \
27 --replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
31 description= "Socket library that provides several common communication patterns";
32 homepage = "https://nanomsg.org/";
33 license = licenses.mit;
34 mainProgram = "nanocat";
35 platforms = platforms.unix;