nixpkgs/pkgs/tools/filesystems/ntfs-3g/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

66 lines
1.8 KiB
Nix
Raw Normal View History

{ 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
}:
stdenv.mkDerivation rec {
pname = "ntfs3g";
2022-11-01 00:42:52 +00:00
version = "2022.10.3";
2018-05-23 16:33:22 +00:00
outputs = [ "out" "dev" "man" "doc" ];
src = fetchFromGitHub {
owner = "tuxera";
repo = "ntfs-3g";
rev = version;
2022-11-01 00:42:52 +00:00
sha256 = "sha256-nuFTsGkm3zmSzpwmhyY7Ke0VZfZU0jHOzEWaLBbglQk=";
};
buildInputs = [ gettext libuuid ]
++ lib.optionals crypto [ gnutls libgcrypt ]
2021-03-21 17:11:54 +00:00
++ lib.optionals stdenv.hostPlatform.isDarwin [ macfuse-stubs DiskArbitration ];
# 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 ];
patches = [
# https://github.com/tuxera/ntfs-3g/pull/39
./autoconf-sbin-helpers.patch
./consistent-sbindir-usage.patch
];
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"
"--enable-extras"
"--with-mount-helper=${mount}/bin/mount"
"--with-umount-helper=${mount}/bin/umount"
] ++ lib.optionals stdenv.hostPlatform.isLinux [
"--with-modprobe-helper=${kmod}/bin/modprobe"
2015-04-19 07:37:46 +00:00
];
postInstall =
''
# Prefer ntfs-3g over the ntfs driver in the kernel.
ln -sv mount.ntfs-3g $out/sbin/mount.ntfs
'';
enableParallelBuilding = true;
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";
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
];
};
}