diff --git a/pkgs/by-name/av/avro-cpp/0001-get-rid-of-fmt-fetchcontent.patch b/pkgs/by-name/av/avro-cpp/0001-get-rid-of-fmt-fetchcontent.patch new file mode 100644 index 000000000000..09ff008d332c --- /dev/null +++ b/pkgs/by-name/av/avro-cpp/0001-get-rid-of-fmt-fetchcontent.patch @@ -0,0 +1,21 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 19059a41b..6e3ae0ad7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -82,15 +82,7 @@ endif () + find_package (Boost 1.38 REQUIRED + COMPONENTS filesystem iostreams program_options regex system) + +-include(FetchContent) +-FetchContent_Declare( +- fmt +- GIT_REPOSITORY https://github.com/fmtlib/fmt.git +- GIT_TAG 10.2.1 +- GIT_PROGRESS TRUE +- USES_TERMINAL_DOWNLOAD TRUE +-) +-FetchContent_MakeAvailable(fmt) ++find_package(fmt REQUIRED) + + find_package(Snappy) + if (SNAPPY_FOUND) diff --git a/pkgs/by-name/av/avro-cpp/package.nix b/pkgs/by-name/av/avro-cpp/package.nix index f82ef1924dbe..a21d247bb272 100644 --- a/pkgs/by-name/av/avro-cpp/package.nix +++ b/pkgs/by-name/av/avro-cpp/package.nix @@ -2,41 +2,34 @@ lib, stdenv, fetchurl, - fetchpatch, cmake, boost, python3, + fmt, }: stdenv.mkDerivation rec { pname = "avro-c++"; - version = "1.11.3"; + version = "1.12.0"; src = fetchurl { url = "mirror://apache/avro/avro-${version}/cpp/avro-cpp-${version}.tar.gz"; - hash = "sha256-+6JCrvd+yBnQdWH8upN1FyGVbejQyujh8vMAtUszG64="; + hash = "sha256-8u33cSanWw7BrRZncr4Fg1HOo9dESL5+LO8gBQwPmKs="; }; + patches = [ - # This patch fixes boost compatibility and can be removed when - # upgrading beyond 1.11.3 https://github.com/apache/avro/pull/1920 - (fetchpatch { - name = "fix-boost-compatibility.patch"; - url = "https://github.com/apache/avro/commit/016323828f147f185d03f50d2223a2f50bfafce1.patch"; - hash = "sha256-hP/5J2JzSplMvg8EjEk98Vim8DfTyZ4hZ/WGiVwvM1A="; - }) + ./0001-get-rid-of-fmt-fetchcontent.patch ]; - patchFlags = [ "-p3" ]; nativeBuildInputs = [ cmake python3 ]; - buildInputs = [ boost ]; - preConfigure = '' - substituteInPlace test/SchemaTests.cc --replace "BOOST_CHECKPOINT" "BOOST_TEST_CHECKPOINT" - substituteInPlace test/buffertest.cc --replace "BOOST_MESSAGE" "BOOST_TEST_MESSAGE" - ''; + propagatedBuildInputs = [ + boost + fmt + ]; meta = { description = "C++ library which implements parts of the Avro Specification";