summary refs log tree commit diff
path: root/pkgs/tools/filesystems/go-mtpfs/default.nix
blob: f46dd74b2660d2c4514006ef9b297ead423d1e44 (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
{ stdenv, lib, pkgconfig, libusb1, buildGoPackage, fetchgit, fetchhg, fetchbzr, fetchsvn }:

buildGoPackage rec {
  name = "go-mtpfs-${version}";
  version = "20150917-${stdenv.lib.strings.substring 0 7 rev}";
  rev = "bc7c0f716e3b4ed5610069a55fc00828ebba890b";

  goPackagePath = "github.com/hanwen/go-mtpfs";

  nativeBuildInputs = [ pkgconfig ];
  buildInputs = [ libusb1 ];

  src = fetchgit {
    inherit rev;
    url = "https://github.com/hanwen/go-mtpfs";
    sha256 = "1jcqp9n8fd9psfsnhfj6w97yp0zmyxplsig8pyp2gqzh4lnb5fqm";
  };

  preFixup = stdenv.lib.optionalString stdenv.isDarwin ''
    install_name_tool -delete_rpath "$out/lib" $bin/bin/go-mtpfs
  '';

  goDeps = ./deps.nix;
}