about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/mobile/adb-sync/default.nix
blob: 5c0f0c07c21414add8113a4f186d37d2bbd3bee5 (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
25
26
27
28
29
30
31
32
{ stdenv, fetchgit, python3, platform-tools, makeWrapper }:

stdenv.mkDerivation {
  pname = "adb-sync";
  version = "2016-08-31";

  src = fetchgit {
    url = "https://github.com/google/adb-sync";
    rev = "7fc48ad1e15129ebe34e9f89b04bfbb68ced144d";
    sha256 = "1y016bjky5sn58v91jyqfz7vw8qfqnfhb9s9jd32k8y29hy5vy4d";
  };

  buildInputs = [ python3 platform-tools makeWrapper ];

  phases = "installPhase";

  installPhase = ''
    mkdir -p $out/bin
    cp $src/adb-channel $src/adb-sync $out/bin/
    patchShebangs $out/bin
    wrapProgram $out/bin/adb-sync --suffix PATH : ${platform-tools}/bin
  '';

  meta = with stdenv.lib; {
    description = "A tool to synchronise files between a PC and an Android devices using ADB (Android Debug Bridge)";
    homepage = "https://github.com/google/adb-sync";
    license = licenses.asl20;
    platforms = platforms.unix;
    hydraPlatforms = [];
    maintainers = with maintainers; [ scolobb ];
  };
}