diff --git a/pkgs/os-specific/linux/fuse/common.nix b/pkgs/os-specific/linux/fuse/common.nix index 15470479a3a2..f72b3cac7371 100644 --- a/pkgs/os-specific/linux/fuse/common.nix +++ b/pkgs/os-specific/linux/fuse/common.nix @@ -28,7 +28,9 @@ in stdenv.mkDerivation rec { url = "https://github.com/libfuse/libfuse/commit/914871b20a901e3e1e981c92bc42b1c93b7ab81b.patch"; sha256 = "1w4j6f1awjrycycpvmlv0x5v9gprllh4dnbjxl4dyl2jgbkaw6pa"; }) - ++ stdenv.lib.optional isFuse3 ./fuse3-install.patch; + ++ (if isFuse3 + then [ ./fuse3-install.patch ./fuse3-Do-not-set-FUSERMOUNT_DIR.patch ] + else [ ./fuse2-Do-not-set-FUSERMOUNT_DIR.patch ]); nativeBuildInputs = if isFuse3 then [ meson ninja pkgconfig ] diff --git a/pkgs/os-specific/linux/fuse/fuse2-Do-not-set-FUSERMOUNT_DIR.patch b/pkgs/os-specific/linux/fuse/fuse2-Do-not-set-FUSERMOUNT_DIR.patch new file mode 100644 index 000000000000..8ff40f34f938 --- /dev/null +++ b/pkgs/os-specific/linux/fuse/fuse2-Do-not-set-FUSERMOUNT_DIR.patch @@ -0,0 +1,11 @@ +--- a/lib/Makefile.am ++++ b/lib/Makefile.am +@@ -1,7 +1,7 @@ + ## Process this file with automake to produce Makefile.in + + AUTOMAKE_OPTIONS = subdir-objects +-AM_CPPFLAGS = -I$(top_srcdir)/include -DFUSERMOUNT_DIR=\"$(bindir)\" \ ++AM_CPPFLAGS = -I$(top_srcdir)/include \ + -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DFUSE_USE_VERSION=26 + + lib_LTLIBRARIES = libfuse.la libulockmgr.la diff --git a/pkgs/os-specific/linux/fuse/fuse3-Do-not-set-FUSERMOUNT_DIR.patch b/pkgs/os-specific/linux/fuse/fuse3-Do-not-set-FUSERMOUNT_DIR.patch new file mode 100644 index 000000000000..1d41a26b0a4d --- /dev/null +++ b/pkgs/os-specific/linux/fuse/fuse3-Do-not-set-FUSERMOUNT_DIR.patch @@ -0,0 +1,12 @@ +--- a/lib/meson.build ++++ b/lib/meson.build +@@ -36,8 +36,7 @@ libfuse = library('fuse3', libfuse_sources, version: meson.project_version(), + soversion: '3', include_directories: include_dirs, + dependencies: deps, install: true, + link_depends: 'fuse_versionscript', +- c_args: [ '-DFUSE_USE_VERSION=34', +- '-DFUSERMOUNT_DIR="@0@"'.format(fusermount_path) ], ++ c_args: [ '-DFUSE_USE_VERSION=34' ], + link_args: ['-Wl,--version-script,' + meson.current_source_dir() + + '/fuse_versionscript' ]) +