libcpr: 1.10.5 -> 1.11.0
Also introduce `libcpr_1_10_5` for use by influxdb-cxx, which is incompatible with the new version. The 1.10.5 is to be removed when influxdb-cxx is updated. Finally migrate package to `by-name`.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, boost, catch2_3, libcpr, trompeloeil }:
|
||||
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, boost, catch2_3, libcpr_1_10_5, trompeloeil }:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "influxdb-cxx";
|
||||
@@ -25,7 +25,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
buildInputs = [ boost libcpr ]
|
||||
buildInputs = [ boost libcpr_1_10_5 ]
|
||||
++ lib.optionals finalAttrs.finalPackage.doCheck [ catch2_3 trompeloeil ];
|
||||
|
||||
cmakeFlags = [
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
curl,
|
||||
staticOnly ? stdenv.hostPlatform.isStatic,
|
||||
}:
|
||||
|
||||
let
|
||||
version = "1.11.0";
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "libcpr";
|
||||
inherit version;
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
"dev"
|
||||
];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "libcpr";
|
||||
repo = "cpr";
|
||||
rev = version;
|
||||
hash = "sha256-jWyss0krj8MVFqU1LAig+4UbXO5pdcWIT+hCs9DxemM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
propagatedBuildInputs = [ curl ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBUILD_SHARED_LIBS=${if staticOnly then "OFF" else "ON"}"
|
||||
"-DCPR_USE_SYSTEM_CURL=ON"
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# Linking with stdc++fs is no longer necessary.
|
||||
sed -i '/stdc++fs/d' include/CMakeLists.txt
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
substituteInPlace "$out/lib/cmake/cpr/cprTargets.cmake" \
|
||||
--replace "_IMPORT_PREFIX \"$out\"" \
|
||||
"_IMPORT_PREFIX \"$dev\""
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "C++ wrapper around libcurl";
|
||||
homepage = "https://docs.libcpr.org/";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ rycee ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
+15
-6
@@ -1,11 +1,22 @@
|
||||
{ lib, stdenv, fetchFromGitHub, cmake, curl }:
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
curl,
|
||||
}:
|
||||
|
||||
let version = "1.10.5"; in
|
||||
let
|
||||
version = "1.10.5";
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "libcpr";
|
||||
inherit version;
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
outputs = [
|
||||
"out"
|
||||
"dev"
|
||||
];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "libcpr";
|
||||
@@ -18,9 +29,7 @@ stdenv.mkDerivation {
|
||||
|
||||
propagatedBuildInputs = [ curl ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DCPR_USE_SYSTEM_CURL=ON"
|
||||
];
|
||||
cmakeFlags = [ "-DCPR_USE_SYSTEM_CURL=ON" ];
|
||||
|
||||
postPatch = ''
|
||||
# Linking with stdc++fs is no longer necessary.
|
||||
@@ -20672,8 +20672,6 @@ with pkgs;
|
||||
|
||||
libcomps = callPackage ../tools/package-management/libcomps { python = python3; };
|
||||
|
||||
libcpr = callPackage ../development/libraries/libcpr { };
|
||||
|
||||
libcredis = callPackage ../development/libraries/libcredis { };
|
||||
|
||||
libctb = callPackage ../development/libraries/libctb { };
|
||||
|
||||
Reference in New Issue
Block a user