about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/poco
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/poco')
-rw-r--r--nixpkgs/pkgs/development/libraries/poco/default.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/poco/default.nix b/nixpkgs/pkgs/development/libraries/poco/default.nix
new file mode 100644
index 000000000000..b4ba1790d58d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/poco/default.nix
@@ -0,0 +1,43 @@
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, zlib, pcre2, expat, sqlite, openssl, unixODBC, libmysqlclient }:
+
+stdenv.mkDerivation rec {
+  pname = "poco";
+
+  version = "1.12.5";
+
+  src = fetchFromGitHub {
+    owner = "pocoproject";
+    repo = "poco";
+    sha256 = "sha256-2macXa2pi5FebSrTIfSQbIiafNCXczNQEP+PFbFxylw=";
+    rev = "poco-${version}-release";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [ unixODBC libmysqlclient ];
+  propagatedBuildInputs = [ zlib pcre2 expat sqlite openssl ];
+
+  outputs = [ "out" "dev" ];
+
+  MYSQL_DIR = libmysqlclient;
+  MYSQL_INCLUDE_DIR = "${MYSQL_DIR}/include/mysql";
+
+  configureFlags = [
+    "--unbundled"
+  ];
+
+  postFixup = ''
+    grep -rlF INTERFACE_INCLUDE_DIRECTORIES "$dev/lib/cmake/Poco" | while read -r f; do
+      substituteInPlace "$f" \
+        --replace "$"'{_IMPORT_PREFIX}/include' ""
+    done
+  '';
+
+  meta = with lib; {
+    homepage = "https://pocoproject.org/";
+    description = "Cross-platform C++ libraries with a network/internet focus";
+    license = licenses.boost;
+    maintainers = with maintainers; [ orivej tomodachi94 ];
+    platforms = platforms.unix;
+  };
+}