2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, python3, platform-tools, makeWrapper
|
2020-06-10 00:15:56 +02:00
|
|
|
, socat, go-mtpfs, adbfs-rootless
|
|
|
|
}:
|
2016-08-07 13:25:41 +02:00
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
stdenv.mkDerivation {
|
2020-06-10 00:15:56 +02:00
|
|
|
pname = "adb-sync-unstable";
|
|
|
|
version = "2019-01-01";
|
2016-08-07 13:25:41 +02:00
|
|
|
|
2020-06-10 00:15:56 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = "adb-sync";
|
|
|
|
rev = "fb7c549753de7a5579ed3400dd9f8ac71f7bf1b1";
|
|
|
|
sha256 = "1kfpdqs8lmnh144jcm1qmfnmigzrbrz5lvwvqqb7021b2jlf69cl";
|
2016-08-07 13:25:41 +02:00
|
|
|
};
|
|
|
|
|
2020-06-10 00:15:56 +02:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ python3 ];
|
2016-08-07 13:25:41 +02:00
|
|
|
|
2020-06-10 00:15:56 +02:00
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = let
|
2021-01-17 18:28:51 +01:00
|
|
|
dependencies = lib.makeBinPath [ platform-tools socat go-mtpfs adbfs-rootless ];
|
2020-06-10 00:15:56 +02:00
|
|
|
in ''
|
|
|
|
runHook preInstall
|
2016-08-07 13:25:41 +02:00
|
|
|
|
|
|
|
mkdir -p $out/bin
|
2020-06-10 00:15:56 +02:00
|
|
|
cp adb-{sync,channel} $out/bin
|
|
|
|
|
|
|
|
wrapProgram $out/bin/adb-sync --suffix PATH : "${dependencies}"
|
|
|
|
wrapProgram $out/bin/adb-channel --suffix PATH : "${dependencies}"
|
|
|
|
|
|
|
|
runHook postInstall
|
2016-08-07 13:25:41 +02:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2016-08-07 13:25:41 +02:00
|
|
|
description = "A tool to synchronise files between a PC and an Android devices using ADB (Android Debug Bridge)";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/google/adb-sync";
|
2016-08-07 13:25:41 +02:00
|
|
|
license = licenses.asl20;
|
2016-09-06 23:43:10 +02:00
|
|
|
platforms = platforms.unix;
|
|
|
|
hydraPlatforms = [];
|
2020-06-10 00:15:56 +02:00
|
|
|
maintainers = with maintainers; [ scolobb ma27 ];
|
2016-08-07 13:25:41 +02:00
|
|
|
};
|
|
|
|
}
|