diff --git a/pkgs/tools/filesystems/ntfs-3g/default.nix b/pkgs/tools/filesystems/ntfs-3g/default.nix index 7039584ea904..89ef27827a19 100644 --- a/pkgs/tools/filesystems/ntfs-3g/default.nix +++ b/pkgs/tools/filesystems/ntfs-3g/default.nix @@ -1,5 +1,7 @@ -{lib, stdenv, fetchurl, util-linux, libuuid -, crypto ? false, libgcrypt, gnutls, pkg-config}: +{ lib, stdenv, fetchurl, pkg-config, mount, libuuid +, macfuse-stubs, DiskArbitration +, crypto ? false, libgcrypt, gnutls +}: stdenv.mkDerivation rec { pname = "ntfs3g"; @@ -7,8 +9,9 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" "man" "doc" ]; - buildInputs = [ libuuid ] ++ lib.optionals crypto [ gnutls libgcrypt ]; - nativeBuildInputs = lib.optional crypto pkg-config; + 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"; @@ -19,8 +22,8 @@ stdenv.mkDerivation rec { substituteInPlace src/Makefile.in --replace /sbin '@sbindir@' substituteInPlace ntfsprogs/Makefile.in --replace /sbin '@sbindir@' substituteInPlace libfuse-lite/mount_util.c \ - --replace /bin/mount ${util-linux}/bin/mount \ - --replace /bin/umount ${util-linux}/bin/umount + --replace /bin/mount ${mount}/bin/mount \ + --replace /bin/umount ${mount}/bin/umount ''; configureFlags = [ @@ -43,7 +46,10 @@ stdenv.mkDerivation rec { homepage = "https://www.tuxera.com/community/open-source-ntfs-3g/"; description = "FUSE-based NTFS driver with full write support"; maintainers = with maintainers; [ dezgeg ]; - platforms = platforms.linux; - license = licenses.gpl2Plus; # and (lib)fuse-lite under LGPL2+ + platforms = with platforms; darwin ++ linux; + license = with licenses; [ + gpl2Plus # ntfs-3g itself + lgpl2Plus # fuse-lite + ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 54c771c4f121..33bf9cd8f313 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6804,7 +6804,9 @@ in nss_pam_ldapd = callPackage ../tools/networking/nss-pam-ldapd {}; - ntfs3g = callPackage ../tools/filesystems/ntfs-3g { }; + ntfs3g = callPackage ../tools/filesystems/ntfs-3g { + inherit (darwin.apple_sdk.frameworks) DiskArbitration; + }; # ntfsprogs are merged into ntfs-3g ntfsprogs = pkgs.ntfs3g;