Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.03 42 lines 894 B view raw
1{ stdenv 2, fetchFromGitHub 3, cmake 4, gbenchmark 5, gtest 6, civetweb 7, zlib 8, curl 9}: 10 11stdenv.mkDerivation rec { 12 pname = "prometheus-cpp"; 13 version = "0.8.0"; 14 15 src = fetchFromGitHub { 16 owner = "jupp0r"; 17 repo = pname; 18 rev = "v${version}"; 19 sha256 = "0j12ir8skw3y2q8n743zql4ddp7v1j4h030pjcsqn0xqrqw7m5hg"; 20 }; 21 22 nativeBuildInputs = [ cmake ]; 23 buildInputs = [ gbenchmark civetweb gtest zlib curl ]; 24 25 strictDeps = true; 26 27 cmakeFlags = [ 28 "-DUSE_THIRDPARTY_LIBRARIES=OFF" 29 "-DCIVETWEB_INCLUDE_DIR=${civetweb.dev}/include" 30 "-DCIVETWEB_CXX_LIBRARY=${civetweb}/lib/libcivetweb${stdenv.targetPlatform.extensions.sharedLibrary}" 31 "-DBUILD_SHARED_LIBS=ON" 32 ]; 33 34 NIX_LDFLAGS = "-ldl"; 35 36 meta = { 37 description = "Prometheus Client Library for Modern C++"; 38 homepage = https://github.com/jupp0r/prometheus-cpp; 39 license = [ stdenv.lib.licenses.mit ]; 40 }; 41 42}