Files
nixpkgs/pkgs/by-name/ap/apfs-fuse/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

56 lines
1.3 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
fuse,
fuse3,
bzip2,
zlib,
attr,
cmake,
}:
stdenv.mkDerivation {
pname = "apfs-fuse";
version = "0-unstable-2023-03-12";
src = fetchFromGitHub {
owner = "sgan81";
repo = "apfs-fuse";
rev = "66b86bd525e8cb90f9012543be89b1f092b75cf3";
hash = "sha256-uYAlqnQp0K880XEWuH1548DUA3ii53+hfsuh/T3Vwzg=";
fetchSubmodules = true;
};
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace CMakeLists.txt \
--replace "/usr/local/lib/libosxfuse.dylib" "fuse"
'';
nativeBuildInputs = [ cmake ];
buildInputs = [
(if stdenv.hostPlatform.isDarwin then fuse else fuse3)
bzip2
zlib
]
++ lib.optional stdenv.hostPlatform.isLinux attr;
cmakeFlags = lib.optional stdenv.hostPlatform.isDarwin "-DUSE_FUSE3=OFF";
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-DUSE_FUSE2";
postFixup = ''
ln -s $out/bin/apfs-fuse $out/bin/mount.fuse.apfs-fuse
'';
meta = with lib; {
homepage = "https://github.com/sgan81/apfs-fuse";
description = "FUSE driver for APFS (Apple File System)";
license = licenses.gpl2Plus;
mainProgram = "apfs-fuse";
maintainers = with maintainers; [ ealasu ];
platforms = platforms.unix;
};
}