]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - build.nix
fix list_journal for nochanges
[bcachefs-tools-debian] / build.nix
index 5cf07de25e2e32906e4da09f02e94f8b63d07054..831c7e9f1e4d2f9db6818d272888f6589b384721 100644 (file)
--- a/build.nix
+++ b/build.nix
@@ -1,28 +1,11 @@
-{ lib
-, stdenv
-, pkg-config
-, attr
-, libuuid
-, libsodium
-, keyutils
-, liburcu
-, zlib
-, libaio
-, udev
-, zstd
-, lz4
-, nix-gitignore
-, rustPlatform
-, rustc
-, cargo
- }:
-
+{ lib, stdenv, pkg-config, attr, libuuid, libsodium, keyutils, liburcu, zlib
+, libaio, udev, zstd, lz4, nix-gitignore, rustPlatform, rustc, cargo, fuse3
+, fuseSupport ? false, }:
 let
-  src = nix-gitignore.gitignoreSource [] ./. ;
+  src = nix-gitignore.gitignoreSource [ ] ./.;
 
   commit = lib.strings.substring 0 7 (builtins.readFile ./.bcachefs_revision);
   version = "git-${commit}";
-
 in stdenv.mkDerivation {
   inherit src version;
 
@@ -48,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:
@@ -61,12 +46,14 @@ in stdenv.mkDerivation {
     };
   };
 
-  makeFlags = [
-    "PREFIX=${placeholder "out"}"
-    "VERSION=${commit}"
-  ];
+  makeFlags = [ "DESTDIR=${placeholder "out"}" "PREFIX=" "VERSION=${commit}" ];
 
   dontStrip = true;
   checkPhase = "./bcachefs version";
   doCheck = true;
+
+  meta = {
+    mainProgram = "bcachefs";
+    license = lib.licenses.gpl2Only;
+  };
 }