mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-01-23 00:07:07 +03:00
7e97ef59bd
update kernel diffHash
41 lines
915 B
Nix
41 lines
915 B
Nix
{ lib
|
|
|
|
, stdenv
|
|
, glibc
|
|
, llvmPackages
|
|
, rustPlatform
|
|
|
|
, bcachefs
|
|
|
|
, ...
|
|
}: 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 = bcachefs.bch_bindgen.nativeBuildInputs;
|
|
buildInputs = bcachefs.bch_bindgen.buildInputs;
|
|
inherit (bcachefs.bch_bindgen)
|
|
LIBBCACHEFS_INCLUDE
|
|
LIBBCACHEFS_LIB
|
|
LIBCLANG_PATH
|
|
BINDGEN_EXTRA_CLANG_ARGS;
|
|
|
|
preFixup = ''
|
|
ln $out/bin/mount-bcachefs $out/bin/mount.bcachefs
|
|
ln -s $out/bin $out/sbin
|
|
'';
|
|
# -isystem ${llvmPackages.libclang.lib}/lib/clang/${lib.getVersion llvmPackages.libclang}/include";
|
|
# CFLAGS = "-I${llvmPackages.libclang.lib}/include";
|
|
# LDFLAGS = "-L${libcdev}";
|
|
|
|
doCheck = false;
|
|
|
|
# NIX_DEBUG = 4;
|
|
}) |