nfs-ganesha: 6.5 -> 9.2 (#463732)
This commit is contained in:
@@ -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"
|
||||
'';
|
||||
|
||||
|
||||
@@ -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 = ''
|
||||
|
||||
@@ -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 <stdexcept>
|
||||
#include <cstddef>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
@@ -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;
|
||||
};
|
||||
})
|
||||
Reference in New Issue
Block a user