libcpr: merge duplicate cpr package (and update to 1.13.0) (#462651)
This commit is contained in:
@@ -1,61 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
pkg-config,
|
||||
openssl,
|
||||
curl,
|
||||
zlib,
|
||||
gtest,
|
||||
cppcheck,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "cpr";
|
||||
version = "1.12.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "libcpr";
|
||||
repo = "cpr";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-OkOyh2ibt/jX/Dc+TB1uSlWtzEhdSQwHVN96oCOh2yM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
gtest
|
||||
cppcheck
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
openssl
|
||||
zlib
|
||||
curl
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
# NOTE: Does not build with CPPCHECK
|
||||
# (lib.cmakeBool "CPR_ENABLE_CPPCHECK" true)
|
||||
(lib.cmakeBool "CPR_BUILD_TEST" true)
|
||||
(lib.cmakeBool "CURL_ZLIB" false)
|
||||
(lib.cmakeBool "BUILD_SHARED_LIBS" true)
|
||||
(lib.cmakeBool "CPR_USE_SYSTEM_CURL" true)
|
||||
(lib.cmakeFeature "CMAKE_BUILD_TYPE" "Release")
|
||||
];
|
||||
|
||||
# Install headers
|
||||
postInstall = ''
|
||||
mkdir -p $out/include
|
||||
cp -r $src/include/* $out/include/
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "C++ Requests: Curl for People, a spiritual port of Python Requests";
|
||||
homepage = "https://github.com/libcpr/cpr";
|
||||
license = lib.licenses.mit;
|
||||
platforms = lib.platforms.all;
|
||||
maintainers = with lib.maintainers; [ phodina ];
|
||||
};
|
||||
})
|
||||
@@ -4,11 +4,12 @@
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
curl,
|
||||
pkg-config,
|
||||
staticOnly ? stdenv.hostPlatform.isStatic,
|
||||
}:
|
||||
|
||||
let
|
||||
version = "1.12.0";
|
||||
version = "1.13.0";
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "libcpr";
|
||||
@@ -23,16 +24,19 @@ stdenv.mkDerivation {
|
||||
owner = "libcpr";
|
||||
repo = "cpr";
|
||||
rev = version;
|
||||
hash = "sha256-OkOyh2ibt/jX/Dc+TB1uSlWtzEhdSQwHVN96oCOh2yM=";
|
||||
hash = "sha256-qoNA88GL9Yv3r/7UsZduYXuyrQVxfFY/0P6RfLqT5Uw=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ curl ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBUILD_SHARED_LIBS=${if staticOnly then "OFF" else "ON"}"
|
||||
"-DCPR_USE_SYSTEM_CURL=ON"
|
||||
(lib.cmakeBool "BUILD_SHARED_LIBS" (!staticOnly))
|
||||
(lib.cmakeBool "CPR_USE_SYSTEM_CURL" true)
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
@@ -42,15 +46,18 @@ stdenv.mkDerivation {
|
||||
|
||||
postInstall = ''
|
||||
substituteInPlace "$out/lib/cmake/cpr/cprTargets.cmake" \
|
||||
--replace "_IMPORT_PREFIX \"$out\"" \
|
||||
"_IMPORT_PREFIX \"$dev\""
|
||||
--replace-fail "_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 ];
|
||||
maintainers = with maintainers; [
|
||||
phodina
|
||||
rycee
|
||||
];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
openssl,
|
||||
sqlcipher,
|
||||
boost,
|
||||
cpr,
|
||||
curl,
|
||||
glib,
|
||||
libcpr,
|
||||
libsecret,
|
||||
libmaddy-markdown,
|
||||
testers,
|
||||
@@ -48,7 +48,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
propagatedBuildInputs = [
|
||||
curl
|
||||
cpr
|
||||
libcpr
|
||||
libsecret
|
||||
libmaddy-markdown
|
||||
sqlcipher
|
||||
|
||||
@@ -457,6 +457,7 @@ mapAliases {
|
||||
cosmic-tasks = throw "'cosmic-tasks' has been renamed to/replaced by 'tasks'"; # Converted to throw 2025-10-27
|
||||
cotton = throw "'cotton' has been removed since it is vulnerable to CVE-2025-62518 and upstream is unmaintained"; # Added 2025-10-26
|
||||
cpp-ipfs-api = throw "'cpp-ipfs-api' has been renamed to/replaced by 'cpp-ipfs-http-client'"; # Converted to throw 2025-10-27
|
||||
cpr = warnAlias "'cpr' has been renamed to/replaced by 'libcpr'" libcpr; # Added 2025-11-17
|
||||
create-cycle-app = throw "'create-cycle-app' has been removed because it is unmaintained and has issues installing with recent nodejs versions."; # Added 2025-11-01
|
||||
crispyDoom = throw "'crispyDoom' has been renamed to/replaced by 'crispy-doom'"; # Converted to throw 2025-10-27
|
||||
critcl = throw "'critcl' has been renamed to/replaced by 'tclPackages.critcl'"; # Converted to throw 2025-10-27
|
||||
|
||||
Reference in New Issue
Block a user