Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, stdenv 3, fetchFromGitHub 4, cmake 5, gbenchmark 6, gtest 7, civetweb 8, zlib 9, curl 10}: 11 12stdenv.mkDerivation rec { 13 pname = "prometheus-cpp"; 14 version = "1.1.0"; 15 16 src = fetchFromGitHub { 17 owner = "jupp0r"; 18 repo = pname; 19 rev = "v${version}"; 20 sha256 = "sha256-qx6oBxd0YrUyFq+7ArnKBqOwrl5X8RS9nErhRDUJ7+8="; 21 }; 22 23 nativeBuildInputs = [ cmake ]; 24 buildInputs = [ gbenchmark gtest zlib curl ]; 25 propagatedBuildInputs = [ civetweb ]; 26 strictDeps = true; 27 28 cmakeFlags = [ 29 "-DUSE_THIRDPARTY_LIBRARIES=OFF" 30 "-DBUILD_SHARED_LIBS=ON" 31 ]; 32 33 outputs = [ "out" "dev" ]; 34 35 postInstall = '' 36 mkdir -p $dev/lib/pkgconfig 37 substituteAll ${./prometheus-cpp.pc.in} $dev/lib/pkgconfig/prometheus-cpp.pc 38 ''; 39 40 meta = { 41 description = "Prometheus Client Library for Modern C++"; 42 homepage = "https://github.com/jupp0r/prometheus-cpp"; 43 license = [ lib.licenses.mit ]; 44 }; 45 46}