at 17.09-beta 47 lines 1.6 kB view raw
1{ stdenv, fetchFromGitHub, fetchpatch, utillinux 2, autoconf, automake, libtool, gettext }: 3 4stdenv.mkDerivation rec { 5 name = "fuse-${version}"; 6 version = "2.9.7"; 7 8 src = fetchFromGitHub { 9 owner = "libfuse"; 10 repo = "libfuse"; 11 rev = name; 12 sha256 = "1wyjjfb7p4jrkk15zryzv33096a5fmsdyr2p4b00dd819wnly2n2"; 13 }; 14 15 buildInputs = [ utillinux autoconf automake libtool gettext ]; 16 17 patches = stdenv.lib.optional stdenv.isAarch64 (fetchpatch { 18 url = "https://github.com/libfuse/libfuse/commit/914871b20a901e3e1e981c92bc42b1c93b7ab81b.patch"; 19 sha256 = "1w4j6f1awjrycycpvmlv0x5v9gprllh4dnbjxl4dyl2jgbkaw6pa"; 20 }); 21 22 preConfigure = 23 '' 24 export MOUNT_FUSE_PATH=$out/sbin 25 export INIT_D_PATH=$TMPDIR/etc/init.d 26 export UDEV_RULES_PATH=$out/etc/udev/rules.d 27 28 # Ensure that FUSE calls the setuid wrapper, not 29 # $out/bin/fusermount. It falls back to calling fusermount in 30 # $PATH, so it should also work on non-NixOS systems. 31 export NIX_CFLAGS_COMPILE="-DFUSERMOUNT_DIR=\"/run/wrappers/bin\"" 32 33 sed -e 's@/bin/@${utillinux}/bin/@g' -i lib/mount_util.c 34 sed -e 's@CONFIG_RPATH=/usr/share/gettext/config.rpath@CONFIG_RPATH=${gettext}/share/gettext/config.rpath@' -i makeconf.sh 35 36 ./makeconf.sh 37 ''; 38 39 enableParallelBuilding = true; 40 41 meta = with stdenv.lib; { 42 homepage = https://github.com/libfuse/libfuse; 43 description = "Kernel module and library that allows filesystems to be implemented in user space"; 44 platforms = platforms.linux; 45 maintainers = [ maintainers.mornfall ]; 46 }; 47}