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