diff options
Diffstat (limited to 'pkgs/tools/filesystems/bcachefs-tools/default.nix')
-rw-r--r-- | pkgs/tools/filesystems/bcachefs-tools/default.nix | 73 |
1 files changed, 41 insertions, 32 deletions
diff --git a/pkgs/tools/filesystems/bcachefs-tools/default.nix b/pkgs/tools/filesystems/bcachefs-tools/default.nix index 26158b0361d..be7a42e19e9 100644 --- a/pkgs/tools/filesystems/bcachefs-tools/default.nix +++ b/pkgs/tools/filesystems/bcachefs-tools/default.nix @@ -1,17 +1,34 @@ -{ stdenv, fetchgit, pkgconfig, attr, libuuid, libscrypt, libsodium, keyutils -, liburcu, zlib, libaio, zstd, lz4, valgrind, python3Packages -, fuseSupport ? false, fuse3 ? null }: - -assert fuseSupport -> fuse3 != null; +{ lib +, stdenv +, fetchFromGitHub +, pkg-config +, docutils +, libuuid +, libscrypt +, libsodium +, keyutils +, liburcu +, zlib +, libaio +, zstd +, lz4 +, python3Packages +, udev +, valgrind +, nixosTests +, fuse3 +, fuseSupport ? false +}: stdenv.mkDerivation { pname = "bcachefs-tools"; - version = "2020-04-04"; + version = "unstable-2021-07-08"; - src = fetchgit { - url = "https://evilpiepirate.org/git/bcachefs-tools.git"; - rev = "5d6e237b728cfb7c3bf2cb1a613e64bdecbd740d"; - sha256 = "1syym9k3njb0bk2mg6832cbf6r42z6y8b6hjv7dg4gmv2h7v7l7g"; + src = fetchFromGitHub { + owner = "koverstreet"; + repo = "bcachefs-tools"; + rev = "050d5f7bcf08bd02f5077a1c5559f352fa449e1e"; + sha256 = "15bl9ni0ckmvs5d7hi6v26z690rrmkb7dx00skn6gwq87ffz3imw"; }; postPatch = '' @@ -21,40 +38,32 @@ stdenv.mkDerivation { "INITRAMFS_DIR=${placeholder "out"}/etc/initramfs-tools" ''; - enableParallelBuilding = true; - - nativeBuildInputs = [ - pkgconfig - ]; + nativeBuildInputs = [ pkg-config docutils ]; buildInputs = [ libuuid libscrypt libsodium keyutils liburcu zlib libaio - zstd lz4 python3Packages.pytest - ] ++ stdenv.lib.optional fuseSupport fuse3; - - doCheck = true; + zstd lz4 python3Packages.pytest udev valgrind + ] ++ lib.optional fuseSupport fuse3; - checkFlags = [ - "BCACHEFS_TEST_USE_VALGRIND=no" - ]; + doCheck = false; # needs bcachefs module loaded on builder + checkFlags = [ "BCACHEFS_TEST_USE_VALGRIND=no" ]; + checkInputs = [ valgrind ]; - checkInputs = [ - valgrind - ]; - - preCheck = stdenv.lib.optionalString fuseSupport '' + preCheck = lib.optionalString fuseSupport '' rm tests/test_fuse.py ''; - installFlags = [ - "PREFIX=${placeholder "out"}" - ]; + installFlags = [ "PREFIX=${placeholder "out"}" ]; + + passthru.tests = { + smoke-test = nixosTests.bcachefs; + }; - meta = with stdenv.lib; { + meta = with lib; { description = "Tool for managing bcachefs filesystems"; homepage = "https://bcachefs.org/"; license = licenses.gpl2; maintainers = with maintainers; [ davidak chiiruno ]; - platforms = platforms.linux; + platforms = [ "x86_64-linux" ]; # does not build on aarch64, see https://github.com/koverstreet/bcachefs-tools/issues/39 }; } |