nix-community / nix-on-droid

Nix-enabled environment for your Android device. [maintainers=@t184256,@Gerschtli]
https://nix-on-droid.unboiled.info
MIT License
1.16k stars 65 forks source link

error: file 'nixpkgs' was not found in the Nix search path #239

Closed Munksgaard closed 1 year ago

Munksgaard commented 1 year ago

On a fresh installation of nix-on-droid I get the following error when trying to install any package.

bash-5.1$ nix-shell -p gnutar
warning: Nix search path entry '/data/data/com.termux.nix/files/home/.nix-defexpr/channels/nixpkgs/' does not exist, ignoring
error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)

       at «string»:1:25:

            1| {...}@args: with import <nixpkgs> args; (pkgs.runCommandCC or pkgs.runCommand) "shell" { buildInputs = [ (gnutar) ]; } ""
             |                         ^
(use '--show-trace' to show detailed location information)

I'm running on a Samsung Galaxy Tab S8.

Gerschtli commented 1 year ago

Which bootstrap url did you use? Did you choose flake setup instead of channel setup?

Can you show the outputs of

nix-channel --list
echo $NIX_PATH
t184256 commented 1 year ago

If you've used a flake bootstrap, you're after something like nix shell nixpkgs/release-22.11#gnutar.

Munksgaard commented 1 year ago

If you've used a flake bootstrap, you're after something like nix shell nixpkgs/release-22.11#gnutar.

Aha, that works! I didn't know that the two setups were mutually exclusive.