2021-10-18 19:34:12 +03:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, glibc
|
2022-11-25 02:47:29 +03:00
|
|
|
, udev
|
2021-10-18 19:34:12 +03:00
|
|
|
, llvmPackages
|
|
|
|
, rustPlatform
|
2022-11-25 02:47:29 +03:00
|
|
|
, binary
|
2021-10-18 19:34:12 +03:00
|
|
|
, ...
|
|
|
|
}: rustPlatform.buildRustPackage ( let
|
2022-11-25 02:47:29 +03:00
|
|
|
cargo = lib.trivial.importTOML ./Cargo.toml;
|
2021-10-18 19:34:12 +03:00
|
|
|
in {
|
2022-11-25 02:47:29 +03:00
|
|
|
pname = "mount.bcachefs";
|
|
|
|
version = cargo.package.version;
|
|
|
|
|
|
|
|
src = builtins.path { path = ../.; name = "rust-src"; };
|
|
|
|
sourceRoot = "rust-src/mount";
|
|
|
|
|
|
|
|
cargoLock = { lockFile = ./Cargo.lock; };
|
2021-10-18 19:34:12 +03:00
|
|
|
|
2022-11-25 02:47:29 +03:00
|
|
|
nativeBuildInputs = [ binary rustPlatform.bindgenHook ];
|
|
|
|
buildInputs = [ binary ];
|
2021-10-18 19:34:12 +03:00
|
|
|
|
2022-11-25 02:47:29 +03:00
|
|
|
LIBBCACHEFS_LIB ="${binary}/lib";
|
|
|
|
LIBBCACHEFS_INCLUDE = binary.src;
|
2021-10-18 19:34:12 +03:00
|
|
|
|
2022-11-25 02:47:29 +03:00
|
|
|
doCheck = false;
|
|
|
|
})
|