tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
apfs-fuse: add darwin support
Weijia Wang
2 years ago
670fc549
4f9626b6
+17
-3
1 changed file
expand all
collapse all
unified
split
pkgs
tools
filesystems
apfs-fuse
default.nix
+17
-3
pkgs/tools/filesystems/apfs-fuse/default.nix
···
1
1
-
{ lib, stdenv, fetchFromGitHub, fuse3, bzip2, zlib, attr, cmake }:
1
1
+
{ lib, stdenv, fetchFromGitHub, fuse, fuse3, bzip2, zlib, attr, cmake }:
2
2
3
3
stdenv.mkDerivation {
4
4
pname = "apfs-fuse-unstable";
···
12
12
fetchSubmodules = true;
13
13
};
14
14
15
15
-
buildInputs = [ fuse3 bzip2 zlib attr ];
15
15
+
postPatch = lib.optionalString stdenv.isDarwin ''
16
16
+
substituteInPlace CMakeLists.txt \
17
17
+
--replace "/usr/local/lib/libosxfuse.dylib" "fuse"
18
18
+
'';
19
19
+
16
20
nativeBuildInputs = [ cmake ];
17
21
22
22
+
buildInputs = [
23
23
+
(if stdenv.isDarwin then fuse else fuse3)
24
24
+
bzip2
25
25
+
zlib
26
26
+
] ++ lib.optional stdenv.isLinux attr;
27
27
+
28
28
+
cmakeFlags = lib.optional stdenv.isDarwin "-DUSE_FUSE3=OFF";
29
29
+
30
30
+
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-DUSE_FUSE2";
31
31
+
18
32
postFixup = ''
19
33
ln -s $out/bin/apfs-fuse $out/bin/mount.fuse.apfs-fuse
20
34
'';
···
24
38
description = "FUSE driver for APFS (Apple File System)";
25
39
license = licenses.gpl2Plus;
26
40
maintainers = with maintainers; [ ealasu ];
27
27
-
platforms = platforms.linux;
41
41
+
platforms = platforms.unix;
28
42
};
29
43
30
44
}