!9IQChSjwSHXPPWTa:lix.systems

Lix

1109 Members
Lix user channel. Feel free to discuss on-topic issues here and give each other help. For matrix.to links to the rest of the Lix channels, see: https://wiki.lix.systems/books/lix-organisation/page/matrix-rooms304 Servers

Load older messages


SenderMessageTime
3 Mar 2026
@k900:0upti.meK900It absolutely is12:29:50
@raitobezarius:matrix.orgraitobezariuslike nix develop12:29:53
@k900:0upti.meK900Yes12:30:01
@goldstein:tty5.devgoldstein I’m actually not sure how to reproduce nix shell with nix2 only 12:30:16
@raitobezarius:matrix.orgraitobezarius(but I'm not trying to be convinced, we are already aligned :D)12:30:19
@raitobezarius:matrix.orgraitobezariusnix-shell -A12:31:22
@goldstein:tty5.devgoldstein wait, really? wouldn’t nix-shell -A also enter a development environment? 12:31:56
@raitobezarius:matrix.orgraitobezarius nix-shell '<nixpkgs>' -A systemd will debug the systemd drv 12:32:20
@goldstein:tty5.devgoldstein

e.g. it runs hooks instead of just populating PATH

$ nix-shell -A hello '<nixpkgs>'
Using versionCheckHook
12:33:10
@raitobezarius:matrix.orgraitobezariussorry, i got shell and develop mixed as always12:33:39
@raitobezarius:matrix.orgraitobezariusnix-shell -p hello then12:33:44
@raitobezarius:matrix.orgraitobezariusthis will get you $PATH populated12:33:54
@goldstein:tty5.devgoldsteinyeah, but that only works for stuff from nixpkgs?12:34:01
@k900:0upti.meK900 -p also runs setup hooks 12:34:14
@goldstein:tty5.devgoldsteinif I want to populate PATH with a derivation from a file, I’m not sure how to do this with nix2 cli12:34:17
@k900:0upti.meK900 nix shell does not 12:34:17
@k900:0upti.meK900There is no direct equivalent12:34:21
@raitobezarius:matrix.orgraitobezarius`nix-shell -p '(import ./..)...' should work?12:34:26
@raitobezarius:matrix.orgraitobezarius * nix-shell -p '(import ./..)...' should work? 12:34:31
@raitobezarius:matrix.orgraitobezariusi mean, -p just wrap the thing in a mkShell call somewhat12:34:45
@goldstein:tty5.devgoldstein oh, that’s fun, manpage says that -p takes names from nixpkgs, but at the very top it actually lists {packages | expressions} 12:35:47
@goldstein:tty5.devgoldsteinI have a habit of ignoring the top part and just grepping for the option, so I’ve never seen that12:35:54
@emilazy:matrix.orgemily(fwiw I explained how to fix it when you were working on a CLI replacement I believe?)12:39:01
@sersorrel:matrix.orgsorrelmy hot take is that the ui of `nix-store -q` is garbage; I have to look up whether I want "references" or "requisites" or "referrers" or wtf else literally every single time I use it12:39:36
@weethet:catgirl.cloudWeetHetYeah but that required to change nixpkgs as far as I remember12:39:49
@emilazy:matrix.orgemilyyes, fixing layering violations requires sorting out the layers12:45:17
@raitobezarius:matrix.orgraitobezarius I'm curious, what's your idea emily to fix this? 12:57:38
@emilazy:matrix.orgemily I think run is the only sane primitive although mainProgram has its own issues 12:58:35
@emilazy:matrix.orgemilythe Bash stdenv logic should be in Nixpkgs itself and dev shells should be exposed as attrs hanging off derivations12:59:11
@emilazy:matrix.orgemily nix search/nix-env -q/recurseForDerivations are another thorn in my side but that's another matter 13:01:51

Show newer messages


Back to Room ListRoom Version: 10