| 7 Sep 2021 |
ilkecan | Regarding apps and defaultApp outputs; I was using them to specify the executable name. But after learning about meta.mainProgram, I can't see how they are useful now. Why would I want to create them? | 20:38:47 |
ilkecan | * Regarding apps and defaultApp outputs; I was using them to specify the executable name. But after learning about meta.mainProgram, I can't see how they are useful now. Why would I want to create them? https://nixos.org/manual/nixpkgs/unstable/#var-meta-mainProgram | 20:42:11 |
ilkecan | Only reason I can think of is that I have packages.foo and I want to do nix run '.#bar' rather than nix run '.#foo' | 20:44:21 |
| 8 Sep 2021 |
| mbprtpmnr joined the room. | 13:49:42 |
| 9 Sep 2021 |
colemickens 🏳️🌈 | I seem to have done it again, I have an environemtn where I supposedly have unstable nix, but supposedly "print-dev-env" isn't a command? | 17:46:16 |
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 |