From 4d707697ab226550a30ed5862fd850a7ff0b8e38 Mon Sep 17 00:00:00 2001 From: Ryan Omasta Date: Fri, 22 May 2026 15:32:17 -0600 Subject: [PATCH 1/2] ntfs3g: modernize, adopt, stop using fuse2 Co-authored-by: Guillaume Girol (cherry picked from commit d6c26643937fd1f94bf42d097a5e7bab254cfe58) --- pkgs/by-name/nt/ntfs3g/package.nix | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/pkgs/by-name/nt/ntfs3g/package.nix b/pkgs/by-name/nt/ntfs3g/package.nix index 7bda93b3c434..8b4aa462b4e9 100644 --- a/pkgs/by-name/nt/ntfs3g/package.nix +++ b/pkgs/by-name/nt/ntfs3g/package.nix @@ -8,14 +8,13 @@ mount, libuuid, kmod, - macfuse-stubs, crypto ? false, libgcrypt, + macfuse-stubs, gnutls, - fuse, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "ntfs3g"; version = "2026.2.25"; @@ -29,19 +28,19 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "tuxera"; repo = "ntfs-3g"; - rev = version; - sha256 = "sha256-uiVh87ExLXq94NVqR8MEg7Lrvamm6MrH+qP3Nosii5c="; + tag = finalAttrs.version; + hash = "sha256-uiVh87ExLXq94NVqR8MEg7Lrvamm6MrH+qP3Nosii5c="; }; buildInputs = [ gettext libuuid - fuse ] ++ lib.optionals crypto [ gnutls libgcrypt - ]; + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ macfuse-stubs ]; # Note: libgcrypt is listed here non-optionally because its m4 macros are # being used in ntfs-3g's configure.ac. @@ -65,12 +64,17 @@ stdenv.mkDerivation rec { "--enable-xattr-mappings" "--${if crypto then "enable" else "disable"}-crypto" "--enable-extras" - "--with-mount-helper=${mount}/bin/mount" - "--with-umount-helper=${mount}/bin/umount" - "--with-fuse=external" + "--with-mount-helper=${lib.getExe' mount "mount"}" + "--with-umount-helper=${lib.getExe' mount "umount"}" + + # Use bundled FUSE as fuse2 is being deprecated + # https://github.com/tuxera/ntfs-3g/issues/54#issuecomment-3058178016 + # Darwin doesn't support internal FUSE, so we use the external macFUSE stubs instead. + # https://github.com/tuxera/ntfs-3g/issues/8#issuecomment-920700418 + "--with-fuse=${if stdenv.hostPlatform.isLinux then "internal" else "external"}" ] ++ lib.optionals stdenv.hostPlatform.isLinux [ - "--with-modprobe-helper=${kmod}/bin/modprobe" + "--with-modprobe-helper=${lib.getExe' kmod "modprobe"}" ]; postInstall = '' @@ -83,7 +87,7 @@ stdenv.mkDerivation rec { meta = { homepage = "https://github.com/tuxera/ntfs-3g"; description = "FUSE-based NTFS driver with full write support"; - maintainers = [ ]; + maintainers = [ lib.maintainers.ryand56 ]; mainProgram = "ntfs-3g"; platforms = with lib.platforms; darwin ++ linux; license = with lib.licenses; [ @@ -91,4 +95,4 @@ stdenv.mkDerivation rec { lgpl2Plus # fuse-lite ]; }; -} +}) From 7ed1391ca515700dce269877f329c0ea3195f0e8 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 15 Jul 2026 19:28:30 +0000 Subject: [PATCH 2/2] ntfs3g: 2026.2.25 -> 2026.7.7 (cherry picked from commit a07849623d5cab9be2d17567468a68d8fdf3d18f) --- pkgs/by-name/nt/ntfs3g/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/nt/ntfs3g/package.nix b/pkgs/by-name/nt/ntfs3g/package.nix index 8b4aa462b4e9..3c7d25a6d49a 100644 --- a/pkgs/by-name/nt/ntfs3g/package.nix +++ b/pkgs/by-name/nt/ntfs3g/package.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "ntfs3g"; - version = "2026.2.25"; + version = "2026.7.7"; outputs = [ "out" @@ -29,7 +29,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "tuxera"; repo = "ntfs-3g"; tag = finalAttrs.version; - hash = "sha256-uiVh87ExLXq94NVqR8MEg7Lrvamm6MrH+qP3Nosii5c="; + hash = "sha256-7Z3rMOHBwrWqkxeksic3+Z+WvwJy2ra9rRxGjESsd04="; }; buildInputs = [