1{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, zlib, pcre2, expat, sqlite, openssl, unixODBC, libmysqlclient }:
2
3stdenv.mkDerivation rec {
4 pname = "poco";
5
6 version = "1.12.4";
7
8 src = fetchFromGitHub {
9 owner = "pocoproject";
10 repo = "poco";
11 sha256 = "sha256-gQ97fkoTGI6yuMPjEsITfapH9FSQieR8rcrPR1nExxc=";
12 rev = "poco-${version}-release";
13 };
14
15 nativeBuildInputs = [ cmake pkg-config ];
16
17 buildInputs = [ unixODBC libmysqlclient ];
18 propagatedBuildInputs = [ zlib pcre2 expat sqlite openssl ];
19
20 outputs = [ "out" "dev" ];
21
22 MYSQL_DIR = libmysqlclient;
23 MYSQL_INCLUDE_DIR = "${MYSQL_DIR}/include/mysql";
24
25 cmakeFlags = [
26 "-DPOCO_UNBUNDLED=ON"
27 ];
28
29 postFixup = ''
30 grep -rlF INTERFACE_INCLUDE_DIRECTORIES "$dev/lib/cmake/Poco" | while read -r f; do
31 substituteInPlace "$f" \
32 --replace "$"'{_IMPORT_PREFIX}/include' ""
33 done
34 '';
35
36 meta = with lib; {
37 homepage = "https://pocoproject.org/";
38 description = "Cross-platform C++ libraries with a network/internet focus";
39 license = licenses.boost;
40 maintainers = with maintainers; [ orivej tomodachi94 ];
41 platforms = platforms.unix;
42 };
43}