1{
2 lib,
3 stdenv,
4 fetchurl,
5 cmake,
6 boost,
7 python3,
8 fmt,
9 versionCheckHook,
10}:
11
12stdenv.mkDerivation rec {
13 pname = "avro-c++";
14 version = "1.12.0";
15
16 src = fetchurl {
17 url = "mirror://apache/avro/avro-${version}/cpp/avro-cpp-${version}.tar.gz";
18 hash = "sha256-8u33cSanWw7BrRZncr4Fg1HOo9dESL5+LO8gBQwPmKs=";
19 };
20
21 patches = [
22 ./0001-get-rid-of-fmt-fetchcontent.patch
23 ];
24
25 nativeBuildInputs = [
26 cmake
27 python3
28 ];
29
30 propagatedBuildInputs = [
31 boost
32 fmt
33 ];
34
35 doCheck = true;
36
37 nativeInstallCheckInputs = [
38 versionCheckHook
39 ];
40 doInstallCheck = true;
41 versionCheckProgram = "${placeholder "out"}/bin/avrogencpp";
42 versionCheckProgramArg = "--version";
43
44 meta = {
45 description = "C++ library which implements parts of the Avro Specification";
46 mainProgram = "avrogencpp";
47 homepage = "https://avro.apache.org/";
48 license = lib.licenses.asl20;
49 maintainers = with lib.maintainers; [ rasendubi ];
50 platforms = lib.platforms.all;
51 };
52}