1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 fuse,
6 macfuse-stubs,
7 pkg-config,
8 which,
9}:
10
11stdenv.mkDerivation (finalAttrs: {
12 pname = "ext4fuse";
13 version = "0.1.3";
14
15 src = fetchFromGitHub {
16 owner = "gerard";
17 repo = "ext4fuse";
18 rev = "v${finalAttrs.version}";
19 hash = "sha256-bsFo+aaeNceSme9WBUVg4zpE4DzlmLHv+esQIAlTGGU=";
20 };
21
22 nativeBuildInputs = [
23 pkg-config
24 which
25 ];
26
27 buildInputs = [ (if stdenv.hostPlatform.isDarwin then macfuse-stubs else fuse) ];
28
29 installPhase = ''
30 runHook preInstall
31
32 install -Dm555 ext4fuse $out/bin/ext4fuse
33
34 runHook postInstall
35 '';
36
37 meta = with lib; {
38 description = "EXT4 implementation for FUSE";
39 mainProgram = "ext4fuse";
40 homepage = "https://github.com/gerard/ext4fuse";
41 maintainers = with maintainers; [ felixalbrigtsen ];
42 platforms = platforms.unix;
43 license = licenses.gpl2Plus;
44 };
45})