Merge pull request #92813 from markuskowa/add-ganesha
nfs-ganesha: init at 3.3
This commit is contained in:
commit
f2997db610
38
pkgs/development/libraries/ntirpc/default.nix
Normal file
38
pkgs/development/libraries/ntirpc/default.nix
Normal file
@ -0,0 +1,38 @@
|
||||
{ stdenv, fetchFromGitHub, cmake
|
||||
, krb5, liburcu , libtirpc
|
||||
} :
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ntirpc";
|
||||
version = "3.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nfs-ganesha";
|
||||
repo = "ntirpc";
|
||||
rev = "v${version}";
|
||||
sha256 = "08vc2z9sl1p9mk1mx0zn4xv7dw12gamhciy41fbavm90iavf3vqm";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace ntirpc/netconfig.h --replace "/etc/netconfig" "$out/etc/netconfig"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ krb5 liburcu ];
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/etc
|
||||
|
||||
# Library needs a netconfig to run.
|
||||
# Steal the file from libtirpc
|
||||
cp ${libtirpc}/etc/netconfig $out/etc/
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Transport-independent RPC (TI-RPC)";
|
||||
homepage = "https://github.com/nfs-ganesha/ntirpc";
|
||||
maintainers = [ maintainers.markuskowa ];
|
||||
platforms = platforms.linux;
|
||||
license = licenses.bsd3;
|
||||
};
|
||||
}
|
48
pkgs/servers/nfs-ganesha/default.nix
Normal file
48
pkgs/servers/nfs-ganesha/default.nix
Normal file
@ -0,0 +1,48 @@
|
||||
{ stdenv, fetchFromGitHub, cmake, pkg-config
|
||||
, krb5, xfsprogs, jemalloc, dbus, libcap
|
||||
, ntirpc, liburcu, bison, flex, nfs-utils
|
||||
} :
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "nfs-ganesha";
|
||||
version = "3.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nfs-ganesha";
|
||||
repo = "nfs-ganesha";
|
||||
rev = "V${version}";
|
||||
sha256 = "1w48rqrbqah0hnirvjdz8lyr9ah8b73j3cgsppb04gnrmpssgmb6";
|
||||
};
|
||||
|
||||
patches = [ ./sysstatedir.patch ];
|
||||
|
||||
preConfigure = "cd src";
|
||||
|
||||
cmakeFlags = [ "-DUSE_SYSTEM_NTIRPC=ON" ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
bison
|
||||
flex
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
krb5
|
||||
xfsprogs
|
||||
jemalloc
|
||||
dbus.lib
|
||||
libcap
|
||||
ntirpc
|
||||
liburcu
|
||||
nfs-utils
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "NFS server that runs in user space";
|
||||
homepage = "https://github.com/nfs-ganesha/nfs-ganesha/wiki";
|
||||
maintainers = [ maintainers.markuskowa ];
|
||||
platforms = platforms.linux;
|
||||
license = licenses.lgpl3Plus;
|
||||
};
|
||||
}
|
15
pkgs/servers/nfs-ganesha/sysstatedir.patch
Normal file
15
pkgs/servers/nfs-ganesha/sysstatedir.patch
Normal file
@ -0,0 +1,15 @@
|
||||
diff --git a/src/include/config-h.in.cmake b/src/include/config-h.in.cmake
|
||||
index 51697310b..2b5f91075 100644
|
||||
--- a/src/include/config-h.in.cmake
|
||||
+++ b/src/include/config-h.in.cmake
|
||||
@@ -72,8 +72,8 @@
|
||||
#define NFS_GANESHA 1
|
||||
|
||||
#define GANESHA_CONFIG_PATH "@SYSCONFDIR@/ganesha/ganesha.conf"
|
||||
-#define GANESHA_PIDFILE_PATH "@SYSSTATEDIR@/run/ganesha.pid"
|
||||
-#define NFS_V4_RECOV_ROOT "@SYSSTATEDIR@/lib/nfs/ganesha"
|
||||
+#define GANESHA_PIDFILE_PATH "/run/ganesha.pid"
|
||||
+#define NFS_V4_RECOV_ROOT "/var/lib/nfs/ganesha"
|
||||
/**
|
||||
* @brief Default value for krb5_param.ccache_dir
|
||||
*/
|
@ -5556,6 +5556,8 @@ in
|
||||
|
||||
ndstool = callPackage ../tools/archivers/ndstool { };
|
||||
|
||||
nfs-ganesha = callPackage ../servers/nfs-ganesha { };
|
||||
|
||||
ngrep = callPackage ../tools/networking/ngrep { };
|
||||
|
||||
neuron-notes = haskell.lib.justStaticExecutables (haskell.lib.generateOptparseApplicativeCompletion "neuron" haskellPackages.neuron);
|
||||
@ -5664,6 +5666,8 @@ in
|
||||
|
||||
ntfy = callPackage ../tools/misc/ntfy {};
|
||||
|
||||
ntirpc = callPackage ../development/libraries/ntirpc { };
|
||||
|
||||
ntopng = callPackage ../tools/networking/ntopng { };
|
||||
|
||||
ntp = callPackage ../tools/networking/ntp {
|
||||
|
Loading…
Reference in New Issue
Block a user