mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-16 15:58:36 +00:00
Merge pull request #117360 from midchildan/feat/fuse/darwin
fuse: use macfuse-stubs instead on Darwin
This commit is contained in:
commit
fa9cd72c09
19
doc/builders/packages/fuse.section.md
Normal file
19
doc/builders/packages/fuse.section.md
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# FUSE {#sec-fuse}
|
||||||
|
|
||||||
|
Some packages rely on
|
||||||
|
[FUSE](https://www.kernel.org/doc/html/latest/filesystems/fuse.html) to provide
|
||||||
|
support for additional filesystems not supported by the kernel.
|
||||||
|
|
||||||
|
In general, FUSE software are primarily developed for Linux but many of them can
|
||||||
|
also run on macOS. Nixpkgs supports FUSE packages on macOS, but it requires
|
||||||
|
[macFUSE](https://osxfuse.github.io) to be installed outside of Nix. macFUSE
|
||||||
|
currently isn't packaged in Nixpkgs mainly because it includes a kernel
|
||||||
|
extension, which isn't supported by Nix outside of NixOS.
|
||||||
|
|
||||||
|
If a package fails to run on macOS with an error message similar to the
|
||||||
|
following, it's a likely sign that you need to have macFUSE installed.
|
||||||
|
|
||||||
|
dyld: Library not loaded: /usr/local/lib/libfuse.2.dylib
|
||||||
|
Referenced from: /nix/store/w8bi72bssv0bnxhwfw3xr1mvn7myf37x-sshfs-fuse-2.10/bin/sshfs
|
||||||
|
Reason: image not found
|
||||||
|
[1] 92299 abort /nix/store/w8bi72bssv0bnxhwfw3xr1mvn7myf37x-sshfs-fuse-2.10/bin/sshfs
|
|
@ -12,6 +12,7 @@
|
||||||
<xi:include href="emacs.section.xml" />
|
<xi:include href="emacs.section.xml" />
|
||||||
<xi:include href="firefox.section.xml" />
|
<xi:include href="firefox.section.xml" />
|
||||||
<xi:include href="fish.section.xml" />
|
<xi:include href="fish.section.xml" />
|
||||||
|
<xi:include href="fuse.section.xml" />
|
||||||
<xi:include href="ibus.section.xml" />
|
<xi:include href="ibus.section.xml" />
|
||||||
<xi:include href="kakoune.section.xml" />
|
<xi:include href="kakoune.section.xml" />
|
||||||
<xi:include href="linux.section.xml" />
|
<xi:include href="linux.section.xml" />
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ lib, stdenv, fetchPypi, fetchpatch, buildPythonPackage, pkg-config, pytest, fuse, attr, which
|
{ lib, stdenv, fetchPypi, fetchpatch, buildPythonPackage, pkg-config, pytest, fuse, attr, which
|
||||||
, contextlib2, macfuse-stubs, DiskArbitration
|
, contextlib2
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
|
@ -21,9 +21,7 @@ buildPythonPackage rec {
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config ];
|
nativeBuildInputs = [ pkg-config ];
|
||||||
|
|
||||||
buildInputs =
|
buildInputs = [ fuse ];
|
||||||
lib.optionals stdenv.isLinux [ fuse ]
|
|
||||||
++ lib.optionals stdenv.isDarwin [ DiskArbitration macfuse-stubs ];
|
|
||||||
|
|
||||||
checkInputs = [ pytest which ] ++
|
checkInputs = [ pytest which ] ++
|
||||||
lib.optionals stdenv.isLinux [ attr ];
|
lib.optionals stdenv.isLinux [ attr ];
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, stdenv, fetchurl, cpio, xar, undmg, libtapi }:
|
{ lib, stdenv, fetchurl, cpio, xar, undmg, libtapi, DiskArbitration }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "macfuse-stubs";
|
pname = "macfuse-stubs";
|
||||||
|
@ -10,6 +10,7 @@ stdenv.mkDerivation rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ cpio xar undmg libtapi ];
|
nativeBuildInputs = [ cpio xar undmg libtapi ];
|
||||||
|
propagatedBuildInputs = [ DiskArbitration ];
|
||||||
|
|
||||||
postUnpack = ''
|
postUnpack = ''
|
||||||
xar -xf 'Install macFUSE.pkg'
|
xar -xf 'Install macFUSE.pkg'
|
||||||
|
@ -40,6 +41,11 @@ stdenv.mkDerivation rec {
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://osxfuse.github.io";
|
homepage = "https://osxfuse.github.io";
|
||||||
description = "Build time stubs for FUSE on macOS";
|
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;
|
platforms = platforms.darwin;
|
||||||
maintainers = with maintainers; [ midchildan ];
|
maintainers = with maintainers; [ midchildan ];
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, stdenv, fetchurl, fuse, pkg-config, macfuse-stubs }:
|
{ lib, stdenv, fetchurl, fuse, pkg-config }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "1.15.1";
|
version = "1.15.1";
|
||||||
|
@ -10,9 +10,7 @@ stdenv.mkDerivation rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config ];
|
nativeBuildInputs = [ pkg-config ];
|
||||||
buildInputs = if stdenv.isDarwin
|
buildInputs = [ fuse ];
|
||||||
then [ macfuse-stubs ]
|
|
||||||
else [ fuse ];
|
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
ln -s $out/bin/bindfs $out/bin/mount.fuse.bindfs
|
ln -s $out/bin/bindfs $out/bin/mount.fuse.bindfs
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -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 {
|
stdenv.mkDerivation rec {
|
||||||
pname = "s3fs-fuse";
|
pname = "s3fs-fuse";
|
||||||
|
@ -11,9 +11,7 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "sha256-Agb0tq7B98Ioe0G/XEZCYcFQKnMuYXX9x0yg4Gvu3/k=";
|
sha256 = "sha256-Agb0tq7B98Ioe0G/XEZCYcFQKnMuYXX9x0yg4Gvu3/k=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ curl openssl libxml2 ]
|
buildInputs = [ curl openssl libxml2 fuse ];
|
||||||
++ lib.optionals stdenv.isLinux [ fuse ]
|
|
||||||
++ lib.optionals stdenv.isDarwin [ macfuse-stubs ];
|
|
||||||
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, cmake, fuse, macfuse-stubs }:
|
{ lib, stdenv, fetchFromGitHub, cmake, fuse }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "unionfs-fuse";
|
pname = "unionfs-fuse";
|
||||||
|
@ -21,11 +21,11 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
postPatch = lib.optionalString stdenv.isDarwin ''
|
postPatch = lib.optionalString stdenv.isDarwin ''
|
||||||
substituteInPlace CMakeLists.txt \
|
substituteInPlace CMakeLists.txt \
|
||||||
--replace '/usr/local/include/osxfuse/fuse' '${macfuse-stubs}/include/fuse'
|
--replace '/usr/local/include/osxfuse/fuse' '${fuse}/include/fuse'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ];
|
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
|
# Put the unionfs mount helper in place as mount.unionfs-fuse. This makes it
|
||||||
# possible to do:
|
# possible to do:
|
||||||
|
|
|
@ -19286,7 +19286,7 @@ in
|
||||||
fusePackages = dontRecurseIntoAttrs (callPackage ../os-specific/linux/fuse {
|
fusePackages = dontRecurseIntoAttrs (callPackage ../os-specific/linux/fuse {
|
||||||
util-linux = util-linuxMinimal;
|
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;
|
fuse3 = fusePackages.fuse_3;
|
||||||
fuse-common = hiPrio fusePackages.fuse_3.common;
|
fuse-common = hiPrio fusePackages.fuse_3.common;
|
||||||
|
|
||||||
|
@ -19425,6 +19425,7 @@ in
|
||||||
|
|
||||||
macfuse-stubs = callPackage ../os-specific/darwin/macfuse {
|
macfuse-stubs = callPackage ../os-specific/darwin/macfuse {
|
||||||
inherit (darwin) libtapi;
|
inherit (darwin) libtapi;
|
||||||
|
inherit (darwin.apple_sdk.frameworks) DiskArbitration;
|
||||||
};
|
};
|
||||||
|
|
||||||
osxsnarf = callPackage ../os-specific/darwin/osxsnarf { };
|
osxsnarf = callPackage ../os-specific/darwin/osxsnarf { };
|
||||||
|
|
|
@ -3974,7 +3974,6 @@ in {
|
||||||
|
|
||||||
llfuse = callPackage ../development/python-modules/llfuse {
|
llfuse = callPackage ../development/python-modules/llfuse {
|
||||||
inherit (pkgs) fuse;
|
inherit (pkgs) fuse;
|
||||||
inherit (pkgs.darwin.apple_sdk.frameworks) DiskArbitration;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
llvmlite = callPackage ../development/python-modules/llvmlite {
|
llvmlite = callPackage ../development/python-modules/llvmlite {
|
||||||
|
|
Loading…
Reference in a new issue