Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchFromGitHub, automake, autoconf, pkg-config, gettext, libtool, pandoc, which, attr, libiconv }:
2
3stdenv.mkDerivation rec {
4 pname = "mergerfs";
5 version = "2.35.1";
6
7 src = fetchFromGitHub {
8 owner = "trapexit";
9 repo = pname;
10 rev = version;
11 sha256 = "sha256-mUnjWMxeZJ9wIpJJDqQIUk2x7oifZ/b2HZlPtQ77q8U=";
12 };
13
14 nativeBuildInputs = [
15 automake autoconf pkg-config gettext libtool pandoc which
16 ];
17 prePatch = ''
18 sed -i -e '/chown/d' -e '/chmod/d' libfuse/Makefile
19 '';
20 buildInputs = [ attr libiconv ];
21
22 preConfigure = ''
23 echo "${version}" > VERSION
24 '';
25
26 makeFlags = [ "DESTDIR=${placeholder "out"}" "XATTR_AVAILABLE=1" "PREFIX=/" "SBINDIR=/bin" ];
27 enableParallelBuilding = true;
28
29 postFixup = ''
30 ln -srf $out/bin/mergerfs $out/bin/mount.fuse.mergerfs
31 ln -srf $out/bin/mergerfs $out/bin/mount.mergerfs
32 '';
33
34 meta = {
35 description = "A FUSE based union filesystem";
36 homepage = "https://github.com/trapexit/mergerfs";
37 license = lib.licenses.isc;
38 platforms = lib.platforms.linux;
39 maintainers = with lib.maintainers; [ jfrankenau makefu ];
40 };
41}