Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
125 lines
2.6 KiB
Nix
125 lines
2.6 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
cmake,
|
|
pkg-config,
|
|
sphinx,
|
|
krb5,
|
|
xfsprogs,
|
|
jemalloc,
|
|
libcap,
|
|
ntirpc,
|
|
liburcu,
|
|
bison,
|
|
flex,
|
|
nfs-utils,
|
|
acl,
|
|
useCeph ? false,
|
|
ceph,
|
|
useDbus ? true,
|
|
dbus,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "nfs-ganesha";
|
|
version = "6.5";
|
|
|
|
outputs = [
|
|
"out"
|
|
"man"
|
|
"tools"
|
|
];
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "nfs-ganesha";
|
|
repo = "nfs-ganesha";
|
|
rev = "V${version}";
|
|
hash = "sha256-OHGmEzHu8y/TPQ70E2sicaLtNgvlf/bRq8JRs6S1tpY=";
|
|
};
|
|
|
|
patches = lib.optional useDbus ./allow-bypassing-dbus-pkg-config-test.patch;
|
|
|
|
preConfigure = "cd src";
|
|
|
|
cmakeFlags = [
|
|
"-DUSE_SYSTEM_NTIRPC=ON"
|
|
"-DSYSSTATEDIR=/var"
|
|
"-DENABLE_VFS_POSIX_ACL=ON"
|
|
"-DUSE_ACL_MAPPING=ON"
|
|
"-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON"
|
|
"-DUSE_MAN_PAGE=ON"
|
|
]
|
|
++ lib.optionals useCeph [
|
|
"-DUSE_RADOS_RECOV=ON"
|
|
"-DRADOS_URLS=ON"
|
|
"-DUSE_FSAL_CEPH=ON"
|
|
"-DUSE_FSAL_RGW=ON"
|
|
]
|
|
++ lib.optionals useDbus [
|
|
"-DUSE_DBUS=ON"
|
|
"-DDBUS_NO_PKGCONFIG=ON"
|
|
"-DDBUS_LIBRARY_DIRS=${lib.getLib dbus}/lib"
|
|
"-DDBUS_INCLUDE_DIRS=${lib.getDev dbus}/include/dbus-1.0\\;${lib.getLib dbus}/lib/dbus-1.0/include"
|
|
"-DDBUS_LIBRARIES=dbus-1"
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
pkg-config
|
|
bison
|
|
flex
|
|
sphinx
|
|
]
|
|
++ lib.optional useDbus dbus;
|
|
|
|
buildInputs = [
|
|
acl
|
|
krb5
|
|
xfsprogs
|
|
jemalloc
|
|
dbus.lib
|
|
libcap
|
|
ntirpc
|
|
liburcu
|
|
nfs-utils
|
|
]
|
|
++ lib.optional useCeph ceph;
|
|
|
|
postPatch = ''
|
|
substituteInPlace src/tools/mount.9P --replace "/bin/mount" "/usr/bin/env mount"
|
|
'';
|
|
|
|
postFixup = ''
|
|
patchelf --add-rpath $out/lib $out/bin/ganesha.nfsd
|
|
patchelf --add-rpath $out/lib $out/lib/libganesha_nfsd.so
|
|
''
|
|
+ lib.optionalString useCeph ''
|
|
patchelf --add-rpath $out/lib $out/bin/ganesha-rados-grace
|
|
patchelf --add-rpath $out/lib $out/lib/libganesha_rados_recov.so
|
|
patchelf --add-rpath $out/lib $out/lib/libganesha_rados_urls.so
|
|
'';
|
|
|
|
postInstall = ''
|
|
install -Dm755 $src/src/tools/mount.9P $tools/bin/mount.9P
|
|
''
|
|
+ lib.optionalString useDbus ''
|
|
# Policy for D-Bus statistics interface
|
|
install -Dm644 $src/src/scripts/ganeshactl/org.ganesha.nfsd.conf $out/etc/dbus-1/system.d/org.ganesha.nfsd.conf
|
|
'';
|
|
|
|
meta = with 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;
|
|
mainProgram = "ganesha.nfsd";
|
|
outputsToInstall = [
|
|
"out"
|
|
"man"
|
|
"tools"
|
|
];
|
|
};
|
|
}
|