Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

46 lines
983 B
Nix

{
lib,
stdenv,
fetchFromGitHub,
pkg-config,
fuse,
android-tools,
}:
stdenv.mkDerivation rec {
pname = "adbfs-rootless";
version = "0-unstable-2023-03-21";
src = fetchFromGitHub {
owner = "spion";
repo = "adbfs-rootless";
rev = "fd56381af4dc9ae2f09b904c295686871a46ed0f";
sha256 = "atiVjRfqvhTlm8Q+3iTNNPQiNkLIaHDLg5HZDJvpl2Q=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ fuse ];
postPatch = ''
# very ugly way of replacing the adb calls
substituteInPlace adbfs.cpp \
--replace '"adb ' '"${android-tools}/bin/adb '
'';
installPhase = ''
runHook preInstall
install -D adbfs $out/bin/adbfs
runHook postInstall
'';
meta = {
description = "Mount Android phones on Linux with adb, no root required";
mainProgram = "adbfs";
inherit (src.meta) homepage;
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ aleksana ];
platforms = lib.platforms.unix;
};
}