2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
|
2020-08-20 17:08:02 +00:00
|
|
|
, krb5, xfsprogs, jemalloc, dbus, libcap
|
2022-11-21 17:40:18 +00:00
|
|
|
, ntirpc, liburcu, bison, flex, nfs-utils, acl
|
2020-08-20 17:08:02 +00:00
|
|
|
} :
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "nfs-ganesha";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "5.9";
|
2024-02-29 20:09:43 +00:00
|
|
|
outputs = [ "out" "tools" ];
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nfs-ganesha";
|
|
|
|
repo = "nfs-ganesha";
|
|
|
|
rev = "V${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
sha256 = "sha256-YFQcqRZenJUdTnlYM7gPnIxU47dytSHk5ALdbpSf5Ms=";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
preConfigure = "cd src";
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DUSE_SYSTEM_NTIRPC=ON"
|
|
|
|
"-DSYSSTATEDIR=/var"
|
|
|
|
"-DENABLE_VFS_POSIX_ACL=ON"
|
2023-04-29 16:46:19 +00:00
|
|
|
"-DUSE_ACL_MAPPING=ON"
|
2023-10-09 19:29:22 +00:00
|
|
|
"-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON"
|
2022-12-17 10:02:37 +00:00
|
|
|
];
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
bison
|
|
|
|
flex
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2022-11-21 17:40:18 +00:00
|
|
|
acl
|
2020-08-20 17:08:02 +00:00
|
|
|
krb5
|
|
|
|
xfsprogs
|
|
|
|
jemalloc
|
|
|
|
dbus.lib
|
|
|
|
libcap
|
|
|
|
ntirpc
|
|
|
|
liburcu
|
|
|
|
nfs-utils
|
|
|
|
];
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/tools/mount.9P --replace "/bin/mount" "/usr/bin/env mount"
|
|
|
|
'';
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
postFixup = ''
|
|
|
|
patchelf --add-rpath $out/lib $out/bin/ganesha.nfsd
|
|
|
|
'';
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
postInstall = ''
|
|
|
|
install -Dm755 $src/src/tools/mount.9P $tools/bin/mount.9P
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-08-20 17:08:02 +00:00
|
|
|
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;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "ganesha.nfsd";
|
2024-02-29 20:09:43 +00:00
|
|
|
outputsToInstall = [ "out" "tools" ];
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
}
|