2017-02-09 06:11:25 +03:00
|
|
|
{stdenv, fetchurl, fetchpatch, utillinux, libuuid
|
2011-12-25 02:28:00 +04:00
|
|
|
, crypto ? false, libgcrypt, gnutls, pkgconfig}:
|
2008-07-24 17:11:02 +04:00
|
|
|
|
2008-01-28 22:31:32 +03:00
|
|
|
stdenv.mkDerivation rec {
|
2017-07-04 19:34:51 +03:00
|
|
|
pname = "ntfs3g";
|
2017-04-09 21:44:30 +03:00
|
|
|
version = "2017.3.23";
|
2008-03-19 15:32:44 +03:00
|
|
|
name = "${pname}-${version}";
|
|
|
|
|
2018-05-23 19:33:22 +03:00
|
|
|
outputs = [ "out" "dev" "man" "doc" ];
|
|
|
|
|
2015-04-19 10:37:46 +03:00
|
|
|
buildInputs = [ libuuid ] ++ stdenv.lib.optionals crypto [ gnutls libgcrypt ];
|
2012-12-28 22:20:09 +04:00
|
|
|
nativeBuildInputs = stdenv.lib.optional crypto pkgconfig;
|
2011-12-25 02:28:00 +04:00
|
|
|
|
2007-09-01 22:15:19 +04:00
|
|
|
src = fetchurl {
|
2013-06-09 06:41:44 +04:00
|
|
|
url = "http://tuxera.com/opensource/ntfs-3g_ntfsprogs-${version}.tgz";
|
2017-04-09 21:44:30 +03:00
|
|
|
sha256 = "1mb228p80hv97pgk3myyvgp975r9mxq56c6bdn1n24kngcfh4niy";
|
2007-09-01 22:15:19 +04:00
|
|
|
};
|
2008-03-19 15:32:44 +03:00
|
|
|
|
2017-02-09 06:11:25 +03:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
2018-05-04 19:21:43 +03:00
|
|
|
url = "https://sources.debian.org/data/main/n/ntfs-3g/1:2016.2.22AR.1+dfsg-1/debian/patches/0003-CVE-2017-0358.patch";
|
2017-02-09 06:11:25 +03:00
|
|
|
sha256 = "0hd05q9q06r18k8pmppvch1sslzqln5fvqj51d5r72g4mnpavpj3";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2011-12-25 02:28:00 +04:00
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace src/Makefile.in --replace /sbin '@sbindir@'
|
|
|
|
substituteInPlace ntfsprogs/Makefile.in --replace /sbin '@sbindir@'
|
2008-07-24 17:11:02 +04:00
|
|
|
substituteInPlace libfuse-lite/mount_util.c \
|
|
|
|
--replace /bin/mount ${utillinux}/bin/mount \
|
|
|
|
--replace /bin/umount ${utillinux}/bin/umount
|
|
|
|
'';
|
2008-03-19 15:32:44 +03:00
|
|
|
|
2015-04-19 10:37:46 +03: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 22:15:19 +04:00
|
|
|
|
2011-12-23 18:19:45 +04:00
|
|
|
postInstall =
|
|
|
|
''
|
|
|
|
# Prefer ntfs-3g over the ntfs driver in the kernel.
|
2011-12-25 02:28:00 +04:00
|
|
|
ln -sv mount.ntfs-3g $out/sbin/mount.ntfs
|
2011-12-23 18:19:45 +04:00
|
|
|
'';
|
|
|
|
|
2014-08-16 20:47:20 +04:00
|
|
|
meta = with stdenv.lib; {
|
2018-01-05 22:42:46 +03:00
|
|
|
homepage = https://www.tuxera.com/community/open-source-ntfs-3g/;
|
2015-12-16 22:30:20 +03:00
|
|
|
description = "FUSE-based NTFS driver with full write support";
|
2017-03-27 20:11:17 +03:00
|
|
|
maintainers = with maintainers; [ dezgeg ];
|
2014-08-16 20:47:20 +04:00
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.gpl2Plus; # and (lib)fuse-lite under LGPL2+
|
2007-09-01 22:15:19 +04:00
|
|
|
};
|
|
|
|
}
|