3 ms·
And now I’m trying to understand how devshells work in flakes and there’s pretty no doc
by baby 4y ago
And now I’m trying to understand how devshells work in flakes and there’s pretty no doc
- Smaug123 4y agoAsk your questions on discourse.nixos.org please - the documentation situation in Nix-land is generally exactly as you have noted, which means centralised question-asking in well-known locations is much much more helpful for Those Who Come After.
- benreesman 4y agoI say this with the utmost respect for those who work hard to answer questions on discourse, but I have found it singularly unhelpful. I strongly encourage the Nix community to embrace a mainstream Q&A platform like StackOverflow or GitHub Issues. Nix is “weird” enough for beginners already, the kind of janky interface and uneven moderation/quality on discourse is IMHO self-defeating for Nix.
- pxc 4y agoAside: I love the Discourse UI. It feels easy and thoroughly modern to me. What's janky about it, in your opinion?
- baby 4y agoAgree. I feel the same way about OCaml, and I have forced myself to ask every questions I have on SO to build the list of answers there. Yet, people tend to answer on SO with “you should ask on the OCaml discourse”…
- benreesman 4y agoSo a dev shell as consumed by a flake is typically just a derivation. And typically the most important thing in that derivation is ‘buildInputs’, which is just a list of ‘pkgs.thingIWant’. It’s not uncommon to hook other “phases” of the derivation, which are (oversimplified) just little shell scripts that run in some order (‘configurePhase’ before ‘installPhase’) and typically expressed using the nifty “” syntax. For example if Nix is like stuffing paths into a Makefile that you want to use in your dev shell, you might put that in installPhase. Protip: a Nix “package” (derivation) evaluated in a string context (foo = “${pkgs.gcc}”;) gives you a path to where the thing lives in /nix/store.