lol
1{ cmake
2, fetchFromGitHub
3, fetchpatch
4, sqlite
5, postgresql
6, boost
7, lib, stdenv
8}:
9
10stdenv.mkDerivation rec {
11 pname = "soci";
12 version = "4.0.2";
13
14 src = fetchFromGitHub {
15 owner = "SOCI";
16 repo = pname;
17 rev = "v${version}";
18 sha256 = "sha256-NE0ApbX8HG2VAQ9cg9+kX3kJQ4PR1XvWL9BlT8NphmE=";
19 };
20
21 patches = [
22 (fetchpatch {
23 name = "fix-backend-search-path.patch";
24 url = "https://github.com/SOCI/soci/commit/56c93afc467bdba8ffbe68739eea76059ea62f7a.patch";
25 sha256 = "sha256-nC/39pn3Cv5e65GgIfF3l64/AbCsfZHPUPIWETZFZAY=";
26 })
27 ];
28
29 # Do not build static libraries
30 cmakeFlags = [ "-DSOCI_STATIC=OFF" "-DCMAKE_CXX_STANDARD=11" "-DSOCI_TESTS=off" ];
31
32 nativeBuildInputs = [ cmake ];
33 buildInputs = [
34 sqlite
35 postgresql
36 boost
37 ];
38
39 meta = with lib; {
40 description = "Database access library for C++";
41 homepage = "https://soci.sourceforge.net/";
42 license = licenses.boost;
43 platforms = platforms.all;
44 maintainers = with maintainers; [ jluttine ];
45 };
46}