mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-09 00:00:04 +03:00
Rust is now required for building the bcachefs tool, and rust code is now fully integrated with the C codebase - meaning it is possible to call back and forth. The mount helper is now a subcommand, 'mount.bcachefs' is now a small shell wrapper that invokes 'bcachefs mount'. This will make it easier to start rewriting other subcommands in rust, and eventually the whole command line interface. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
28 lines
552 B
Nix
28 lines
552 B
Nix
{ lib
|
|
, stdenv
|
|
, glibc
|
|
, udev
|
|
, llvmPackages
|
|
, rustPlatform
|
|
, binary
|
|
, ...
|
|
}: rustPlatform.buildRustPackage ( let
|
|
cargo = lib.trivial.importTOML ./Cargo.toml;
|
|
in {
|
|
pname = "mount.bcachefs";
|
|
version = cargo.package.version;
|
|
|
|
src = builtins.path { path = ../.; name = "rust-src"; };
|
|
sourceRoot = "rust-src/mount";
|
|
|
|
cargoLock = { lockFile = ./Cargo.lock; };
|
|
|
|
nativeBuildInputs = [ binary rustPlatform.bindgenHook ];
|
|
buildInputs = [ binary ];
|
|
|
|
LIBBCACHEFS_LIB ="${binary}/lib";
|
|
LIBBCACHEFS_INCLUDE = binary.src;
|
|
|
|
doCheck = false;
|
|
})
|