Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libpromhttp: init at 0.1.1 #91323

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
50 changes: 50 additions & 0 deletions pkgs/development/libraries/libpromhttp/default.nix
@@ -0,0 +1,50 @@
{ gccStdenv
, fetchFromGitHub
, cmake
, libmicrohttpd
, libprom
, fetchpatch
}:
let
stdenv = gccStdenv; # Darwin is clang by default and it doesn't work for this.
in
stdenv.mkDerivation rec {
pname = "libpromhttp";
version = "0.1.1";

src = fetchFromGitHub {
owner = "digitalocean";
repo = "prometheus-client-c";
rev = "v${version}";
sha256 = "0g69s24xwrv5974acshrhnp6i8rpby8c6bhz15m3d8kpgjw3cm8f";
};

nativeBuildInputs = [ cmake ];
buildInputs = [ libmicrohttpd libprom ];
doCheck = false;

patches = [
# Required so CMAKE_INSTALL_PREFIX is honored, otherwise it
# installs headers in /usr/include (absolute)
(fetchpatch {
url = "https://github.com/digitalocean/prometheus-client-c/commit/5fcedeb506b7d47dd7bab35797f2c3f23db6fe10.patch";
sha256 = "10hzg8v5jcgxz224kdq0nha9vs78wz098b0ys7gig2iwgrg018fy";
})
(fetchpatch {
url = "https://github.com/digitalocean/prometheus-client-c/commit/0c15e7e45ad0c3726593591fdd7d8f2fde845fe3.patch";
sha256 = "06899v1xz3lpsdxww4p3q7pv8nrymnibncdc472056znr5fidlp0";
})
];

preConfigure = ''
cd promhttp
'';

meta = {
homepage = "https://github.com/digitalocean/prometheus-client-c/";
description = "A Prometheus HTTP Endpoint in C";
platforms = stdenv.lib.platforms.unix;
license = stdenv.lib.licenses.asl20;
maintainers = [ stdenv.lib.maintainers.cfsmp3 ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -13427,6 +13427,8 @@ in

libprom = callPackage ../development/libraries/libprom { };

libpromhttp = callPackage ../development/libraries/libpromhttp { };

libproxy = callPackage ../development/libraries/libproxy {
inherit (darwin.apple_sdk.frameworks) SystemConfiguration CoreFoundation JavaScriptCore;
};
Expand Down