| 5 Sep 2023 |
figsoda | I will work on nix-init to support this, hopefully we should see a lot more in the near future | 19:18:49 |
K900 | wa | 19:19:22 |
K900 |  Download Masthead-Waluigi.17345b15.9afde10b.png | 19:19:34 |
figsoda |  Download image.png | 19:20:17 |
infinisil | In reply to @figsoda:matrix.org I will work on nix-init to support this, hopefully we should see a lot more in the near future Ah neat! Note that the folder structure should be treated as internal to Nixpkgs, there is no API guarantee that it will not change over time. Considering that, it would be great if we could figure out a proper API that Nixpkgs could expose for this. Maybe it should be as simple as pkgs.preferredDirectoryForPackage "foo" = ./pkgs/by-name/fo/foo | 19:22:47 |
@piegames:matrix.org | Also note that there will hopefully be multiple by-names in the future | 19:23:22 |
figsoda | my plan is to keep the latest stable release of nix-init compatible with nixpkgs master | 19:24:54 |
figsoda | and this should all be easy to opt out so the worst case isn't that bad | 19:25:36 |
infinisil | Well such an API will happen at some point anyways. It has many more applications. E.g. nix edit could also use it to figure out the file to edit without even having to evaluate anything (meaning it works even if there's a syntax error!) | 19:26:52 |
infinisil | And position information for packages in general can be known without much evaluation | 19:27:12 |
infinisil | But yeah so just be aware that it's all internal to Nixpkgs for now. Any tools built on top of a hardcoded pkgs/by-name will eventually break. | 19:28:24 |
infinisil | (maybe) | 19:37:36 |
| 6 Sep 2023 |
Robert Hensing (roberth) | In reply to @piegames:matrix.org Also note that there will hopefully be multiple by-names in the future Or we can upgrade it to top level so that everything about a package can be kept together, which is a nice DX upgrade. ie not just a package but also any modules, documentation, tests, etc. | 11:23:55 |
@piegames:matrix.org | In reply to @roberthensing:matrix.org Or we can upgrade it to top level so that everything about a package can be kept together, which is a nice DX upgrade. ie not just a package but also any modules, documentation, tests, etc. I was thinking more about package sets in their own name spaces | 11:29:28 |
j-k | is there any CI that ensures packages are in the right folders? e.g. he/bob/package.nix
also does the pname matter at all?
| 11:56:15 |
j-k | * is there any CI that ensures packages are in the right folders? e.g. he/bob/package.nix vs bo/bob/package.nix
also does the pname matter at all?
| 11:56:29 |
@piegames:matrix.org | Yes and no | 11:56:58 |
Robert Hensing (roberth) | In reply to @piegames:matrix.org I was thinking more about package sets in their own name spaces makes sense for say pythonPackages, though I'd omit the actual by-name from the path. Maybe add it to https://github.com/nixpkgs-architecture/issues/issues/21? | 12:00:06 |
infinisil | In reply to @j-k:matrix.org
is there any CI that ensures packages are in the right folders? e.g. he/bob/package.nix vs bo/bob/package.nix
also does the pname matter at all?
Just as piegames said :) See https://github.com/NixOS/nixpkgs/tree/master/pkgs/by-name#readme for more information | 12:02:10 |
Robert Hensing (roberth) | psa: infinisil has been plotting something | 12:04:28 |
infinisil | Hehe, I think I know what you mean but I'm not 100% certain :P | 12:06:00 |
Robert Hensing (roberth) | gotta create some hype for the presentation! | 12:07:50 |
Robert Hensing (roberth) | everyone better watch it | 12:08:09 |
davidak | is it intentional, that in this place it's called somePackage instead of some-package?
https://github.com/NixOS/nixpkgs/pull/237439/files#diff-a8563497765f3c15777f4e7ebdfa64a8d7ac5fa696f5e1b141bd38545d242a46R70
| 14:07:15 |
Robert Hensing (roberth) | the attribute name is derived from it, so it has to match that, not some other convention | 14:35:49 |
Robert Hensing (roberth) | I feel like this didn't receive much attention in our communications, or did we | 14:36:59 |
Robert Hensing (roberth) | perhaps also worth pointing out that we only require case preservation from the file system, not case sensitivity. We check for that in CI. | 14:38:43 |
infinisil | Oh but there is a mistake in the docs there. It should be some-package in all cases, thanks for the mention davidak | 16:59:39 |
infinisil | Will fix later | 16:59:43 |
infinisil | https://github.com/NixOS/nixpkgs/pull/253668 | 17:30:36 |