2020-03-20 14:50:33 +01:00
|
|
|
{ cmake
|
|
|
|
, fetchFromGitHub
|
2022-01-28 17:01:04 +01:00
|
|
|
, fetchpatch
|
2020-03-20 14:50:33 +01:00
|
|
|
, sqlite
|
2021-09-29 13:12:27 +02:00
|
|
|
, postgresql
|
|
|
|
, boost
|
2021-01-21 18:00:13 +01:00
|
|
|
, lib, stdenv
|
2020-03-20 14:50:33 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "soci";
|
2021-09-29 13:12:27 +02:00
|
|
|
version = "4.0.2";
|
2020-03-20 14:50:33 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SOCI";
|
|
|
|
repo = pname;
|
2021-09-29 13:12:27 +02:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-NE0ApbX8HG2VAQ9cg9+kX3kJQ4PR1XvWL9BlT8NphmE=";
|
2020-03-20 14:50:33 +01:00
|
|
|
};
|
|
|
|
|
2022-01-28 17:01:04 +01: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 14:50:33 +01:00
|
|
|
# Do not build static libraries
|
2022-01-23 01:26:21 +01:00
|
|
|
cmakeFlags = [ "-DSOCI_STATIC=OFF" "-DCMAKE_CXX_STANDARD=11" "-DSOCI_TESTS=off" ];
|
2020-03-20 14:50:33 +01:00
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
2021-09-29 13:12:27 +02:00
|
|
|
buildInputs = [
|
|
|
|
sqlite
|
|
|
|
postgresql
|
|
|
|
boost
|
|
|
|
];
|
2020-03-20 14:50:33 +01:00
|
|
|
|
2021-01-21 18:00:13 +01:00
|
|
|
meta = with lib; {
|
2020-03-20 14:50:33 +01:00
|
|
|
description = "Database access library for C++";
|
|
|
|
homepage = "http://soci.sourceforge.net/";
|
|
|
|
license = licenses.boost;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ jluttine ];
|
|
|
|
};
|
|
|
|
}
|