2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
stdenv,
|
|
|
|
substituteAll,
|
|
|
|
bison,
|
|
|
|
boost,
|
|
|
|
cmake,
|
|
|
|
double-conversion,
|
|
|
|
fmt,
|
|
|
|
fuse3,
|
|
|
|
glog,
|
|
|
|
gtest,
|
|
|
|
jemalloc,
|
|
|
|
libarchive,
|
|
|
|
libevent,
|
|
|
|
libunwind,
|
|
|
|
lz4,
|
|
|
|
openssl,
|
|
|
|
pkg-config,
|
|
|
|
ronn,
|
|
|
|
xxHash,
|
|
|
|
utf8cpp,
|
|
|
|
zstd,
|
2022-08-12 12:06:08 +00:00
|
|
|
}:
|
2024-06-05 15:53:02 +00:00
|
|
|
let
|
2022-08-12 12:06:08 +00:00
|
|
|
pname = "dwarfs";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "0.9.9";
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit pname version;
|
2022-08-12 12:06:08 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mhx";
|
|
|
|
repo = "dwarfs";
|
2024-06-05 15:53:02 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2022-08-12 12:06:08 +00:00
|
|
|
fetchSubmodules = true;
|
2024-02-07 01:22:34 +00:00
|
|
|
hash = "sha256-Zzm2SaFR31TBBMDfgJulVbqsJBh1He2wBFzHRC/c5vg=";
|
2022-08-12 12:06:08 +00:00
|
|
|
};
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
patches = [
|
2024-06-05 15:53:02 +00:00
|
|
|
(
|
|
|
|
with lib.versions;
|
|
|
|
substituteAll {
|
|
|
|
src = ./version_info.patch;
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
versionFull = version; # displayed as version number (with v prepended)
|
|
|
|
versionMajor = major version;
|
|
|
|
versionMinor = minor version;
|
|
|
|
versionPatch = patch version;
|
|
|
|
}
|
|
|
|
)
|
2022-08-12 12:06:08 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DPREFER_SYSTEM_ZSTD=ON"
|
|
|
|
"-DPREFER_SYSTEM_XXHASH=ON"
|
|
|
|
"-DPREFER_SYSTEM_GTEST=ON"
|
2023-08-04 22:07:22 +00:00
|
|
|
"-DPREFER_SYSTEM_LIBFMT=ON"
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
# may be added under an option in the future
|
|
|
|
# "-DWITH_LEGACY_FUSE=ON"
|
|
|
|
"-DWITH_TESTS=ON"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
bison
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
ronn
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
# dwarfs
|
|
|
|
boost
|
2023-08-04 22:07:22 +00:00
|
|
|
fmt
|
2022-08-12 12:06:08 +00:00
|
|
|
fuse3
|
|
|
|
jemalloc
|
|
|
|
libarchive
|
|
|
|
lz4
|
|
|
|
xxHash
|
2023-08-04 22:07:22 +00:00
|
|
|
utf8cpp
|
2022-08-12 12:06:08 +00:00
|
|
|
zstd
|
|
|
|
|
|
|
|
# folly
|
|
|
|
double-conversion
|
|
|
|
glog
|
|
|
|
libevent
|
|
|
|
libunwind
|
|
|
|
openssl
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ gtest ];
|
2023-08-04 22:07:22 +00:00
|
|
|
# these fail inside of the sandbox due to missing access
|
2022-08-12 12:06:08 +00:00
|
|
|
# to the FUSE device
|
2023-08-04 22:07:22 +00:00
|
|
|
GTEST_FILTER = "-dwarfs/tools_test.end_to_end/*:dwarfs/tools_test.mutating_ops/*";
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
meta = {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Fast high compression read-only file system";
|
2022-08-12 12:06:08 +00:00
|
|
|
homepage = "https://github.com/mhx/dwarfs";
|
2024-06-05 15:53:02 +00:00
|
|
|
changelog = "https://github.com/mhx/dwarfs/blob/v${version}/CHANGES.md";
|
|
|
|
license = lib.licenses.gpl3Plus;
|
|
|
|
maintainers = [ lib.maintainers.luftmensch-luftmensch ];
|
|
|
|
platforms = lib.platforms.linux;
|
2022-08-12 12:06:08 +00:00
|
|
|
};
|
|
|
|
}
|