about summary refs log tree commit diff
path: root/pkgs/by-name/pg
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2024-02-23 04:20:00 +0000
committerMario Rodas <marsam@users.noreply.github.com>2024-02-23 04:20:00 +0000
commit7a0c418c66305cdb7735f483496bf18407141f5f (patch)
tree9468254fa6525afeded7b746247e924a60eabccb /pkgs/by-name/pg
parent13bc570966cb197aeada7a1c3886c9c37c5df62d (diff)
pgagroal: migrato to by-name
Diffstat (limited to 'pkgs/by-name/pg')
-rw-r--r--pkgs/by-name/pg/pgagroal/do-not-search-libatomic.patch15
-rw-r--r--pkgs/by-name/pg/pgagroal/package.nix29
2 files changed, 44 insertions, 0 deletions
diff --git a/pkgs/by-name/pg/pgagroal/do-not-search-libatomic.patch b/pkgs/by-name/pg/pgagroal/do-not-search-libatomic.patch
new file mode 100644
index 0000000000000..7f65205332b87
--- /dev/null
+++ b/pkgs/by-name/pg/pgagroal/do-not-search-libatomic.patch
@@ -0,0 +1,15 @@
+--- i/CMakeLists.txt
++++ w/CMakeLists.txt
+@@ -78,12 +78,6 @@
+ endif()
+ 
+ if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
+-  find_package(Libatomic)
+-  if (LIBATOMIC_FOUND)
+-    message(STATUS "libatomic found")
+-  else ()
+-    message(FATAL_ERROR "libatomic needed")
+-  endif()
+ 
+   find_package(Systemd)
+   if (SYSTEMD_FOUND)
diff --git a/pkgs/by-name/pg/pgagroal/package.nix b/pkgs/by-name/pg/pgagroal/package.nix
new file mode 100644
index 0000000000000..8ba0803d96bc7
--- /dev/null
+++ b/pkgs/by-name/pg/pgagroal/package.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchFromGitHub, cjson, cmake, docutils, libev, openssl, systemd }:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "pgagroal";
+  version = "1.6.0";
+
+  src = fetchFromGitHub {
+    owner = "agroal";
+    repo = "pgagroal";
+    rev = finalAttrs.version;
+    hash = "sha256-bgJvGJ35RdFopW88o+H1DLpG70anP197y6xrpRRrxUA=";
+  };
+
+  patches = [ ./do-not-search-libatomic.patch ];
+
+  nativeBuildInputs = [ cmake docutils ];
+
+  buildInputs = [ cjson libev openssl ]
+    ++ lib.optionals stdenv.isLinux [ systemd ];
+
+  meta = with lib; {
+    description = "High-performance connection pool for PostgreSQL";
+    homepage = "https://agroal.github.io/pgagroal/";
+    changelog = "https://github.com/agroal/pgagroal/releases/tag/${finalAttrs.version}";
+    license = licenses.bsd3;
+    maintainers = [ maintainers.marsam ];
+    platforms = platforms.unix;
+  };
+})