2017-06-29 07:44:43 +01:00
|
|
|
{ stdenv, fetchFromGitHub, fetchpatch, pkgconfig, fuse, adb }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "adbfs-rootless";
|
2017-06-29 07:44:43 +01:00
|
|
|
version = "2016-10-02";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "spion";
|
|
|
|
repo = "adbfs-rootless";
|
|
|
|
rev = "b58963430e40c9246710a16cec58e7ffc88baa48";
|
|
|
|
sha256 = "1kjibl86k6pf7vciwaaxwv5m4q28zdpd2g7yhp71av32jq6j3wm8";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
# https://github.com/spion/adbfs-rootless/issues/14
|
|
|
|
url = "https://github.com/kronenpj/adbfs-rootless/commit/35f87ce0a7aeddaaad118daed3022e01453b838d.patch";
|
|
|
|
sha256 = "1iigla74n3hphnyx9ffli9wqk7v71ylvsxama868czlg7851jqj9";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2017-09-05 22:26:13 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ fuse ];
|
2017-06-29 07:44:43 +01:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# very ugly way of replacing the adb calls
|
2018-12-05 19:59:39 +00:00
|
|
|
sed -e 's|"adb |"${adb}/bin/adb |g' \
|
2017-06-29 07:44:43 +01:00
|
|
|
-i adbfs.cpp
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -D adbfs $out/bin/adbfs
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Mount Android phones on Linux with adb, no root required";
|
|
|
|
inherit (src.meta) homepage;
|
|
|
|
license = licenses.bsd3;
|
2018-02-12 06:18:12 +00:00
|
|
|
maintainers = with maintainers; [ Profpatsch ];
|
2017-06-29 08:20:54 +01:00
|
|
|
platforms = platforms.linux;
|
2017-06-29 07:44:43 +01:00
|
|
|
};
|
|
|
|
}
|