2020-03-20 13:50:33 +00:00
|
|
|
{ cmake
|
|
|
|
, fetchFromGitHub
|
2022-01-28 16:01:04 +00:00
|
|
|
, fetchpatch
|
2020-03-20 13:50:33 +00:00
|
|
|
, sqlite
|
2021-09-29 11:12:27 +00:00
|
|
|
, postgresql
|
|
|
|
, boost
|
2021-01-21 17:00:13 +00:00
|
|
|
, lib, stdenv
|
2020-03-20 13:50:33 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "soci";
|
2021-09-29 11:12:27 +00:00
|
|
|
version = "4.0.2";
|
2020-03-20 13:50:33 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SOCI";
|
|
|
|
repo = pname;
|
2021-09-29 11:12:27 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-NE0ApbX8HG2VAQ9cg9+kX3kJQ4PR1XvWL9BlT8NphmE=";
|
2020-03-20 13:50:33 +00:00
|
|
|
};
|
|
|
|
|
2022-01-28 16:01:04 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "fix-backend-search-path.patch";
|
|
|
|
url = "https://github.com/SOCI/soci/commit/56c93afc467bdba8ffbe68739eea76059ea62f7a.patch";
|
|
|
|
sha256 = "sha256-nC/39pn3Cv5e65GgIfF3l64/AbCsfZHPUPIWETZFZAY=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-03-20 13:50:33 +00:00
|
|
|
# Do not build static libraries
|
2022-01-23 00:26:21 +00:00
|
|
|
cmakeFlags = [ "-DSOCI_STATIC=OFF" "-DCMAKE_CXX_STANDARD=11" "-DSOCI_TESTS=off" ];
|
2020-03-20 13:50:33 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
2021-09-29 11:12:27 +00:00
|
|
|
buildInputs = [
|
|
|
|
sqlite
|
|
|
|
postgresql
|
|
|
|
boost
|
|
|
|
];
|
2020-03-20 13:50:33 +00:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2020-03-20 13:50:33 +00:00
|
|
|
description = "Database access library for C++";
|
2023-01-21 21:41:12 +00:00
|
|
|
homepage = "https://soci.sourceforge.net/";
|
2020-03-20 13:50:33 +00:00
|
|
|
license = licenses.boost;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ jluttine ];
|
|
|
|
};
|
|
|
|
}
|