2023-05-24 13:37:59 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, zlib, pcre2, expat, sqlite, openssl, unixODBC, libmysqlclient }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "poco";
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "1.12.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pocoproject";
|
|
|
|
repo = "poco";
|
2023-11-16 04:20:00 +00:00
|
|
|
sha256 = "sha256-2macXa2pi5FebSrTIfSQbIiafNCXczNQEP+PFbFxylw=";
|
2023-05-24 13:37:59 +00:00
|
|
|
rev = "poco-${version}-release";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
buildInputs = [ unixODBC libmysqlclient ];
|
2023-05-24 13:37:59 +00:00
|
|
|
propagatedBuildInputs = [ zlib pcre2 expat sqlite openssl ];
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
outputs = [ "out" "dev" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
MYSQL_DIR = libmysqlclient;
|
|
|
|
MYSQL_INCLUDE_DIR = "${MYSQL_DIR}/include/mysql";
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--unbundled"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
postFixup = ''
|
|
|
|
grep -rlF INTERFACE_INCLUDE_DIRECTORIES "$dev/lib/cmake/Poco" | while read -r f; do
|
|
|
|
substituteInPlace "$f" \
|
|
|
|
--replace "$"'{_IMPORT_PREFIX}/include' ""
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://pocoproject.org/";
|
|
|
|
description = "Cross-platform C++ libraries with a network/internet focus";
|
|
|
|
license = licenses.boost;
|
2023-05-24 13:37:59 +00:00
|
|
|
maintainers = with maintainers; [ orivej tomodachi94 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|