summaryrefslogtreecommitdiffstats
path: root/pkgs/development/mobile
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2020-06-10 00:15:56 +0200
committerMaximilian Bosch <maximilian@mbosch.me>2020-06-10 01:40:29 +0200
commit4f67c0cc6c6e5e6d2a40a55a0f8465b1a567aab8 (patch)
treee3b91a7e33fc6635eeae40b87d9520316848a940 /pkgs/development/mobile
parent4fd9c8c33b436404614698e190ce7eb2c06abfa3 (diff)
adb-sync: 2016-08-31 -> 2019-01-01
Simple tool to synchronize a directory-tree between a local machine and an Android device using `adb` and `rsync`. Since this repo doesn't have any releases atm, I added the `-unstable` suffix to `pname`. Since 2016-08-31 the following things changed: https://github.com/google/adb-sync/compare/7fc48ad1e15129ebe34e9f89b04bfbb68ced144d...fb7c549753de7a5579ed3400dd9f8ac71f7bf1b1 Also applied the following changes to the derivation: * Removed the `phases` hack to enable important things like `fixupPhase` again (amongst other things this is needed for shebang-patching and reference-checks). * Fixed the wrapper to make sure that every binary needed by those scripts is available. * Added myself as additional maintainer.
Diffstat (limited to 'pkgs/development/mobile')
-rw-r--r--pkgs/development/mobile/adb-sync/default.nix39
1 files changed, 25 insertions, 14 deletions
diff --git a/pkgs/development/mobile/adb-sync/default.nix b/pkgs/development/mobile/adb-sync/default.nix
index 5c0f0c07c214..98f69ed88b16 100644
--- a/pkgs/development/mobile/adb-sync/default.nix
+++ b/pkgs/development/mobile/adb-sync/default.nix
@@ -1,24 +1,35 @@
-{ stdenv, fetchgit, python3, platform-tools, makeWrapper }:
+{ stdenv, fetchFromGitHub, python3, platform-tools, makeWrapper
+, socat, go-mtpfs, adbfs-rootless
+}:
stdenv.mkDerivation {
- pname = "adb-sync";
- version = "2016-08-31";
+ pname = "adb-sync-unstable";
+ version = "2019-01-01";
- src = fetchgit {
- url = "https://github.com/google/adb-sync";
- rev = "7fc48ad1e15129ebe34e9f89b04bfbb68ced144d";
- sha256 = "1y016bjky5sn58v91jyqfz7vw8qfqnfhb9s9jd32k8y29hy5vy4d";
+ src = fetchFromGitHub {
+ owner = "google";
+ repo = "adb-sync";
+ rev = "fb7c549753de7a5579ed3400dd9f8ac71f7bf1b1";
+ sha256 = "1kfpdqs8lmnh144jcm1qmfnmigzrbrz5lvwvqqb7021b2jlf69cl";
};
- buildInputs = [ python3 platform-tools makeWrapper ];
+ nativeBuildInputs = [ makeWrapper ];
+ buildInputs = [ python3 ];
- phases = "installPhase";
+ dontBuild = true;
+
+ installPhase = let
+ dependencies = stdenv.lib.makeBinPath [ platform-tools socat go-mtpfs adbfs-rootless ];
+ in ''
+ runHook preInstall
- 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
+ cp adb-{sync,channel} $out/bin
+
+ wrapProgram $out/bin/adb-sync --suffix PATH : "${dependencies}"
+ wrapProgram $out/bin/adb-channel --suffix PATH : "${dependencies}"
+
+ runHook postInstall
'';
meta = with stdenv.lib; {
@@ -27,6 +38,6 @@ stdenv.mkDerivation {
license = licenses.asl20;
platforms = platforms.unix;
hydraPlatforms = [];
- maintainers = with maintainers; [ scolobb ];
+ maintainers = with maintainers; [ scolobb ma27 ];
};
}