From 5d7bcd5b1350b0779563c4cbf8c7424b908a9529 Mon Sep 17 00:00:00 2001 From: Daniel Gorin Date: Fri, 9 Oct 2020 14:55:56 +0100 Subject: [PATCH] apfs-fuse: Let mount find apfs-fuse (#84997) We add a symlink `mount.fuse.apfs-fuse ~~> apfs-fuse`, so that we can specify `fuse.apfs-fuse` as `fsType` in `nixos` and have the device mounted. The current alternative is to specify: `fuse./run/current-system/sw/bin/apfs-fuse` as `fsType`. On other distros, using `fuse.apfs-fuse` should work since `mount.fuse` will just runs `apfs-fuse`, but on nixos the `PATH` of `mount.fuse` is restricted. The symlink makes it work directly, without having `mount.fuse` doing the dispatch. --- pkgs/tools/filesystems/apfs-fuse/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/tools/filesystems/apfs-fuse/default.nix b/pkgs/tools/filesystems/apfs-fuse/default.nix index 2c7b1c271569..32cde83d749a 100644 --- a/pkgs/tools/filesystems/apfs-fuse/default.nix +++ b/pkgs/tools/filesystems/apfs-fuse/default.nix @@ -15,6 +15,10 @@ stdenv.mkDerivation { buildInputs = [ fuse3 bzip2 zlib attr ]; nativeBuildInputs = [ cmake ]; + postFixup = '' + ln -s $out/bin/apfs-fuse $out/bin/mount.fuse.apfs-fuse + ''; + meta = with stdenv.lib; { homepage = "https://github.com/sgan81/apfs-fuse"; description = "FUSE driver for APFS (Apple File System)";