From 384a9709e783bed744ef9cb8943270acc5ae1021 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Fri, 21 Nov 2025 13:06:09 +0100 Subject: [PATCH 1/3] prometheus-cpp-lite: init at 1.0-unstable-2023-08-13 --- .../missing_includes.patch | 11 ++++ .../pr/prometheus-cpp-lite/package.nix | 58 +++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 pkgs/by-name/pr/prometheus-cpp-lite/missing_includes.patch create mode 100644 pkgs/by-name/pr/prometheus-cpp-lite/package.nix diff --git a/pkgs/by-name/pr/prometheus-cpp-lite/missing_includes.patch b/pkgs/by-name/pr/prometheus-cpp-lite/missing_includes.patch new file mode 100644 index 000000000000..92b2d7428c16 --- /dev/null +++ b/pkgs/by-name/pr/prometheus-cpp-lite/missing_includes.patch @@ -0,0 +1,11 @@ +diff --git a/core/include/prometheus/family.h b/core/include/prometheus/family.h +index 1c625c1..a3d0e85 100644 +--- a/core/include/prometheus/family.h ++++ b/core/include/prometheus/family.h +@@ -1,5 +1,6 @@ + #pragma once + ++#include + #include + #include + #include diff --git a/pkgs/by-name/pr/prometheus-cpp-lite/package.nix b/pkgs/by-name/pr/prometheus-cpp-lite/package.nix new file mode 100644 index 000000000000..9a9cda17c9bb --- /dev/null +++ b/pkgs/by-name/pr/prometheus-cpp-lite/package.nix @@ -0,0 +1,58 @@ +{ + lib, + stdenv, + fetchFromGitHub, + cmake, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "prometheus-cpp-lite"; + version = "1.0-unstable-2023-08-13"; + + src = fetchFromGitHub { + owner = "biaks"; + repo = "prometheus-cpp-lite"; + rev = "48d09c45ee6deb90e02579b03037740e1c01fd27"; + hash = "sha256-XplbP4wHxK9z8Q5fOnaiL7vzXBaZTJyo/tmXUJN/mb4="; + }; + + patches = [ + ./missing_includes.patch + ]; + + postPatch = '' + for dir in . core simpleapi; do + substituteInPlace $dir/CMakeLists.txt --replace-fail \ + 'cmake_minimum_required(VERSION 3.2)' \ + 'cmake_minimum_required(VERSION 3.10)' + done + + substituteInPlace 3rdpatry/http-client-lite/CMakeLists.txt --replace-fail \ + 'cmake_minimum_required(VERSION 3.3 FATAL_ERROR)' \ + 'cmake_minimum_required(VERSION 3.10)' \ + ''; + + nativeBuildInputs = [ + cmake + ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out/include/prometheus $out/lib + + cp ../core/include/prometheus/* $out/include/prometheus + cp ../simpleapi/include/prometheus/* $out/include/prometheus + cp simpleapi/libprometheus-cpp-simpleapi.* $out/lib/ + + runHook postInstall + ''; + + meta = { + description = "C++ Header-only Prometheus client library"; + homepage = "https://github.com/biaks/prometheus-cpp-lite"; + maintainers = [ lib.maintainers.markuskowa ]; + license = lib.licenses.mit; + platforms = lib.platforms.linux; + }; +}) From 5f62dbc97bfe7c5ef99f31a1e26688f53084da65 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Fri, 21 Nov 2025 13:07:57 +0100 Subject: [PATCH 2/3] ntirpc: 6.3 -> 7.2 --- pkgs/by-name/nt/ntirpc/package.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/nt/ntirpc/package.nix b/pkgs/by-name/nt/ntirpc/package.nix index e3f99bcc380c..11be845c0a18 100644 --- a/pkgs/by-name/nt/ntirpc/package.nix +++ b/pkgs/by-name/nt/ntirpc/package.nix @@ -7,17 +7,18 @@ liburcu, libtirpc, libnsl, + prometheus-cpp-lite, }: stdenv.mkDerivation rec { pname = "ntirpc"; - version = "6.3"; + version = "7.2"; src = fetchFromGitHub { owner = "nfs-ganesha"; repo = "ntirpc"; rev = "v${version}"; - sha256 = "sha256-e4eF09xwX2Qf/y9YfOGy7p6yhDFnKGI5cnrQy3o8c98="; + hash = "sha256-4E6wDAwinCNn7arRgBulg7e0x9S/steh+mjwNY4X3Vc="; }; outputs = [ @@ -38,6 +39,11 @@ stdenv.mkDerivation rec { krb5 liburcu libnsl + prometheus-cpp-lite + ]; + + cmakeFlags = [ + "-DUSE_MONITORING=ON" ]; postInstall = '' From 4cbcfddfc10c8e2f74f0b39f389cce8bf684f85c Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Fri, 21 Nov 2025 13:08:24 +0100 Subject: [PATCH 3/3] nfs-ganesha: 6.5 -> 9.2 --- pkgs/by-name/nf/nfs-ganesha/package.nix | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pkgs/by-name/nf/nfs-ganesha/package.nix b/pkgs/by-name/nf/nfs-ganesha/package.nix index 5626abc7cb8a..2ffe5212ee41 100644 --- a/pkgs/by-name/nf/nfs-ganesha/package.nix +++ b/pkgs/by-name/nf/nfs-ganesha/package.nix @@ -16,6 +16,7 @@ flex, nfs-utils, acl, + prometheus-cpp-lite, useCeph ? false, ceph, useDbus ? true, @@ -24,7 +25,7 @@ stdenv.mkDerivation rec { pname = "nfs-ganesha"; - version = "6.5"; + version = "9.2"; outputs = [ "out" @@ -35,14 +36,16 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "nfs-ganesha"; repo = "nfs-ganesha"; - rev = "V${version}"; - hash = "sha256-OHGmEzHu8y/TPQ70E2sicaLtNgvlf/bRq8JRs6S1tpY="; + tag = "V${version}"; + hash = "sha256-2EAkr+zu7Jc2j/8BrJ/+Skv/D3rTSbh4A5JTRhWafEk="; }; patches = lib.optional useDbus ./allow-bypassing-dbus-pkg-config-test.patch; preConfigure = "cd src"; + env.NIX_CFLAGS_COMPILE = "-Wno-redundant-move"; + cmakeFlags = [ "-DUSE_SYSTEM_NTIRPC=ON" "-DSYSSTATEDIR=/var" @@ -50,6 +53,7 @@ stdenv.mkDerivation rec { "-DUSE_ACL_MAPPING=ON" "-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON" "-DUSE_MAN_PAGE=ON" + "-DUSE_MONITORING=ON" ] ++ lib.optionals useCeph [ "-DUSE_RADOS_RECOV=ON" @@ -85,14 +89,11 @@ stdenv.mkDerivation rec { ntirpc liburcu nfs-utils + prometheus-cpp-lite ] ++ lib.optional useCeph ceph; postPatch = '' - substituteInPlace src/CMakeLists.txt --replace-fail \ - "cmake_minimum_required(VERSION 2.6.3)" \ - "cmake_minimum_required(VERSION 3.10)" - substituteInPlace src/tools/mount.9P --replace-fail "/bin/mount" "/usr/bin/env mount" '';