2022-05-26 13:48:31 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config
|
|
|
|
, gettext, mount, libuuid, kmod, macfuse-stubs, DiskArbitration
|
2021-03-21 17:11:54 +00:00
|
|
|
, crypto ? false, libgcrypt, gnutls
|
|
|
|
}:
|
2008-07-24 13:11:02 +00:00
|
|
|
|
2008-01-28 19:31:32 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2017-07-04 16:34:51 +00:00
|
|
|
pname = "ntfs3g";
|
2022-11-01 00:42:52 +00:00
|
|
|
version = "2022.10.3";
|
2008-03-19 12:32:44 +00:00
|
|
|
|
2018-05-23 16:33:22 +00:00
|
|
|
outputs = [ "out" "dev" "man" "doc" ];
|
|
|
|
|
2022-05-26 13:48:31 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tuxera";
|
|
|
|
repo = "ntfs-3g";
|
|
|
|
rev = version;
|
2022-11-01 00:42:52 +00:00
|
|
|
sha256 = "sha256-nuFTsGkm3zmSzpwmhyY7Ke0VZfZU0jHOzEWaLBbglQk=";
|
2022-05-26 13:48:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ gettext libuuid ]
|
|
|
|
++ lib.optionals crypto [ gnutls libgcrypt ]
|
2021-03-21 17:11:54 +00:00
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [ macfuse-stubs DiskArbitration ];
|
2011-12-24 22:28:00 +00:00
|
|
|
|
2022-05-26 13:48:31 +00:00
|
|
|
# Note: libgcrypt is listed here non-optionally because its m4 macros are
|
|
|
|
# being used in ntfs-3g's configure.ac.
|
|
|
|
nativeBuildInputs = [ autoreconfHook libgcrypt pkg-config ];
|
2008-03-19 12:32:44 +00:00
|
|
|
|
2022-05-26 13:48:31 +00:00
|
|
|
patches = [
|
|
|
|
# https://github.com/tuxera/ntfs-3g/pull/39
|
|
|
|
./autoconf-sbin-helpers.patch
|
|
|
|
./consistent-sbindir-usage.patch
|
|
|
|
];
|
2008-03-19 12:32:44 +00:00
|
|
|
|
2015-04-19 07:37:46 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--disable-ldconfig"
|
|
|
|
"--exec-prefix=\${prefix}"
|
|
|
|
"--enable-mount-helper"
|
|
|
|
"--enable-posix-acls"
|
|
|
|
"--enable-xattr-mappings"
|
|
|
|
"--${if crypto then "enable" else "disable"}-crypto"
|
2019-10-10 20:53:15 +00:00
|
|
|
"--enable-extras"
|
2022-05-26 13:48:31 +00:00
|
|
|
"--with-mount-helper=${mount}/bin/mount"
|
|
|
|
"--with-umount-helper=${mount}/bin/umount"
|
2022-07-24 16:37:55 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isLinux [
|
2022-05-26 13:48:31 +00:00
|
|
|
"--with-modprobe-helper=${kmod}/bin/modprobe"
|
2015-04-19 07:37:46 +00:00
|
|
|
];
|
2007-09-01 18:15:19 +00:00
|
|
|
|
2011-12-23 14:19:45 +00:00
|
|
|
postInstall =
|
|
|
|
''
|
|
|
|
# Prefer ntfs-3g over the ntfs driver in the kernel.
|
2011-12-24 22:28:00 +00:00
|
|
|
ln -sv mount.ntfs-3g $out/sbin/mount.ntfs
|
2011-12-23 14:19:45 +00:00
|
|
|
'';
|
|
|
|
|
2022-05-26 13:48:31 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2021-09-02 10:27:51 +00:00
|
|
|
homepage = "https://github.com/tuxera/ntfs-3g";
|
2015-12-16 19:30:20 +00:00
|
|
|
description = "FUSE-based NTFS driver with full write support";
|
2017-03-27 17:11:17 +00:00
|
|
|
maintainers = with maintainers; [ dezgeg ];
|
2021-03-21 17:11:54 +00:00
|
|
|
platforms = with platforms; darwin ++ linux;
|
|
|
|
license = with licenses; [
|
|
|
|
gpl2Plus # ntfs-3g itself
|
|
|
|
lgpl2Plus # fuse-lite
|
|
|
|
];
|
2007-09-01 18:15:19 +00:00
|
|
|
};
|
|
|
|
}
|