nixpkgs/pkgs/tools/filesystems/bcachefs-tools/default.nix

70 lines
1.6 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchFromGitHub
, pkg-config
, docutils
, libuuid
, libscrypt
, libsodium
, keyutils
, liburcu
, zlib
, libaio
, zstd
, lz4
, python3Packages
, udev
, valgrind
, nixosTests
, fuse3
, fuseSupport ? false
}:
2017-05-07 16:53:12 +00:00
2019-08-13 21:52:01 +00:00
stdenv.mkDerivation {
pname = "bcachefs-tools";
version = "unstable-2021-07-08";
2017-05-07 16:53:12 +00:00
src = fetchFromGitHub {
owner = "koverstreet";
repo = "bcachefs-tools";
rev = "050d5f7bcf08bd02f5077a1c5559f352fa449e1e";
sha256 = "15bl9ni0ckmvs5d7hi6v26z690rrmkb7dx00skn6gwq87ffz3imw";
2017-05-07 16:53:12 +00:00
};
postPatch = ''
substituteInPlace Makefile \
--replace "pytest-3" "pytest --verbose" \
--replace "INITRAMFS_DIR=/etc/initramfs-tools" \
"INITRAMFS_DIR=${placeholder "out"}/etc/initramfs-tools"
'';
2017-05-07 16:53:12 +00:00
nativeBuildInputs = [ pkg-config docutils ];
buildInputs = [
libuuid libscrypt libsodium keyutils liburcu zlib libaio
zstd lz4 python3Packages.pytest udev valgrind
2021-01-15 09:19:50 +00:00
] ++ lib.optional fuseSupport fuse3;
doCheck = false; # needs bcachefs module loaded on builder
checkFlags = [ "BCACHEFS_TEST_USE_VALGRIND=no" ];
checkInputs = [ valgrind ];
2021-01-15 09:19:50 +00:00
preCheck = lib.optionalString fuseSupport ''
rm tests/test_fuse.py
'';
installFlags = [ "PREFIX=${placeholder "out"}" ];
passthru.tests = {
smoke-test = nixosTests.bcachefs;
};
meta = with lib; {
2017-05-07 16:53:12 +00:00
description = "Tool for managing bcachefs filesystems";
homepage = "https://bcachefs.org/";
2017-05-07 16:53:12 +00:00
license = licenses.gpl2;
maintainers = with maintainers; [ davidak chiiruno ];
platforms = [ "x86_64-linux" ]; # does not build on aarch64, see https://github.com/koverstreet/bcachefs-tools/issues/39
2017-05-07 16:53:12 +00:00
};
}