!djTaTBQyWEPRQxrPTb:nixos.org

Nixpkgs Architecture Team

229 Members
https://github.com/nixpkgs-architecture, weekly public meetings on Wednesday 15:00-16:00 UTC at https://meet.jit.si/nixpkgs-architecture53 Servers

Load older messages


SenderMessageTime
9 Jan 2024
@philiptaron:matrix.orgPhilip Taron (UTC-8)At work, we have a guideline against "big enums" of the sort that NixpkgsProblem is: we prefer the variant that encapsulates each one of the various "inner" arms as an actual struct or type in itself. The core reason is that this lets us implement and break apart those huge multi-concern files into smaller implementations. I'm definitely not fussed by NixpkgsProblem though.22:39:19
@infinisil:matrix.orginfinisil Philip Taron (UTC-8): Oh yeah, I think for now it's fine, but if the tool becomes e.g. more generic (handling all of Nixpkgs) or the much more complex, this could be revisited 22:41:17
@infinisil:matrix.orginfinisilEspecially if more people work on it at the same time22:41:32
@infinisil:matrix.orginfinisil * Philip Taron (UTC-8): Oh yeah, I think for now it's fine, but if the tool becomes e.g. more generic (handling all of Nixpkgs) or much more complex, this could be revisited 22:41:53
@philiptaron:matrix.orgPhilip Taron (UTC-8)As currently structured it's a recipe for merge conflicts, for sure.22:41:54
@philiptaron:matrix.orgPhilip Taron (UTC-8)See the Rust folks talking about this issue: https://github.com/rust-lang/lang-team/issues/122#issuecomment-96445976922:43:15
10 Jan 2024
@9999years:matrix.org9999years

Nix has a namespace problem.
Versions? They go in the name sometimes, like python2. Names aren't consistent everywhere, either. The name of a package in all-packages.nix might need to be different from the name in its own derivation source. Good luck finding it.

Not every package gets a global name, either. Some are moved into separate attributes sets. Some get both.

https://news.ycombinator.com/item?id=38933136

17:45:42
@9999years:matrix.org9999years ^^ i've long wished for a generated list of every 'public' nixpkgs attribute. it really sucks that there's no better way to find package names than reading the source or guessing and praying. the manual lists a few of the special cases like pythonPackages, but there's lots of stuff that's kinda weird and less documented than it should be (like is there a difference between python.pkgs and pythonPackages? no clue) 17:48:42
@k900:0upti.meK900search.nixos.org is that?17:49:39
@k900:0upti.meK900Except a few attrsets that are explicitly included17:49:46
@9999years:matrix.org9999years actually i just checked the manual and it does say that pythonPackages is an alias for python.pkgs (though it doesn't say how the python version for those sets is chosen/updated), but there's no way to get this information directly, especially in an editor -- you always have to switch to your browser and start searching 17:49:48
@9999years:matrix.org9999years
In reply to @k900:0upti.me
search.nixos.org is that?
ooh, forgot about that (it wasn't around when i picked up nix). it would be great to have that interface available in a text editor! is it possible to run the nixos search (options or packages) locally yet?
17:50:55
@k900:0upti.meK900Yes?17:52:12
@k900:0upti.meK900 nix search nixpkgs foo 17:52:15
@9999years:matrix.org9999years

not quite!

$ nix search nixpkgs haskellPackages
error: no results for the given search term(s)!
17:56:10
@k900:0upti.meK900It doesn't match attrset names17:57:03
@9999years:matrix.org9999yearsthat's... what i was asking for?17:57:13
@k900:0upti.meK900It matches paths that lead to derivations17:57:25
@9999years:matrix.org9999yearsthe attrset names are what i need to type when i write definitions, so that's not very useful in a lot of cases17:57:47
@k900:0upti.meK900I mean specifically package sets that are not packages17:58:18
@k900:0upti.meK900 Like haskellPackages 17:58:21
@9999years:matrix.org9999yearsyeah, i know. i'm saying that i need to be able to search for package sets as well as packages themselves17:58:44
@k900:0upti.meK900 If you e.g. nix search nixpkgs django, it'll show you python3Packages.django 17:58:50
@9999years:matrix.org9999years nix search nixpkgs turtle doesn't show me haskellPackages.turtle unfortunately... 17:59:49
@k900:0upti.meK900 It's possible haskellPackages is explicitly excluded 17:59:58
@k900:0upti.meK900I'm not sure18:00:01
@9999years:matrix.org9999years i think that's probably because haskellPackages is marked as dontRecurseIntoAttrs or whatever? but that sucks 18:00:05
@k900:0upti.meK900Yes18:00:15
@9999years:matrix.org9999yearslike, instead of nixpkgs choosing some package sets that are "worth searching", it would be nice if i could choose which package sets to search18:00:34
@9999years:matrix.org9999yearsit's just a bad user experience -- it's unreliable, so it's hard to trust and integrate into my workflow18:00:55

Show newer messages


Back to Room ListRoom Version: 9