Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ntfs3g: add darwin build #117132

Merged
merged 1 commit into from
Mar 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions pkgs/tools/filesystems/ntfs-3g/default.nix
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
{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";
version = "2017.3.23";

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";
Expand All @@ -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 = [
Expand All @@ -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
];
};
}
4 changes: 3 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down