Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation on Docker image (derived from ubuntu:18.04) does not set NIX_PATH #59370

Closed
michaelochurch opened this issue Apr 12, 2019 · 4 comments

Comments

@michaelochurch
Copy link

Issue description

Version is 2.2.1. It's in a docker container derived from ubuntu:18.04.

I can't run a number of the nix-related calls (e.g. nix-env to install Obsidian's obelisk project) because $NIX_PATH is not properly set. I don't know what it's supposed to be set to, and I believe other things are not being properly set up by the installation script.

Steps to reproduce

Installation is from source, because other modes of installation ran in to the same problem. I run bootstrap.sh (even though I believe it's not needed), then ./configure, then make and make install.

Technical details

root@b99e6c4f2829:/nix-2.2.1# nix-shell -p nix-info --run "nix-info -m"
error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I), at (string):1:13
@FRidh
Copy link
Member

FRidh commented Apr 13, 2019

For issues with or questions about Nix, please go to the Nix issue tracker. This tracker is for the Nixpkgs package set.

@FRidh FRidh closed this as completed Apr 13, 2019
@Anton-Latukha
Copy link
Contributor

Anton-Latukha commented Apr 13, 2019

You need to source:

. nix-profile

At least.

See:
https://github.com/NixOS/nix/blob/master/scripts/nix-profile.sh.in

So much for Docker.

I covered some of Docker issues in https://youtu.be/hhgrCV_r7YE?t=7162.

It is a Nix installer thing, I'd had supported it, covered all these reports, if my PR of new installer was merged NixOS/nix#1565, I informed and met with people that I am doing the installer, they anyway not merged my work and created a couple of installers more, now there are number of installers inside, and by that blocked the merge and my work and my support pretty much.

I've made a report and even made a terraform testing setup (https://github.com/Anton-Latukha/nix-tests-terraform) to show that that installer works in 8 completely different Linux distributions in container restricted environment.

@Anton-Latukha
Copy link
Contributor

Anton-Latukha commented Apr 13, 2019

But you would need to do . nix-profile anyway. But it would say so to you.
Because I just improved the quality of the installer more and more until it become a rewrite. I not added very much functionality there beyond improving mush of it's robustness, for the purpose to be drop-in mergeable.

@Anton-Latukha
Copy link
Contributor

Anton-Latukha commented Apr 13, 2019

If you serious - you can patch upstream with my code.

Or look through the code of it to understand the install process and what you are having, inside it is very well structured and documented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants