!lymvtcwDJ7ZA9Npq:lix.systems

Lix Development

257 Members
(Technical) development of Lix, the package manager, a Nix implementation. Please be mindful of ongoing technical conversations in this channel.100 Servers

Load older messages


SenderMessageTime
20 Oct 2024
@ersei:ersei.netersei
In reply to @aloisw:kde.org
Well nix develop does set IN_NIX_SHELL.
but nix shell doesn't, unfortunately
18:32:36
@ersei:ersei.netersei
In reply to @9999years:matrix.org
also you should look up the --impure option instead of setting impure unconditionally probably, but maybe wait to see if people are like We Cannot Do THis first
I think it'll always be impure, no? since the system's path will be leaking into the environment
18:33:04
@ersei:ersei.netersei even in --ignore-environment, PATH will contain /run/current-system stuff 18:33:35
@ersei:ersei.neterseibut yeah it's up to the maintainers and what they think18:35:34
@ersei:ersei.neterseipersonally I think that it'll make behaviour more consistent18:35:49
@ersei:ersei.neterseiand I like having my custom prompt in fish know it's in a nix3 shell18:36:25
@ersei:ersei.netersei though if you look at the github issue linked to the PR (https://github.com/NixOS/nix/issues/3862), there is an argument to be made that nix shell does not warrant having IN_NIX_SHELL set 18:37:39
@ersei:ersei.netersei

https://github.com/NixOS/nix/issues/3862#issuecomment-918926654 specifically

Yeah, I think IN_NIX_SHELL should only be set in nix develop. nix shell only adds packages to $PATH so I don't think it really matches the expectations for IN_NIX_SHELL (which is that you're in a stdenv build environment).

18:37:55
@ersei:ersei.neterseiit is worth bringing up the purity concerns with building, since if there is an inconsistency, then there could be a source of variance18:40:15
@ersei:ersei.neterseibut I'm not familiar enough with the deterministic nature of nix builds to know if this will be an issue or not18:41:47
@aloisw:kde.orgaloisw None of the shells is really designed for purity (if you want that, use sandboxing), IN_NIX_SHELL also seems to be mostly for user convenience. 19:39:52
@esperlily:matrix.orgEsperLily [she/her]hey folks, i finally dealt with work restrictions and can now do maintenance work on Lix in my spare time. I'm getting ready now to submit my first changeset for a trivial issue, never used gerrit before, is there any established etiquette to this?19:53:06
@just1602:systemli.orgjust1602 EsperLily [she/her]: there's this page on the lix wiki that can probably answer a couple of your questions / interrogations: https://wiki.lix.systems/books/lix-contributors/page/gerrit 20:02:14
@esperlily:matrix.orgEsperLily [she/her]i read through that already and it talks about the mechanics of it, i just didn't know if there's any etiquette around e.g. grabbing an issue, or asking for review. that page also mentions topics but doesn't say if there's any expectation around how topics are used20:09:02
@esperlily:matrix.orgEsperLily [she/her] * i read through that already and it talks about the mechanics of it, i just didn't know if there's any etiquette around e.g. grabbing an issue, or asking for review. that page also mentions topics but doesn't say if there's any expectation around how topics are used (edit: just read gerrit documentation on topics, sounds like something i should probably ignore)20:12:33
@just1602:systemli.orgjust1602
In reply to @esperlily:matrix.org
i read through that already and it talks about the mechanics of it, i just didn't know if there's any etiquette around e.g. grabbing an issue, or asking for review. that page also mentions topics but doesn't say if there's any expectation around how topics are used
I only submit 2 CL and they were link to an issue, but I'm not a core dev at all, so I'll let other people answer since it's gonna be more useful to you.
20:12:49
@esperlily:matrix.orgEsperLily [she/her]ok i went ahead and submitted the changelist20:16:02
@benjamin:computer.surgerybenjamin
In reply to@ersei:ersei.net
what do y'all think about setting IN_NIX_SHELL in nix3? it's the same behaviour as nix2
I would like this a lot as a user. Currently I'm working around the absence of an IN_NIX_SHELL-equivalent by looking for nix store paths in PATH to set my shell prompt
21:09:24
@benjamin:computer.surgerybenjaminhttps://github.com/NixOS/nix/issues/6677 <- issue I opened about this back in 202221:10:18
@esperlily:matrix.orgEsperLily [she/her] I have SHLVL in my prompt and that's my normal cue for being in a nix shell. Having some env var might be nice, though i'm a little concerned about reusing IN_NIX_SHELL as that currently implies a much larger change to the shell environment than just some PATH additions 22:00:54
@esperlily:matrix.orgEsperLily [she/her] i'm looking at the auto-optimize-store darwin bug and reading through the optimize-store code i'm slightly concerned about the possibility of TOCTTOU here. Can multiple calls to LocalStore::optimisePath_ ever occur concurrently (whether it's different processes or different threads in the same process)? There's a minor TOCTTOU bug here though the conditions for triggering it are likely hard (though possibly also triggerable if a GC is occurring at the same time, i'm not sure how GC interacts with optimize store yet) 22:45:00
21 Oct 2024
@benjamin:computer.surgerybenjamin
In reply to@esperlily:matrix.org
I have SHLVL in my prompt and that's my normal cue for being in a nix shell. Having some env var might be nice, though i'm a little concerned about reusing IN_NIX_SHELL as that currently implies a much larger change to the shell environment than just some PATH additions
yeah, IN_NIX3_SHELL or something might be better?
02:31:30
@linus:schreibt.jetztLinux Hackerman jade_: I applied your suggestions in https://gerrit.lix.systems/c/lix/+/2057 -- anything else to do? And is it appropriate for me to ping you here if I'm not sure about the status? :) 11:46:08
@kfears:matrix.orgKFears (tragedy arc) I can't figure out the "functional" tests (the ones that are a Bash script) at all. Locally, I get a failure for nix profile something. Remotely, functional-nix-shell fails (and it's the one that's actually supposed to fail). How do I actually run those tests correctly in the local environment? I really want to look at the detailed logs that CI won't show me :( 13:28:46
@piegames:flausch.socialpiegamesDirenv allow and just test functional-lang should suffice13:39:36
@kfears:matrix.orgKFears (tragedy arc) I think just test functional-lang literally runs "functional-lang" test 13:48:19
@kfears:matrix.orgKFears (tragedy arc) And just test fails the wrong test but succeeds the one that actually fails 13:48:49
@piegames:flausch.socialpiegames
In reply to @kfears:matrix.org
I think just test functional-lang literally runs "functional-lang" test
Yes, insert you test name here
13:52:15
@piegames:flausch.socialpiegames
In reply to @kfears:matrix.org
And just test fails the wrong test but succeeds the one that actually fails
Try doing a clean build. Sometimes stuff is a bit impure, frustratingly
13:52:39
@kfears:matrix.orgKFears (tragedy arc)That seems to have helped13:57:27

Show newer messages


Back to Room ListRoom Version: 10