summary refs log tree commit diff
path: root/pkgs/tools/filesystems/jmtpfs/default.nix
blob: 8589abffc77dd9c91169c32309e7846c755dcee4 (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
{ lib, stdenv, fetchFromGitHub, fetchpatch, pkg-config, file, fuse, libmtp }:

let version = "0.5"; in
stdenv.mkDerivation {
  pname = "jmtpfs";
  inherit version;

  src = fetchFromGitHub {
    sha256 = "1pm68agkhrwgrplrfrnbwdcvx5lrivdmqw8pb5gdmm3xppnryji1";
    rev = "v${version}";
    repo = "jmtpfs";
    owner = "JasonFerrara";
  };

  patches = [
    # Fix Darwin build (https://github.com/JasonFerrara/jmtpfs/pull/12)
    (fetchpatch {
      url = "https://github.com/JasonFerrara/jmtpfs/commit/b89084303477d1bc4dc9a887ba9cdd75221f497d.patch";
      sha256 = "0s7x3jfk8i86rd5bwhj7mb1lffcdlpj9bd7b41s1768ady91rb29";
    })
  ];

  nativeBuildInputs = [ pkg-config ];
  buildInputs = [ file fuse libmtp ];

  meta = with lib; {
    description = "A FUSE filesystem for MTP devices like Android phones";
    homepage = "https://github.com/JasonFerrara/jmtpfs";
    license = licenses.gpl3Only;
    platforms = platforms.unix;
    maintainers = [ maintainers.coconnor ];
  };
}