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

43 lines
1.3 KiB
Nix
Raw Normal View History

{stdenv, fetchurl, utillinux, libuuid
, crypto ? false, libgcrypt, gnutls, pkgconfig}:
stdenv.mkDerivation rec {
pname = "ntfs-3g";
2012-07-26 04:04:43 +02:00
version = "2012.1.15";
name = "${pname}-${version}";
buildInputs = [libuuid] ++ stdenv.lib.optionals crypto [gnutls libgcrypt];
nativeBuildInputs = stdenv.lib.optional crypto pkgconfig;
src = fetchurl {
url = "http://tuxera.com/opensource/ntfs-3g_ntfsprogs-${version}.tgz";
2012-07-26 04:04:43 +02:00
sha256 = "09gvfgvqm4dswzxmwvg3r23bv39cp8y8b6qs2jcwmrqd032i25kg";
};
patchPhase = ''
substituteInPlace src/Makefile.in --replace /sbin '@sbindir@'
substituteInPlace ntfsprogs/Makefile.in --replace /sbin '@sbindir@'
substituteInPlace libfuse-lite/mount_util.c \
--replace /bin/mount ${utillinux}/bin/mount \
--replace /bin/umount ${utillinux}/bin/umount
'';
configureFlags =
''
--disable-ldconfig --exec-prefix=''${prefix} --enable-mount-helper
--enable-posix-acls --enable-xattr-mappings --${if crypto then "enable" else "disable"}-crypto
'';
postInstall =
''
# Prefer ntfs-3g over the ntfs driver in the kernel.
ln -sv mount.ntfs-3g $out/sbin/mount.ntfs
'';
meta = {
homepage = http://www.tuxera.com/community/;
description = "FUSE-base NTFS driver with full write support";
maintainers = [ stdenv.lib.maintainers.urkud ];
};
}