| 9 Sep 2021 |
colemickens 🏳️🌈 | The CLI didn't change again did it? I think there's something else super obvious that I'm missing for some reason | 17:46:30 |
colemickens 🏳️🌈 | It's from nix-direnv too, somehow it finds an old (Wrong) nix version to use :/ | 17:49:05 |
colemickens 🏳️🌈 | nix --version says 2.4pre... but when I run direnv allow I get an error from a nix-2.3 build :/ | 17:49:29 |
tomberek | colemickens 🏳️🌈: are you on home-manager and direnv is using legacy Nix in its PATH? | 17:57:29 |
colemickens 🏳️🌈 | Well, I'm not on HM, but these instructions are using nix-env | 18:06:57 |
colemickens 🏳️🌈 | I can just link you, https://github.com/colemickens/nixpkgs-wayland/blob/master/.gitpod.Dockerfile#L27 | 18:07:14 |
colemickens 🏳️🌈 | I'm just trying to get a flakey-nix-direnv-y gitpod setup going. | 18:07:26 |
colemickens 🏳️🌈 | Despite these commands, when I fire it up and hit direnv allow I get the behavior I described above (it does sorta look like direnv's using a bundlded nix?) | 18:07:59 |
colemickens 🏳️🌈 | but not sure what the fix is, I guess. When I skimmed nix-direnv's source, I thought it looked like it ought've been trying to use the newer nix from the nix-profile, but obviously not. | 18:08:30 |
colemickens 🏳️🌈 | (tbh I'm a bit curious if mic92 might read this and know off the top of his head, but they're not in here I guess) | 18:09:01 |
colemickens 🏳️🌈 | * (tbh I'm a bit curious if mic92 might read this and know off the top of their head, but they're not in here I guess) | 18:09:11 |
tomberek | ah, direnv is catching the gitpod variant of Nix | 18:09:17 |
tomberek | https://github.com/nix-community/nix-direnv/blob/master/direnvrc#L32 | 18:09:20 |
colemickens 🏳️🌈 | Except, /home/gitpod/.nix-profile/bin/nix-shell is the nix-shell | 18:10:12 |
tomberek | may need to source .bashrc prior to that call, or add the correct Nix beforehand | 18:10:16 |
colemickens 🏳️🌈 | and ~/.nix-profile/bin/nix is the newer one :P | 18:10:20 |
colemickens 🏳️🌈 | and I checked the nix profile sourcing is before the direnv/nix-direnv stuff :( | 18:10:38 |
colemickens 🏳️🌈 | or wait, I guess that is maybe only true after my shell has loaded more stuff | 18:11:02 |
colemickens 🏳️🌈 | I should debug a bit more. | 18:11:05 |
tomberek | it looks like a bashrc/PATH mixup or ordering issue | 18:12:05 |
colemickens 🏳️🌈 | you're certainly not wrong, the NIX_BIN_PATH is wrongly set there | 18:13:45 |
colemickens 🏳️🌈 | just... not sure why, I swear I source the nix-profile early-enough in bashrc. | 18:14:07 |
colemickens 🏳️🌈 | thanks for the nudge | 18:14:12 |
tomberek | perhaps add a echo $PATH, command -v nix and command -v nix-shell just prior to that line in the Dockerfile? | 18:15:08 |
colemickens 🏳️🌈 | (like I call nix --version RIGHT BEFORE the direnv stuff in bashrc and it prints 2.4pre...) | 18:15:19 |
colemickens 🏳️🌈 | Come to think it, I'm running the unstable installer... | 18:15:46 |
colemickens 🏳️🌈 | doesn't that mean the only explanation is that direnv IS directly linking to its nix? | 18:16:03 |
colemickens 🏳️🌈 | I think I have to set NIX_BIN_PREFIX myself? | 18:16:08 |
tomberek | gitpod's bash may have "hash" enabled? | 18:16:25 |
tomberek | (bypassing PATH for recently used commands) | 18:17:01 |