nixpkgs/pkgs/tools/filesystems/mergerfs/default.nix
2021-12-25 18:22:02 +00:00

41 lines
1.1 KiB
Nix

{ lib, stdenv, fetchFromGitHub, automake, autoconf, pkg-config, gettext, libtool, pandoc, which, attr, libiconv }:
stdenv.mkDerivation rec {
pname = "mergerfs";
version = "2.33.3";
src = fetchFromGitHub {
owner = "trapexit";
repo = pname;
rev = version;
sha256 = "sha256-hZA7AkFEuSHp84Zn+m9+VVr4UewbbzeQL1n2bkUOX0Y=";
};
nativeBuildInputs = [
automake autoconf pkg-config gettext libtool pandoc which
];
prePatch = ''
sed -i -e '/chown/d' -e '/chmod/d' libfuse/Makefile
'';
buildInputs = [ attr libiconv ];
preConfigure = ''
echo "${version}" > VERSION
'';
makeFlags = [ "DESTDIR=${placeholder "out"}" "XATTR_AVAILABLE=1" "PREFIX=/" "SBINDIR=/bin" ];
enableParallelBuilding = true;
postFixup = ''
ln -srf $out/bin/mergerfs $out/bin/mount.fuse.mergerfs
ln -srf $out/bin/mergerfs $out/bin/mount.mergerfs
'';
meta = {
description = "A FUSE based union filesystem";
homepage = "https://github.com/trapexit/mergerfs";
license = lib.licenses.isc;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ jfrankenau makefu ];
};
}