2022-07-16 13:39:57 +02:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, stdenv
|
|
|
|
, substituteAll
|
|
|
|
|
|
|
|
, bison
|
|
|
|
, boost
|
|
|
|
, cmake
|
|
|
|
, double-conversion
|
2023-07-23 19:11:29 +02:00
|
|
|
, fmt
|
2022-07-16 13:39:57 +02:00
|
|
|
, fuse3
|
|
|
|
, glog
|
|
|
|
, gtest
|
|
|
|
, jemalloc
|
|
|
|
, libarchive
|
|
|
|
, libevent
|
|
|
|
, libunwind
|
|
|
|
, lz4
|
|
|
|
, openssl
|
|
|
|
, pkg-config
|
|
|
|
, ronn
|
|
|
|
, xxHash
|
2023-07-23 19:11:29 +02:00
|
|
|
, utf8cpp
|
2022-07-16 13:39:57 +02:00
|
|
|
, zstd
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "dwarfs";
|
2023-07-23 19:11:29 +02:00
|
|
|
version = "0.7.2";
|
2022-07-16 13:39:57 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mhx";
|
|
|
|
repo = "dwarfs";
|
|
|
|
rev = "v${version}";
|
|
|
|
fetchSubmodules = true;
|
2023-07-23 19:11:29 +02:00
|
|
|
hash = "sha256-DcPRrATI2cpLZWAL+sSCoXvJ1R0O3yHqhlJW1aEpDpA=";
|
2022-07-16 13:39:57 +02:00
|
|
|
};
|
|
|
|
|
2023-07-23 19:11:29 +02:00
|
|
|
patches = [
|
|
|
|
(with lib.versions; substituteAll {
|
2022-07-16 13:39:57 +02:00
|
|
|
src = ./version_info.patch;
|
|
|
|
|
2023-07-23 19:11:29 +02:00
|
|
|
versionFull = version; # displayed as version number (with v prepended)
|
2022-07-16 13:39:57 +02:00
|
|
|
versionMajor = major version;
|
|
|
|
versionMinor = minor version;
|
|
|
|
versionPatch = patch version;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DPREFER_SYSTEM_ZSTD=ON"
|
|
|
|
"-DPREFER_SYSTEM_XXHASH=ON"
|
|
|
|
"-DPREFER_SYSTEM_GTEST=ON"
|
2023-07-23 19:11:29 +02:00
|
|
|
"-DPREFER_SYSTEM_LIBFMT=ON"
|
2022-07-16 13:39:57 +02: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-07-23 19:11:29 +02:00
|
|
|
fmt
|
2022-07-16 13:39:57 +02:00
|
|
|
fuse3
|
|
|
|
jemalloc
|
|
|
|
libarchive
|
|
|
|
lz4
|
|
|
|
xxHash
|
2023-07-23 19:11:29 +02:00
|
|
|
utf8cpp
|
2022-07-16 13:39:57 +02:00
|
|
|
zstd
|
|
|
|
|
|
|
|
# folly
|
|
|
|
double-conversion
|
|
|
|
glog
|
|
|
|
libevent
|
|
|
|
libunwind
|
|
|
|
openssl
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
2023-01-21 13:00:00 +01:00
|
|
|
nativeCheckInputs = [ gtest ];
|
2023-07-23 19:11:29 +02:00
|
|
|
# these fail inside of the sandbox due to missing access
|
2022-07-16 13:39:57 +02:00
|
|
|
# to the FUSE device
|
2023-07-23 19:11:29 +02:00
|
|
|
GTEST_FILTER = "-dwarfs/tools_test.end_to_end/*:dwarfs/tools_test.mutating_ops/*";
|
2022-07-16 13:39:57 +02:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A fast high compression read-only file system";
|
|
|
|
homepage = "https://github.com/mhx/dwarfs";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ keksbg ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|