diff options
author | Robert Helgesson <robert@rycee.net> | 2023-05-10 22:09:22 +0200 |
---|---|---|
committer | Robert Helgesson <robert@rycee.net> | 2023-05-11 11:01:59 +0200 |
commit | 959376499c645c1c3463550a972fc8faddb84c2b (patch) | |
tree | 090f213e262d12485ea355fbef389156a02444d8 /pkgs/development/libraries/libcpr | |
parent | 25603863bc045c5a6762b4f69acc2cc7312b5d57 (diff) | |
download | nixlib-959376499c645c1c3463550a972fc8faddb84c2b.tar nixlib-959376499c645c1c3463550a972fc8faddb84c2b.tar.gz nixlib-959376499c645c1c3463550a972fc8faddb84c2b.tar.bz2 nixlib-959376499c645c1c3463550a972fc8faddb84c2b.tar.lz nixlib-959376499c645c1c3463550a972fc8faddb84c2b.tar.xz nixlib-959376499c645c1c3463550a972fc8faddb84c2b.tar.zst nixlib-959376499c645c1c3463550a972fc8faddb84c2b.zip |
libcpr: init at 1.10.2
Diffstat (limited to 'pkgs/development/libraries/libcpr')
-rw-r--r-- | pkgs/development/libraries/libcpr/default.nix | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/development/libraries/libcpr/default.nix b/pkgs/development/libraries/libcpr/default.nix new file mode 100644 index 000000000000..d68b4576cac9 --- /dev/null +++ b/pkgs/development/libraries/libcpr/default.nix @@ -0,0 +1,43 @@ +{ lib, stdenv, fetchFromGitHub, cmake, curl }: + +let version = "1.10.2"; in +stdenv.mkDerivation { + pname = "libcpr"; + inherit version; + + outputs = [ "out" "dev" ]; + + src = fetchFromGitHub { + owner = "libcpr"; + repo = "cpr"; + rev = "1.10.2"; + hash = "sha256-F+ZIyFwWHn2AcVnKOaRlB7DjZzfmn8Iat/m3uknC8uA="; + }; + + nativeBuildInputs = [ cmake ]; + + buildInputs = [ curl ]; + + cmakeFlags = [ + "-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; + }; +} |