]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - build.nix
Disable pristine-tar option in gbp.conf, since there is no pristine-tar branch.
[bcachefs-tools-debian] / build.nix
index e05dad4243c1f42657099e0b3fdf00de3958985c..4a4b7b069c8b6e1aacb27aae6d29d9aaaf3a1b7d 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,23 +31,22 @@ in stdenv.mkDerivation {
     zlib # zlib1g
     attr
     udev
-  ];
+  ] ++ lib.optional fuseSupport fuse3;
+
+  ${if fuseSupport then "BCACHEFS_FUSE" else null} = "1";
 
-  cargoRoot = "rust-src";
+  cargoRoot = ".";
   # when git-based crates are updated, run:
   # nix run github:Mic92/nix-update -- --version=skip --flake default
   # to update the hashes
   cargoDeps = rustPlatform.importCargoLock {
-    lockFile = "${src}/rust-src/Cargo.lock";
-    outputHashes = {
-      "bindgen-0.64.0" = "sha256-GNG8as33HLRYJGYe0nw6qBzq86aHiGonyynEM7gaEE4=";
-    };
+    lockFile = "${src}/Cargo.lock";
   };
 
   makeFlags = [ "DESTDIR=${placeholder "out"}" "PREFIX=" "VERSION=${commit}" ];
 
   dontStrip = true;
-  checkPhase = "./bcachefs version";
+  checkPhase = "./target/release/bcachefs version";
   doCheck = true;
 
   meta = {