about summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2020-04-06 15:43:36 +0100
committerGitHub <noreply@github.com>2020-04-06 15:43:36 +0100
commita737f030cfb0455a0d67e4f368b9285b7b334d5b (patch)
treef9e4fef3afa1385edfad3d0d83e60b0d14caaf67 /pkgs/tools
parentdc8af33d850c27e2158f8c51606d77bb5d3f8b77 (diff)
parent04a5e5ab7c77361a9891fcc3bc0e32748b43d05f (diff)
downloadnixlib-a737f030cfb0455a0d67e4f368b9285b7b334d5b.tar
nixlib-a737f030cfb0455a0d67e4f368b9285b7b334d5b.tar.gz
nixlib-a737f030cfb0455a0d67e4f368b9285b7b334d5b.tar.bz2
nixlib-a737f030cfb0455a0d67e4f368b9285b7b334d5b.tar.lz
nixlib-a737f030cfb0455a0d67e4f368b9285b7b334d5b.tar.xz
nixlib-a737f030cfb0455a0d67e4f368b9285b7b334d5b.tar.zst
nixlib-a737f030cfb0455a0d67e4f368b9285b7b334d5b.zip
Merge pull request #71481 from eadwu/bcachefs/update-10
bcachefs: update 10
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/filesystems/bcachefs-tools/default.nix48
1 files changed, 38 insertions, 10 deletions
diff --git a/pkgs/tools/filesystems/bcachefs-tools/default.nix b/pkgs/tools/filesystems/bcachefs-tools/default.nix
index 144ed0a38459..ad159f08872d 100644
--- a/pkgs/tools/filesystems/bcachefs-tools/default.nix
+++ b/pkgs/tools/filesystems/bcachefs-tools/default.nix
@@ -1,27 +1,55 @@
 { stdenv, fetchgit, pkgconfig, attr, libuuid, libscrypt, libsodium, keyutils
-, liburcu, zlib, libaio, zstd, lz4 }:
+, liburcu, zlib, libaio, zstd, lz4, valgrind, python3Packages
+, fuseSupport ? false, fuse3 ? null }:
+
+assert fuseSupport -> fuse3 != null;
 
 stdenv.mkDerivation {
   pname = "bcachefs-tools";
-  version = "2019-10-12";
+  version = "2020-04-04";
 
   src = fetchgit {
     url = "https://evilpiepirate.org/git/bcachefs-tools.git";
-    rev = "6e696ea08703eecd0d1c7b8c520b6f62f06f4f26";
-    sha256 = "0m3valm68vc73b4kydlga17fglxa9bldrjaszlladzl5bd0zb967";
+    rev = "5d6e237b728cfb7c3bf2cb1a613e64bdecbd740d";
+    sha256 = "1syym9k3njb0bk2mg6832cbf6r42z6y8b6hjv7dg4gmv2h7v7l7g";
   };
 
-  enableParallelBuilding = true;
-  nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ attr libuuid libscrypt libsodium keyutils liburcu zlib libaio zstd lz4 ];
-  installFlags = [ "PREFIX=${placeholder "out"}" ];
-
-  preInstall = ''
+  postPatch = ''
     substituteInPlace Makefile \
+      --replace "pytest-3" "pytest --verbose" \
       --replace "INITRAMFS_DIR=/etc/initramfs-tools" \
                 "INITRAMFS_DIR=${placeholder "out"}/etc/initramfs-tools"
   '';
 
+  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"}"
+  ];
+
   meta = with stdenv.lib; {
     description = "Tool for managing bcachefs filesystems";
     homepage = https://bcachefs.org/;