2018-08-06 15:58:12 +02:00
|
|
|
{ stdenv, fetchgit, pkgconfig, attr, libuuid, libscrypt, libsodium, keyutils
|
2019-10-18 22:47:24 +02:00
|
|
|
, liburcu, zlib, libaio, zstd, lz4, valgrind, python3Packages
|
|
|
|
, fuseSupport ? false, fuse3 ? null }:
|
|
|
|
|
|
|
|
assert fuseSupport -> fuse3 != null;
|
2017-05-07 18:53:12 +02:00
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
stdenv.mkDerivation {
|
2019-01-14 03:24:53 +01:00
|
|
|
pname = "bcachefs-tools";
|
2020-04-06 16:28:57 +02:00
|
|
|
version = "2020-04-04";
|
2017-05-07 18:53:12 +02:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://evilpiepirate.org/git/bcachefs-tools.git";
|
2020-04-06 16:28:57 +02:00
|
|
|
rev = "5d6e237b728cfb7c3bf2cb1a613e64bdecbd740d";
|
|
|
|
sha256 = "1syym9k3njb0bk2mg6832cbf6r42z6y8b6hjv7dg4gmv2h7v7l7g";
|
2017-05-07 18:53:12 +02:00
|
|
|
};
|
|
|
|
|
2019-10-18 22:47:24 +02:00
|
|
|
postPatch = ''
|
2019-01-14 03:24:53 +01:00
|
|
|
substituteInPlace Makefile \
|
2019-10-18 22:47:24 +02:00
|
|
|
--replace "pytest-3" "pytest --verbose" \
|
2019-01-14 03:24:53 +01:00
|
|
|
--replace "INITRAMFS_DIR=/etc/initramfs-tools" \
|
|
|
|
"INITRAMFS_DIR=${placeholder "out"}/etc/initramfs-tools"
|
2018-08-06 15:58:12 +02:00
|
|
|
'';
|
2017-05-07 18:53:12 +02:00
|
|
|
|
2019-10-18 22:47:24 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkgconfig
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libuuid libscrypt libsodium keyutils liburcu zlib libaio
|
|
|
|
zstd lz4 python3Packages.pytest
|
|
|
|
] ++ stdenv.lib.optional fuseSupport fuse3;
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
checkFlags = [
|
|
|
|
"BCACHEFS_TEST_USE_VALGRIND=no"
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
valgrind
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = stdenv.lib.optionalString fuseSupport ''
|
|
|
|
rm tests/test_fuse.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
installFlags = [
|
|
|
|
"PREFIX=${placeholder "out"}"
|
|
|
|
];
|
|
|
|
|
2017-05-07 18:53:12 +02:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Tool for managing bcachefs filesystems";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://bcachefs.org/";
|
2017-05-07 18:53:12 +02:00
|
|
|
license = licenses.gpl2;
|
2018-08-06 15:58:12 +02:00
|
|
|
maintainers = with maintainers; [ davidak chiiruno ];
|
2017-05-07 18:53:12 +02:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|