Skip to contentSkip to conversation

nix: add bcachefs-fuse package

PATH TOOLS Finn Behrens 2 participants 4 messages Nov 19, 2023 – Nov 20, 2023

lore
Share & tools
lore
#0 lore raw

Add a fuseSupport argument and bcachefs-fuse as flake output with fuse enabled.

---
 build.nix | 7 +++++--
 flake.nix | 1 +
 2 files changed, 6 insertions(+), 2 deletions(-)
build.nix +5 -2
index e05dad4..831c7e9 100644
@@ -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:
flake.nix +1 -0
index c4185e7..b8f9ce5 100644
@@ -23,6 +23,7 @@
       in {
         packages = {
           inherit (pkgs) bcachefs;
+          bcachefs-fuse = pkgs.bcachefs.override { fuseSupport = true; };
           default = pkgs.bcachefs;
         };
 
Signature · 1 line
2.42.0
#1 lore raw
Quoted 3 lines · Finn Behrens

Add a fuseSupport argument and bcachefs-fuse as flake output with fuse enabled.

We can't do this just yet, not until the fuse support is getting more attention; it's been frequently failing to build lately.

There have been people getting interested in that code though, so - soon, perhaps?

#2 lore raw
Quoted 7 lines · Kent Overstreet
Quoted 3 lines · Finn Behrens

Add a fuseSupport argument and bcachefs-fuse as flake output with fuse enabled.

We can't do this just yet, not until the fuse support is getting more attention; it's been frequently failing to build lately.

This just adds a second output, the default is still building without fuse, but with this you can easily let nix build with fuse support. As there is no sort of nix CI as far as I’m aware, this should also not block anything.

Second option would be to mark with fuse as broken, but keep this. Then you have to opt into potentially broken packages when using the fuse support via a environment variable while calling nix.

Quoted 3 lines

There have been people getting interested in that code though, so - soon, perhaps?

#3 lore raw
Quoted 7 lines · Finn Behrens
Quoted 3 lines · Kent Overstreet
Quoted 2 lines · Finn Behrens

Add a fuseSupport argument and bcachefs-fuse as flake output with fuse enabled.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

We can't do this just yet, not until the fuse support is getting more attention; it's been frequently failing to build lately.

This just adds a second output, the default is still building without fuse, but with this you can easily let nix build with fuse support. As there is no sort of nix CI as far as I’m aware, this should also not block anything.

Ah, ok - I'll apply it then.