about summary refs log tree commit diff
path: root/pkgs/development/libraries/redis-plus-plus
diff options
context:
space:
mode:
authorwheelsandmetal <jakob@schmutz.co.uk>2022-03-03 14:57:32 +0000
committerwheelsandmetal <jakob@schmutz.co.uk>2022-04-04 12:03:54 +0100
commit614cef9232d0985fa0c833ce13196c0f3d567f6f (patch)
treefbc4a9a89f7d2c7cc85ddb35dbb37f9e271703f7 /pkgs/development/libraries/redis-plus-plus
parenta84fee4bd38ea09c18534524132148d2d90c5df4 (diff)
redis-plus-plus: init at 1.3.3
Diffstat (limited to 'pkgs/development/libraries/redis-plus-plus')
-rw-r--r--pkgs/development/libraries/redis-plus-plus/default.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/development/libraries/redis-plus-plus/default.nix b/pkgs/development/libraries/redis-plus-plus/default.nix
new file mode 100644
index 0000000000000..a39a9b185dca4
--- /dev/null
+++ b/pkgs/development/libraries/redis-plus-plus/default.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv, fetchFromGitHub, cmake, hiredis
+, enableShared ? !stdenv.hostPlatform.isStatic
+, enableStatic ? stdenv.hostPlatform.isStatic
+}:
+
+# You must build at one type of library
+assert enableShared || enableStatic;
+
+stdenv.mkDerivation rec {
+  pname = "redis-plus-plus";
+  version = "1.3.3";
+
+  src = fetchFromGitHub {
+    owner = "sewenew";
+    repo = "redis-plus-plus";
+    rev = version;
+    sha256 = "sha256-k4q5YbbbKKHXcL0nndzJPshzXS20ARz4Tdy5cBg7kMc=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  propagatedBuildInputs = [ hiredis ];
+
+  cmakeFlags = [
+    "-DREDIS_PLUS_PLUS_BUILD_TEST=OFF"
+  ] ++ lib.optional (!enableShared) [
+    "-DREDIS_PLUS_PLUS_BUILD_SHARED=OFF"
+  ] ++ lib.optional (!enableStatic) [
+    "-DREDIS_PLUS_PLUS_BUILD_STATIC=OFF"
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/sewenew/redis-plus-plus";
+    description = "Redis client written in C++";
+    license = licenses.asl20;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ wheelsandmetal ];
+  };
+}