nixpkgs-suyu/pkgs/tools/filesystems/apfs-fuse/default.nix
Daniel Gorin 5d7bcd5b13
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.
2020-10-09 09:55:56 -04:00

30 lines
810 B
Nix

{ stdenv, fetchFromGitHub, fuse3, bzip2, zlib, attr, cmake }:
stdenv.mkDerivation {
pname = "apfs-fuse-unstable";
version = "2019-07-23";
src = fetchFromGitHub {
owner = "sgan81";
repo = "apfs-fuse";
rev = "309ecb030f38edac4c10fa741a004c5eb7a23e15";
sha256 = "0wq6rlqi00m5dp5gbzy65i1plm40j6nsm7938zvfgx5laal4wzr2";
fetchSubmodules = true;
};
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)";
license = licenses.gpl2;
maintainers = with maintainers; [ ealasu ];
platforms = platforms.linux;
};
}