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

56 lines
1.6 KiB
Nix
Raw Normal View History

2021-03-21 18:11:54 +01:00
{ lib, stdenv, fetchurl, pkg-config, mount, libuuid
, macfuse-stubs, DiskArbitration
, crypto ? false, libgcrypt, gnutls
}:
stdenv.mkDerivation rec {
pname = "ntfs3g";
2017-04-09 20:44:30 +02:00
version = "2017.3.23";
2018-05-23 18:33:22 +02:00
outputs = [ "out" "dev" "man" "doc" ];
2021-03-21 18:11:54 +01:00
buildInputs = [ libuuid ] ++ lib.optionals crypto [ gnutls libgcrypt ]
++ lib.optionals stdenv.isDarwin [ macfuse-stubs DiskArbitration ];
nativeBuildInputs = [ pkg-config ];
src = fetchurl {
url = "https://tuxera.com/opensource/ntfs-3g_ntfsprogs-${version}.tgz";
2017-04-09 20:44:30 +02:00
sha256 = "1mb228p80hv97pgk3myyvgp975r9mxq56c6bdn1n24kngcfh4niy";
};
patchPhase = ''
substituteInPlace src/Makefile.in --replace /sbin '@sbindir@'
substituteInPlace ntfsprogs/Makefile.in --replace /sbin '@sbindir@'
substituteInPlace libfuse-lite/mount_util.c \
2021-03-21 18:11:54 +01:00
--replace /bin/mount ${mount}/bin/mount \
--replace /bin/umount ${mount}/bin/umount
'';
2015-04-19 09:37:46 +02: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"
2015-04-19 09:37:46 +02:00
];
postInstall =
''
# Prefer ntfs-3g over the ntfs driver in the kernel.
ln -sv mount.ntfs-3g $out/sbin/mount.ntfs
'';
meta = with lib; {
homepage = "https://www.tuxera.com/community/open-source-ntfs-3g/";
2015-12-16 20:30:20 +01:00
description = "FUSE-based NTFS driver with full write support";
maintainers = with maintainers; [ dezgeg ];
2021-03-21 18:11:54 +01:00
platforms = with platforms; darwin ++ linux;
license = with licenses; [
gpl2Plus # ntfs-3g itself
lgpl2Plus # fuse-lite
];
};
}