2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, python3, platform-tools, makeWrapper
|
2020-06-18 07:06:33 +00:00
|
|
|
, socat, go-mtpfs, adbfs-rootless
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2020-06-18 07:06:33 +00:00
|
|
|
pname = "adb-sync-unstable";
|
|
|
|
version = "2019-01-01";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = "adb-sync";
|
|
|
|
rev = "fb7c549753de7a5579ed3400dd9f8ac71f7bf1b1";
|
|
|
|
sha256 = "1kfpdqs8lmnh144jcm1qmfnmigzrbrz5lvwvqqb7021b2jlf69cl";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ python3 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = let
|
2021-02-05 17:12:51 +00:00
|
|
|
dependencies = lib.makeBinPath [ platform-tools socat go-mtpfs adbfs-rootless ];
|
2020-06-18 07:06:33 +00:00
|
|
|
in ''
|
|
|
|
runHook preInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
mkdir -p $out/bin
|
2020-06-18 07:06:33 +00: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
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
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 = [];
|
2020-06-18 07:06:33 +00:00
|
|
|
maintainers = with maintainers; [ scolobb ma27 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|