]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - build.nix
nix: add bcachefs-fuse package
[bcachefs-tools-debian] / build.nix
index e05dad4243c1f42657099e0b3fdf00de3958985c..831c7e9f1e4d2f9db6818d272888f6589b384721 100644 (file)
--- a/build.nix
+++ b/build.nix
@@ -1,5 +1,6 @@
 { lib, stdenv, pkg-config, attr, libuuid, libsodium, keyutils, liburcu, zlib
-, libaio, udev, zstd, lz4, nix-gitignore, rustPlatform, rustc, cargo, }:
+, libaio, udev, zstd, lz4, nix-gitignore, rustPlatform, rustc, cargo, fuse3
+, fuseSupport ? false, }:
 let
   src = nix-gitignore.gitignoreSource [ ] ./.;
 
@@ -30,7 +31,9 @@ in stdenv.mkDerivation {
     zlib # zlib1g
     attr
     udev
-  ];
+  ] ++ lib.optional fuseSupport fuse3;
+
+  BCACHEFS_FUSE = if fuseSupport then "1" else "";
 
   cargoRoot = "rust-src";
   # when git-based crates are updated, run: