2021-12-06 16:07:01 +00:00
|
|
|
|
{ lib
|
|
|
|
|
, stdenv
|
|
|
|
|
, fetchFromGitHub
|
|
|
|
|
, capnproto
|
|
|
|
|
, cmake }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
pname = "capnproto";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
version = "0.9.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
2021-10-17 09:34:42 +00:00
|
|
|
|
# release tarballs are missing some ekam rules
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "capnproto";
|
|
|
|
|
repo = "capnproto";
|
|
|
|
|
rev = "v${version}";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
sha256 = "0cbiwkmd29abih8rjjm35dfkrkr8c6axbzq3fkryay6jyvpi42c5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
|
2021-09-28 08:13:01 +00:00
|
|
|
|
nativeBuildInputs = [ cmake ]
|
|
|
|
|
++ lib.optional (!(stdenv.hostPlatform.isCompatible stdenv.buildPlatform)) capnproto;
|
|
|
|
|
|
|
|
|
|
cmakeFlags = lib.optional (!(stdenv.hostPlatform.isCompatible stdenv.buildPlatform)) "-DEXTERNAL_CAPNP";
|
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
|
# Upstream 77ac9154440bcc216fda1092fd5bb51da62ae09c, modified to apply to v0.9.1. Drop on update.
|
|
|
|
|
patches = lib.optional stdenv.hostPlatform.isMusl ./musl-no-fibers.patch;
|
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
|
meta = with lib; {
|
2021-09-22 15:38:15 +00:00
|
|
|
|
homepage = "https://capnproto.org/";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
description = "Cap'n Proto cerealization protocol";
|
|
|
|
|
longDescription = ''
|
|
|
|
|
Cap’n Proto is an insanely fast data interchange format and
|
|
|
|
|
capability-based RPC system. Think JSON, except binary. Or think Protocol
|
|
|
|
|
Buffers, except faster.
|
|
|
|
|
'';
|
2021-09-22 15:38:15 +00:00
|
|
|
|
license = licenses.mit;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
platforms = platforms.all;
|
|
|
|
|
maintainers = with maintainers; [ cstrahan ];
|
|
|
|
|
};
|
|
|
|
|
}
|