about summary refs log tree commit diff
path: root/pkgs/tools/filesystems/fuse-ext2/default.nix
blob: e608bc5a41db8612fa024aa4de5c244f6dc7781f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{ lib
, stdenv
, fetchFromGitHub
, autoreconfHook
, e2fsprogs
, fuse
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "fuse-ext2";
  version = "0.0.11";

  src = fetchFromGitHub {
    owner = "alperakcan";
    repo = "fuse-ext2";
    rev = "v${finalAttrs.version}";
    hash = "sha256-VQMftlnd6q1PdwhSIQwjffjnkhupY8MUc8E+p1tgvUM=";
  };

  patches = [
    # Remove references to paths outside the nix store
    ./remove-impure-paths.patch
    # Don't build macOS desktop installer
    ./darwin-no-installer.patch
  ];

  nativeBuildInputs = [
    autoreconfHook
  ];

  buildInputs = [
    e2fsprogs
    fuse
  ];

  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=incompatible-function-pointer-types";

  meta = with lib; {
    description = "FUSE module to mount ext2, ext3 and ext4 with read write support";
    homepage = "https://github.com/alperakcan/fuse-ext2";
    license = licenses.gpl2Plus;
    maintainers = with maintainers; [ emilytrau ];
    platforms = platforms.unix;
    mainProgram = "fuse-ext2";
  };
})