diff --git a/pkgs/tools/filesystems/go-mtpfs/default.nix b/pkgs/tools/filesystems/go-mtpfs/default.nix index 4bb2a3c24d5..260e6891f95 100644 --- a/pkgs/tools/filesystems/go-mtpfs/default.nix +++ b/pkgs/tools/filesystems/go-mtpfs/default.nix @@ -18,7 +18,11 @@ buildGoModule rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ libusb1 ]; - checkFlags = [ "-short" ]; + preCheck = '' + # Only run tests under mtp/encoding_test.go + # Other tests require an Android deviced attached over USB. + buildFlagsArray+=("-run" "Test(Encode|Decode|Variant).*") + ''; meta = with lib; { description = "A simple FUSE filesystem for mounting Android devices as a MTP device";