lib.packagesFromDirectoryRecursive: Improved documentation (#359898)
[NixPkgs.git] / pkgs / by-name / av / avro-cpp / package.nix
blobd8735e0b9143df5ee5da533d4fbcc2cc8a623374
1 { lib
2 , stdenv
3 , fetchurl
4 , fetchpatch
5 , cmake
6 , boost
7 , python3
8 }:
10 stdenv.mkDerivation rec {
11   pname = "avro-c++";
12   version = "1.11.3";
14   src = fetchurl {
15     url = "mirror://apache/avro/avro-${version}/cpp/avro-cpp-${version}.tar.gz";
16     hash = "sha256-+6JCrvd+yBnQdWH8upN1FyGVbejQyujh8vMAtUszG64=";
17   };
18   patches = [
19     # This patch fixes boost compatibility and can be removed when
20     # upgrading beyond 1.11.3 https://github.com/apache/avro/pull/1920
21     (fetchpatch {
22       name = "fix-boost-compatibility.patch";
23       url = "https://github.com/apache/avro/commit/016323828f147f185d03f50d2223a2f50bfafce1.patch";
24       hash = "sha256-hP/5J2JzSplMvg8EjEk98Vim8DfTyZ4hZ/WGiVwvM1A=";
25     })
26   ];
27   patchFlags = [ "-p3" ];
29   nativeBuildInputs = [ cmake python3 ];
30   buildInputs = [ boost ];
32   preConfigure = ''
33     substituteInPlace test/SchemaTests.cc --replace "BOOST_CHECKPOINT" "BOOST_TEST_CHECKPOINT"
34     substituteInPlace test/buffertest.cc --replace "BOOST_MESSAGE" "BOOST_TEST_MESSAGE"
35   '';
37   meta = {
38     description = "C++ library which implements parts of the Avro Specification";
39     mainProgram = "avrogencpp";
40     homepage = "https://avro.apache.org/";
41     license = lib.licenses.asl20;
42     maintainers = with lib.maintainers; [ rasendubi ];
43     platforms = lib.platforms.all;
44   };