1 { lib, stdenv, fetchFromGitHub, curl, cmake, nlohmann_json }:
4 pname = "cpp-ipfs-http-client";
5 version = "unstable-2022-01-30";
7 src = fetchFromGitHub {
9 repo = "cpp-ipfs-http-client";
10 rev = "3cdfa7fc6326e49fc81b3c7ca43ce83bdccef6d9";
11 sha256 = "sha256-/oyafnk4SbrvoCh90wkZXNBjknMKA6EEUoEGo/amLUo=";
14 patches = [ ./unvendor-nlohmann-json.patch ];
17 substituteInPlace CMakeLists.txt \
18 --replace '# Fetch "JSON for Modern C++"' "include_directories(${nlohmann_json}/include)"
21 nativeBuildInputs = [ cmake ];
22 buildInputs = [ curl ];
23 propagatedBuildInputs = [ nlohmann_json ];
25 env.NIX_CFLAGS_COMPILE = toString [
26 "-Wno-error=range-loop-construct"
28 "-Wno-error=deprecated-declarations"
32 description = "IPFS C++ API client library";
33 homepage = "https://github.com/vasild/cpp-ipfs-http-client";
34 license = licenses.mit;
35 platforms = [ "x86_64-linux" "x86_64-darwin" ];