bcachefs-tools/rust-src/default.nix
Kent Overstreet 28f703cc25 Rust now integrated into bcachefs binary
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>
2023-02-21 01:03:08 -05:00

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;
})