Comments (7)
NIX_PROFILES actually is space-delimited, so that should be fine. (And ~/.nix-profile will only get created as-needed--that shouldn't be a problem, either.)
~ nix-shell
error: path '/Users/philipp/default.nix' does not exist
This indicates that nix is present on your PATH, now--so I think you're sorted. Either something you've tried changing, or perhaps restarting your shell, has fixed it. You should be able to confirm with nix-shell -p hello
or somesuch.
from nix.
Nix not being on PATH generally points to your shell init files either hard-setting a PATH that doesn't include Nix after Nix's shell hook ran (often from one of the user-specific init files in ~/), or perhaps having an early return condition in the relevant init file that is keeping the shell hook from running at all.
If env | grep NIX
shows a few variables, that's a good sign the shell hook is at least running and you can focus on looking for what might be overwriting PATH.
from nix.
@abathur thanks for your support, that's really odd I've checked all the possible dotfiles in my homedir such as
# ~ ls -a | grep ".zsh*"
.oh-my-zsh
.shell.pre-oh-my-zsh
.zsh_history
.zsh_sessions
.zshenv
.zshrc
Included a print
checking whether zshrc
is picking up nix-daemon.sh
(it does) and even sourced
the file manually after starting a shell - but with no effect.
And shell hook seems to be running indeed:
env | grep nix
NIX_PROFILES=/nix/var/nix/profiles/default /Users/philipp/.nix-profile
XDG_DATA_DIRS=/usr/local/share:/usr/share:/Users/philipp/.nix-profile/share:/nix/var/nix/profiles/default/share
NIX_SSL_CERT_FILE=/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt
# echo $PATH
/Users/philipp/.opam/default/bin:/usr/local/share:/usr/share:/Users/philipp/.nix-profile/share:/nix/var/nix/profiles/default/share:/nix/var/nix/profiles/default /Users/philipp/.nix-profile
Also tried this workaround
from nix.
# echo $PATH
/Users/philipp/.opam/default/bin:/usr/local/share:/usr/share:/Users/philipp/.nix-profile/share:/nix/var/nix/profiles/default/share:/nix/var/nix/profiles/default /Users/philipp/.nix-profile
The last separator in this PATH is a space instead of a semicolon; I guess it might be breaking the PATH search for both of the last two entries.
If PATH="/Users/philipp/.opam/default/bin:/usr/local/share:/usr/share:/Users/philipp/.nix-profile/share:/nix/var/nix/profiles/default/share:/nix/var/nix/profiles/default:/Users/philipp/.nix-profile" type nix-shell
finds the executable, then you'll need to figure out where/how the space is slipping in.
from nix.
@abathur sorry, this has been an c&p error, actually there's no whitespace - but see below, there's no Users/<myuser>/.nix-profile
directory existent.
env | grep nix
PATH=/Users/philipp/.opam/default/bin:/Users/philipp/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/Users/philipp/go/bin/tparse:/opt/homebrew/opt/llvm/bin:/opt/homebrew/opt/llvm/bin:/opt/homebrew/bin/python3:/opt/homebrew/Cellar/zplug/2.4.2/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/philipp/.cargo/bin
NIX_PROFILES=/nix/var/nix/profiles/default:/Users/philipp/.nix-profile
XDG_DATA_DIRS=/usr/local/share:/usr/share:/Users/philipp/.nix-profile/share:/nix/var/nix/profiles/default/share
NIX_SSL_CERT_FILE=/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt
~ nix-shell
error: path '/Users/philipp/default.nix' does not exist
from nix.
in nix-daemon.sh
its:
export NIX_PROFILES="/nix/var/nix/profiles/default $NIX_LINK"
aint it supposed to be:
export NIX_PROFILES="/nix/var/nix/profiles/default:$NIX_LINK"
from nix.
thanks a lot for your support, I ended up by just copying setting up/exporting the PATH
from nix-daemon.sh
directly into my zshrc
like this:
NIX_LINK=$HOME/.nix-profile
export NIX_PROFILES="/nix/var/nix/profiles/default:$NIX_LINK"
export XDG_DATA_DIRS="/usr/local/share:/usr/share:$NIX_LINK/share:/nix/var/nix/profiles/default/share"
export PATH="$NIX_LINK/bin:/nix/var/nix/profiles/default/bin:$PATH"
Still haven't been able to figure out why my PATH
haven't been set up correctly but at least it's working now
from nix.
Related Issues (20)
- `^..` installable syntax for retrieving "derivation of"
- `nix build` throws error `Assertion 'get() != pointer()' failed` on git dependency HOT 8
- Support pass SSH_AUTH_SOCK to nix-daemon from nix cli
- The sha256 results calculated by nix-prefetch-url and nix are inconsistent HOT 4
- `nix-env -qaP` is missing some packages on master HOT 5
- Sudo nixos-rebuild switch fails when config files moved to and back HOT 2
- Abort in debugger HOT 2
- Storedb interface / alternate store db backends HOT 2
- 'Administrative' shutdown of a Nix remote builder cause complete failure of any remote builds
- aarch64-darwin segfault trying to build system HOT 5
- nix lock can modify lock files in the nix store and corrupt it HOT 1
- Don't have root bypass the daemon by default HOT 4
- Add `target-store` and `eval-store` settings HOT 4
- Make the fetcher cache more reliable and easier to reason upon HOT 1
- 2.20.4 fails to build with Fedora: ‘typedef void traceable_allocator<void>::value_type’ is private within this context HOT 3
- nix < 2.20 failed to build with Fedora Rawhide: /usr/bin/ld: cannot open output file /usr/lib64/libnixutil.so: Permission denied HOT 11
- Test Nix using `nixos-unstable` on the CI
- Nix self update not possible on mac HOT 1
- Low default ulimit HOT 2
- Repl forgets it is not a debugger anymore when continued out of
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nix.