2011-12-24 22:28:00 +00:00
|
|
|
{stdenv, fetchurl, utillinux, libuuid
|
|
|
|
, crypto ? false, libgcrypt, gnutls, pkgconfig}:
|
2008-07-24 14:11:02 +01:00
|
|
|
|
2008-01-28 19:31:32 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2013-06-09 03:41:44 +01:00
|
|
|
pname = "ntfs-3g";
|
2015-04-19 08:37:46 +01:00
|
|
|
version = "2015.3.14";
|
2008-03-19 12:32:44 +00:00
|
|
|
name = "${pname}-${version}";
|
|
|
|
|
2015-04-19 08:37:46 +01:00
|
|
|
buildInputs = [ libuuid ] ++ stdenv.lib.optionals crypto [ gnutls libgcrypt ];
|
2012-12-28 18:20:09 +00:00
|
|
|
nativeBuildInputs = stdenv.lib.optional crypto pkgconfig;
|
2011-12-24 22:28:00 +00:00
|
|
|
|
2007-09-01 19:15:19 +01:00
|
|
|
src = fetchurl {
|
2013-06-09 03:41:44 +01:00
|
|
|
url = "http://tuxera.com/opensource/ntfs-3g_ntfsprogs-${version}.tgz";
|
2015-04-19 08:37:46 +01:00
|
|
|
sha256 = "1wiqcmy07y02k3iqq56cscnhg5syisbjj9mxfaid85l3bl0rdycp";
|
2007-09-01 19:15:19 +01:00
|
|
|
};
|
2008-03-19 12:32:44 +00:00
|
|
|
|
2011-12-24 22:28:00 +00:00
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace src/Makefile.in --replace /sbin '@sbindir@'
|
|
|
|
substituteInPlace ntfsprogs/Makefile.in --replace /sbin '@sbindir@'
|
2008-07-24 14:11:02 +01:00
|
|
|
substituteInPlace libfuse-lite/mount_util.c \
|
|
|
|
--replace /bin/mount ${utillinux}/bin/mount \
|
|
|
|
--replace /bin/umount ${utillinux}/bin/umount
|
|
|
|
'';
|
2008-03-19 12:32:44 +00:00
|
|
|
|
2015-04-19 08:37:46 +01:00
|
|
|
configureFlags = [
|
|
|
|
"--disable-ldconfig"
|
|
|
|
"--exec-prefix=\${prefix}"
|
|
|
|
"--enable-mount-helper"
|
|
|
|
"--enable-posix-acls"
|
|
|
|
"--enable-xattr-mappings"
|
|
|
|
"--${if crypto then "enable" else "disable"}-crypto"
|
|
|
|
];
|
2007-09-01 19:15:19 +01: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
|
|
|
'';
|
|
|
|
|
2014-08-16 17:47:20 +01:00
|
|
|
meta = with stdenv.lib; {
|
2010-11-07 23:20:02 +00:00
|
|
|
homepage = http://www.tuxera.com/community/;
|
2015-12-16 19:30:20 +00:00
|
|
|
description = "FUSE-based NTFS driver with full write support";
|
2014-08-16 17:47:20 +01:00
|
|
|
maintainers = [ maintainers.urkud ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.gpl2Plus; # and (lib)fuse-lite under LGPL2+
|
2007-09-01 19:15:19 +01:00
|
|
|
};
|
|
|
|
}
|
2014-08-16 17:47:20 +01:00
|
|
|
|