2024-07-01 15:47:52 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
2024-10-11 05:15:48 +00:00
|
|
|
nixosTests,
|
2024-07-01 15:47:52 +00:00
|
|
|
fetchFromGitHub,
|
|
|
|
cmake,
|
|
|
|
asciidoc,
|
|
|
|
jemalloc,
|
|
|
|
boost,
|
|
|
|
fmt,
|
|
|
|
fuse3,
|
|
|
|
spdlog,
|
|
|
|
yaml-cpp,
|
|
|
|
isa-l,
|
|
|
|
judy,
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
|
|
pname = "saunafs";
|
2024-09-26 11:04:55 +00:00
|
|
|
version = "4.5.1";
|
2024-07-01 15:47:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "leil-io";
|
|
|
|
repo = "saunafs";
|
|
|
|
rev = "v${finalAttrs.version}";
|
2024-09-26 11:04:55 +00:00
|
|
|
hash = "sha256-oMFS5eNNzCpaineCLn0hh3bXGw3SNdj+Pdvk3pevIZg=";
|
2024-07-01 15:47:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
./sfstool.patch
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"man"
|
|
|
|
"dev"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
asciidoc
|
|
|
|
];
|
|
|
|
buildInputs = [
|
|
|
|
fmt
|
|
|
|
spdlog
|
|
|
|
yaml-cpp
|
|
|
|
fuse3
|
|
|
|
boost
|
|
|
|
jemalloc
|
|
|
|
isa-l
|
|
|
|
judy
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
(lib.cmakeBool "ENABLE_WERROR" false)
|
|
|
|
(lib.cmakeBool "ENABLE_DOC" false)
|
|
|
|
(lib.cmakeBool "ENABLE_CLIENT_LIB" true)
|
|
|
|
(lib.cmakeBool "ENABLE_JEMALLOC" true)
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = lib.optionalString (!stdenv.hostPlatform.isStatic) ''
|
|
|
|
rm $out/lib/*.a
|
2024-10-11 05:15:48 +00:00
|
|
|
|
|
|
|
ln -s $out/bin/sfsmount $out/bin/mount.saunafs
|
2024-07-01 15:47:52 +00:00
|
|
|
'';
|
|
|
|
|
2024-10-11 05:15:48 +00:00
|
|
|
passthru.tests = nixosTests.saunafs;
|
|
|
|
|
2024-07-01 15:47:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Distributed POSIX file system";
|
|
|
|
homepage = "https://saunafs.com";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = [ maintainers.markuskowa ];
|
|
|
|
};
|
|
|
|
})
|