git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #26949 from Profpatsch/adbfs-rootless

adbfs-rootless: init at 2016-10-02

commite5eccf311fd5f7941b32864046505b14a7b48443 authorJörg Thalheim <Mic92@users.noreply.github.com> dateThu 29 Jun 2017, 08:22 (9 years ago) parent793620efa68544
2 files changed+45
pkgs/development/mobile/adbfs-rootless/default.nix+41 pkgs/top-level/all-packages.nix+4
pkgs/development/mobile/adbfs-rootless/default.nixnew file+41
@@ -0,0 +1,41 @@
1+{ stdenv, fetchFromGitHub, fetchpatch, pkgconfig, fuse, adb }:
2+
3+stdenv.mkDerivation rec {
4+ name = "adbfs-rootless-${version}";
5+ version = "2016-10-02";
6+
7+ src = fetchFromGitHub {
8+ owner = "spion";
9+ repo = "adbfs-rootless";
10+ rev = "b58963430e40c9246710a16cec58e7ffc88baa48";
11+ sha256 = "1kjibl86k6pf7vciwaaxwv5m4q28zdpd2g7yhp71av32jq6j3wm8";
12+ };
13+
14+ patches = [
15+ (fetchpatch {
16+ # https://github.com/spion/adbfs-rootless/issues/14
17+ url = "https://github.com/kronenpj/adbfs-rootless/commit/35f87ce0a7aeddaaad118daed3022e01453b838d.patch";
18+ sha256 = "1iigla74n3hphnyx9ffli9wqk7v71ylvsxama868czlg7851jqj9";
19+ })
20+ ];
21+
22+ buildInputs = [ fuse pkgconfig ];
23+
24+ postPatch = ''
25+ # very ugly way of replacing the adb calls
26+ sed -e 's|"adb |"${stdenv.lib.getBin adb}/bin/adb |g' \
27+ -i adbfs.cpp
28+ '';
29+
30+ installPhase = ''
31+ install -D adbfs $out/bin/adbfs
32+ '';
33+
34+ meta = with stdenv.lib; {
35+ description = "Mount Android phones on Linux with adb, no root required";
36+ inherit (src.meta) homepage;
37+ license = licenses.bsd3;
38+ maintainers = with maintainers; [ profpatsch ];
39+ platforms = platforms.linux;
40+ };
41+}
pkgs/top-level/all-packages.nix+4
@@ -579,6 +579,10 @@ with pkgs;
579579 pkgs_i686 = pkgsi686Linux;
580580 };
581581
582+ adbfs-rootless = callPackage ../development/mobile/adbfs-rootless {
583+ adb = androidenv.platformTools;
584+ };
585+
582586 adb-sync = callPackage ../development/mobile/adb-sync { };
583587
584588 androidenv = callPackage ../development/mobile/androidenv {