|
| 1 | +{ |
| 2 | + description = "Open Android Backup development environment"; |
| 3 | + |
| 4 | + inputs = { |
| 5 | + nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; |
| 6 | + flake-utils.url = "github:numtide/flake-utils"; |
| 7 | + }; |
| 8 | + |
| 9 | + outputs = { self, nixpkgs, flake-utils }: |
| 10 | + flake-utils.lib.eachDefaultSystem (system: |
| 11 | + let |
| 12 | + pkgs = nixpkgs.legacyPackages.${system}; |
| 13 | + in |
| 14 | + { |
| 15 | + devShells.default = pkgs.mkShell { |
| 16 | + buildInputs = with pkgs; [ |
| 17 | + # Core dependencies for open-android-backup |
| 18 | + p7zip # For compression/decompression |
| 19 | + android-tools # Provides adb |
| 20 | + curl # For downloading files |
| 21 | + newt # Provides whiptail for dialogs |
| 22 | + pv # Progress viewer |
| 23 | + bc # Calculator for shell scripts |
| 24 | + srm # Secure file deletion (replaces secure-delete) |
| 25 | + zenity # GUI dialogs |
| 26 | + gnutar # GNU tar |
| 27 | + coreutils # Essential utilities (ls, cp, mv, etc.) |
| 28 | + findutils # find, xargs, etc. |
| 29 | + dos2unix # Convert line endings |
| 30 | + |
| 31 | + # Additional useful tools |
| 32 | + bash # Ensure we have bash |
| 33 | + wget # Alternative to curl |
| 34 | + unzip # For extracting archives |
| 35 | + file # File type detection |
| 36 | + which # Locate commands |
| 37 | + |
| 38 | + # Development tools (optional but useful) |
| 39 | + git # Version control |
| 40 | + tree # Directory structure visualization |
| 41 | + ]; |
| 42 | + |
| 43 | + shellHook = '' |
| 44 | + echo "Open Android Backup Nix shell ready." |
| 45 | + echo "" |
| 46 | + echo "Usage:" |
| 47 | + echo " 1. Enable USB debugging on your Android device" |
| 48 | + echo " 2. Run: ./backup.sh" |
| 49 | + echo "" |
| 50 | + echo "For automation options and advanced usage, see README.md" |
| 51 | + ''; |
| 52 | + }; |
| 53 | + } |
| 54 | + ); |
| 55 | +} |
0 commit comments