python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / libraries / nanomsg / default.nix
blobd7b7409dad14e23b1cb980a89e543378911baed9
1 { lib, stdenv, cmake, fetchFromGitHub, fetchpatch }:
3 stdenv.mkDerivation rec {
4   version = "1.1.5";
5   pname = "nanomsg";
7   src = fetchFromGitHub {
8     owner = "nanomsg";
9     repo = "nanomsg";
10     rev = version;
11     sha256 = "01ddfzjlkf2dgijrmm3j3j8irccsnbgfvjcnwslsfaxnrmrq5s64";
12   };
14   patches = [
15     # Add pkgconfig fix from https://github.com/nanomsg/nanomsg/pull/1085
16     (fetchpatch {
17       url = "https://github.com/nanomsg/nanomsg/commit/e3323f19579529d272cb1d55bd6b653c4f34c064.patch";
18       sha256 = "URz7TAqqpKxqjgvQqNX4WNSShwiEzAvO2h0hCZ2NhVY=";
19     })
20   ];
22   nativeBuildInputs = [ cmake ];
24   # https://github.com/nanomsg/nanomsg/issues/1082
25   postPatch = ''
26     substituteInPlace src/pkgconfig.in \
27       --replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
28   '';
30   meta = with lib; {
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;
36   };