3 ms·
$ nix-shell -p android-tools [nix-shell:~]$ adb --version Android Debug Bridge version 1.0.41 Version 35.0.1-android-tools Installed as /nix/store/dxdygi06i
by exe34 2y ago
$ nix-shell -p android-tools
[nix-shell:~]$ adb --version
Android Debug Bridge version 1.0.41
Version 35.0.1-android-tools
Installed as /nix/store/dxdygi06ixq7y419hmc4skz4cdzbcnwf-
android-tools-35.0.1/bin/adb
Running on Linux 6.10.3 (x86_64)
- fallingsquirrel 2y agoSure, but it won't successfully connect to a real device unless you somehow know to also set `programs.adb.enable = true`.
- viraptor 2y agoThat's not nixos specific. You get special instructions for Ubuntu https://help.ubuntu.com/community/AndroidSDK https://help.ubuntu.com/community/AndroidSDK Arch https://wiki.archlinux.org/title/Android_Debug_Bridge https://wiki.archlinux.org/title/Android_Debug_Bridge Gentoo https://wiki.gentoo.org/wiki/Android/adb https://wiki.gentoo.org/wiki/Android/adb ... And the adb option is in the docs with a description of what to do https://nixos.org/manual/nixos/stable/options#opt-programs.adb.enable https://nixos.org/manual/nixos/stable/options#opt-programs.a...
- fallingsquirrel 2y agoYes, I know that and you know that. But GP wanted to install the package and move on with his life instead of debugging a connection that failed with no indication why on an unfamiliar OS. https://search.nixos.org/packages?channel=24.05&show=android-tools&from=0&size=50&sort=relevance&type=packages&query=android-tools https://search.nixos.org/packages?channel=24.05&show=android... > How to install android-tools? > environment.systemPackages = [ pkgs.android-tools ]; How was he supposed to know to ignore those instructions and go to a completely different set of docs and search for "programs.adb.enable"? Instead he gave up and switched to another distro where you install the package and it Just Works™. Even though NixOS's model is conceptually better, it loses out on tons of potential users because of usability problems like this. (I'm running NixOS btw)
- viraptor 2y agoSometimes you just need to put in some work and understand what you're doing. The author needed to search for "adb" in the docs, not the whole attribute path. With the errors, they could debug the issue like they would on any other system. But that search is for packages themselves and is correct - that's how you install it. It's not going to tell you about the configuration just like it doesn't for nginx, postgresql, or many other packages. Sometimes you "have to be this high to ride", or use a simpler system - but that comes with its own issues. (Although in this very specific example it could just to make life easier - I'll send a PR next week unless someone does it first)
- Arrowmaster 2y agoWhy is this extra completion acceptable? On Debian I install the package adb and get the udev rules with it. I just need to connect a device and run adb commands.
- exe34 2y agonixos is open source, I'm sure they'd welcome your proposed changes! they accept patches on GitHub.
- dqv 2y agoFor the same reason that people get used to quirks on Debian (or any other distro really) that then eventually get fixed. Nobody's perfect, you live and you learn it. I use Hannah Montanix btw https://youtube.com/watch?v=2DQla5j26Qc https://youtube.com/watch?v=2DQla5j26Qc
- viraptor 2y agoBecause nixos manages your system and nixpkgs only contains packages. Packages cannot do anything outside their installed location, so can't touch udev or groups to make the changes. There will be other apps split in the same way. The benefit is that just adding some package will never break your own configuration.
- lostmsu 2y ago