mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-01-23 00:07:07 +03:00
8acc54456e
The fsck and bcachefs scripts simply worked by running 'exec bcachefs ...', but this executes whatever is out of `$PATH`, which is likely not what a user expected when working inside the bcachefs-tools tree. This replaces the local uses of 'exec bcachefs' to use bash's readlink/dirname builtins in order to find the location of the currently executing wrapper, and execute the 'bcachefs' tool from there. This allows executing these wrappers from anywhere, provided 'bcachefs' is just right next to them, with the correct semantics. As a result, this also allows removing a tiny hack from the Nix expressions, allowing the included default.nix to use completely standard mkDerivation builders, with no extra patch/fixup phases. Signed-off-by: Austin Seipp <aseipp@pobox.com>
33 lines
710 B
Nix
33 lines
710 B
Nix
{ nixpkgs ? (import ./nix/nixpkgs.nix)
|
|
}:
|
|
|
|
with nixpkgs;
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "bcachefs-tools-${version}";
|
|
version = "git";
|
|
|
|
src = lib.cleanSource ./.; # NOTE: ignore .git, otherwise things get weird!
|
|
|
|
nativeBuildInputs = [ git pkgconfig ];
|
|
buildInputs =
|
|
[ liburcu libuuid libaio zlib attr keyutils
|
|
libsodium libscrypt
|
|
];
|
|
|
|
enableParallelBuilding = true;
|
|
makeFlags =
|
|
[ "PREFIX=$(out)"
|
|
];
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "Userspace tools for bcachefs";
|
|
homepage = http://bcachefs.org;
|
|
license = licenses.gpl2;
|
|
platforms = platforms.linux;
|
|
maintainers =
|
|
[ "Kent Overstreet <kent.overstreet@gmail.com>"
|
|
];
|
|
};
|
|
}
|