diff --git a/pkgs/by-name/nt/ntfs3g/package.nix b/pkgs/by-name/nt/ntfs3g/package.nix index 7bda93b3c434..3c7d25a6d49a 100644 --- a/pkgs/by-name/nt/ntfs3g/package.nix +++ b/pkgs/by-name/nt/ntfs3g/package.nix @@ -8,16 +8,15 @@ mount, libuuid, kmod, - macfuse-stubs, crypto ? false, libgcrypt, + macfuse-stubs, gnutls, - fuse, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "ntfs3g"; - version = "2026.2.25"; + version = "2026.7.7"; outputs = [ "out" @@ -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-7Z3rMOHBwrWqkxeksic3+Z+WvwJy2ra9rRxGjESsd04="; }; 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 ]; }; -} +})