2022-11-21 17:40:18 +00:00
|
|
|
{ lib, stdenv, buildGoModule, fetchFromGitHub, pkg-config, libusb1 }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
buildGoModule rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "go-mtpfs";
|
2022-05-18 14:49:53 +00:00
|
|
|
version = "1.0.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hanwen";
|
|
|
|
repo = "go-mtpfs";
|
2022-05-18 14:49:53 +00:00
|
|
|
rev = "v${version}";
|
2023-02-02 18:25:31 +00:00
|
|
|
hash = "sha256-HVfB8/MImgZZLx4tcrlYOfQjpAdHMHshEaSsd+n758w=";
|
2022-03-30 09:31:56 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
vendorHash = "sha256-OrAEvD2rF0Y0bvCD9TUv/E429lASsvC3uK3qNvbg734=";
|
2022-05-18 14:49:53 +00:00
|
|
|
|
|
|
|
ldflags = [ "-s" "-w" ];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ libusb1 ];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
checkFlags = [
|
2022-07-14 12:49:19 +00:00
|
|
|
# Only run tests under mtp/encoding_test.go
|
|
|
|
# Other tests require an Android deviced attached over USB.
|
2024-05-15 15:35:15 +00:00
|
|
|
"-run=Test(Encode|Decode|Variant)"
|
|
|
|
];
|
2022-05-18 14:49:53 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Simple FUSE filesystem for mounting Android devices as a MTP device";
|
2022-05-18 14:49:53 +00:00
|
|
|
homepage = "https://github.com/hanwen/go-mtpfs";
|
|
|
|
license = licenses.bsd3;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2024-09-26 11:04:55 +00:00
|
|
|
broken = stdenv.hostPlatform.isDarwin;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "go-mtpfs";
|
2022-05-18 14:49:53 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|