nixpkgs/pkgs/development/libraries/capnproto/default.nix
sternenseemann acb063701a lib.systems.elaborate: expose canExecute predicate over isCompatible
canExecute is like isCompatible, but also checks that the Kernels are
_equal_, i.e. that both platforms use the same syscall interface. This
is crucial in order to actually be able to execute binaries for the
other platform.

isCompatible is dropped, since it has changed semantically and there's
no use case left in nixpkgs.
2022-05-23 21:25:04 +02:00

40 lines
1.2 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ lib
, stdenv
, fetchFromGitHub
, capnproto
, cmake }:
stdenv.mkDerivation rec {
pname = "capnproto";
version = "0.9.1";
# release tarballs are missing some ekam rules
src = fetchFromGitHub {
owner = "capnproto";
repo = "capnproto";
rev = "v${version}";
sha256 = "0cbiwkmd29abih8rjjm35dfkrkr8c6axbzq3fkryay6jyvpi42c5";
};
nativeBuildInputs = [ cmake ]
++ lib.optional (!(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) capnproto;
cmakeFlags = lib.optional (!(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) "-DEXTERNAL_CAPNP";
# Upstream 77ac9154440bcc216fda1092fd5bb51da62ae09c, modified to apply to v0.9.1. Drop on update.
patches = lib.optional stdenv.hostPlatform.isMusl ./musl-no-fibers.patch;
meta = with lib; {
homepage = "https://capnproto.org/";
description = "Cap'n Proto cerealization protocol";
longDescription = ''
Capn Proto is an insanely fast data interchange format and
capability-based RPC system. Think JSON, except binary. Or think Protocol
Buffers, except faster.
'';
license = licenses.mit;
platforms = platforms.all;
maintainers = with maintainers; [ cstrahan ];
};
}