1 { lib, stdenv, fetchFromGitHub, cmake, curl }:
3 let version = "1.10.5"; in
8 outputs = [ "out" "dev" ];
10 src = fetchFromGitHub {
14 hash = "sha256-mAuU2uF8d+aHvCmotgIrBi/pUp1jkP6G0f98M76zjOw=";
17 nativeBuildInputs = [ cmake ];
19 propagatedBuildInputs = [ curl ];
22 "-DCPR_USE_SYSTEM_CURL=ON"
26 # Linking with stdc++fs is no longer necessary.
27 sed -i '/stdc++fs/d' include/CMakeLists.txt
31 substituteInPlace "$out/lib/cmake/cpr/cprTargets.cmake" \
32 --replace "_IMPORT_PREFIX \"$out\"" \
33 "_IMPORT_PREFIX \"$dev\""
37 description = "C++ wrapper around libcurl";
38 homepage = "https://docs.libcpr.org/";
39 license = licenses.mit;
40 maintainers = with maintainers; [ rycee ];
41 platforms = platforms.all;