1 { nixpkgs ? (import ./nix/nixpkgs.nix)
6 stdenv.mkDerivation rec {
7 name = "bcachefs-tools-${version}";
10 src = lib.cleanSource ./.; # NOTE: ignore .git, otherwise things get weird!
12 nativeBuildInputs = [ git pkgconfig ];
14 [ liburcu libuuid libaio zlib attr keyutils
19 # ensure the mkfs and fsck scripts, which are just wrappers around
20 # 'bcachefs', are patched to refer to the right location inside the
21 # nix store. (you wouldn't expect built tools to call random outside
22 # utilities, in general, but the exact tools they were built with.)
24 # TODO FIXME: it would be better to fix this in the 'install' target,
25 # however, so this works with any bog-standard installation
27 substituteInPlace fsck.bcachefs --replace bcachefs $out/bin/bcachefs
28 substituteInPlace mkfs.bcachefs --replace bcachefs $out/bin/bcachefs
31 enableParallelBuilding = true;
36 meta = with stdenv.lib; {
37 description = "Userspace tools for bcachefs";
38 homepage = http://bcachefs.org;
39 license = licenses.gpl2;
40 platforms = platforms.linux;
42 [ "Kent Overstreet <kent.overstreet@gmail.com>"