fuse: use macfuse-stubs instead on Darwin

This commit is contained in:
midchildan 2021-03-23 23:15:56 +09:00
parent 55b7888f43
commit c595604bed
No known key found for this signature in database
GPG key ID: D9A5748BACC6E3C2
7 changed files with 18 additions and 18 deletions

View file

@ -1,5 +1,5 @@
{ lib, stdenv, fetchPypi, fetchpatch, buildPythonPackage, pkg-config, pytest, fuse, attr, which
, contextlib2, macfuse-stubs, DiskArbitration
, contextlib2
}:
buildPythonPackage rec {
@ -21,9 +21,7 @@ buildPythonPackage rec {
nativeBuildInputs = [ pkg-config ];
buildInputs =
lib.optionals stdenv.isLinux [ fuse ]
++ lib.optionals stdenv.isDarwin [ DiskArbitration macfuse-stubs ];
buildInputs = [ fuse ];
checkInputs = [ pytest which ] ++
lib.optionals stdenv.isLinux [ attr ];

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, cpio, xar, undmg, libtapi }:
{ lib, stdenv, fetchurl, cpio, xar, undmg, libtapi, DiskArbitration }:
stdenv.mkDerivation rec {
pname = "macfuse-stubs";
@ -10,6 +10,7 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ cpio xar undmg libtapi ];
propagatedBuildInputs = [ DiskArbitration ];
postUnpack = ''
xar -xf 'Install macFUSE.pkg'
@ -40,6 +41,11 @@ stdenv.mkDerivation rec {
meta = with lib; {
homepage = "https://osxfuse.github.io";
description = "Build time stubs for FUSE on macOS";
longDescription = ''
macFUSE is required for this package to work on macOS. To install macFUSE,
use the installer from the <link xlink:href="https://osxfuse.github.io/">
project website</link>.
'';
platforms = platforms.darwin;
maintainers = with maintainers; [ midchildan ];

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, fuse, pkg-config, macfuse-stubs }:
{ lib, stdenv, fetchurl, fuse, pkg-config }:
stdenv.mkDerivation rec {
version = "1.15.1";
@ -10,9 +10,7 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ pkg-config ];
buildInputs = if stdenv.isDarwin
then [ macfuse-stubs ]
else [ fuse ];
buildInputs = [ fuse ];
postFixup = ''
ln -s $out/bin/bindfs $out/bin/mount.fuse.bindfs
'';

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, curl, openssl, libxml2, fuse, macfuse-stubs }:
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, curl, openssl, libxml2, fuse }:
stdenv.mkDerivation rec {
pname = "s3fs-fuse";
@ -11,9 +11,7 @@ stdenv.mkDerivation rec {
sha256 = "sha256-Agb0tq7B98Ioe0G/XEZCYcFQKnMuYXX9x0yg4Gvu3/k=";
};
buildInputs = [ curl openssl libxml2 ]
++ lib.optionals stdenv.isLinux [ fuse ]
++ lib.optionals stdenv.isDarwin [ macfuse-stubs ];
buildInputs = [ curl openssl libxml2 fuse ];
nativeBuildInputs = [ autoreconfHook pkg-config ];
configureFlags = [

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, cmake, fuse, macfuse-stubs }:
{ lib, stdenv, fetchFromGitHub, cmake, fuse }:
stdenv.mkDerivation rec {
pname = "unionfs-fuse";
@ -21,11 +21,11 @@ stdenv.mkDerivation rec {
postPatch = lib.optionalString stdenv.isDarwin ''
substituteInPlace CMakeLists.txt \
--replace '/usr/local/include/osxfuse/fuse' '${macfuse-stubs}/include/fuse'
--replace '/usr/local/include/osxfuse/fuse' '${fuse}/include/fuse'
'';
nativeBuildInputs = [ cmake ];
buildInputs = [ (if stdenv.isDarwin then macfuse-stubs else fuse) ];
buildInputs = [ fuse ];
# Put the unionfs mount helper in place as mount.unionfs-fuse. This makes it
# possible to do:

View file

@ -19273,7 +19273,7 @@ in
fusePackages = dontRecurseIntoAttrs (callPackage ../os-specific/linux/fuse {
util-linux = util-linuxMinimal;
});
fuse = lowPrio fusePackages.fuse_2;
fuse = lowPrio (if stdenv.isDarwin then macfuse-stubs else fusePackages.fuse_2);
fuse3 = fusePackages.fuse_3;
fuse-common = hiPrio fusePackages.fuse_3.common;
@ -19412,6 +19412,7 @@ in
macfuse-stubs = callPackage ../os-specific/darwin/macfuse {
inherit (darwin) libtapi;
inherit (darwin.apple_sdk.frameworks) DiskArbitration;
};
osxsnarf = callPackage ../os-specific/darwin/osxsnarf { };

View file

@ -3968,7 +3968,6 @@ in {
llfuse = callPackage ../development/python-modules/llfuse {
inherit (pkgs) fuse;
inherit (pkgs.darwin.apple_sdk.frameworks) DiskArbitration;
};
llvmlite = callPackage ../development/python-modules/llvmlite {