Nixpkgs Architecture Team | 230 Members | |
| https://github.com/nixpkgs-architecture, weekly public meetings on Wednesday 15:00-16:00 UTC at https://meet.jit.si/nixpkgs-architecture | 53 Servers |
| Sender | Message | Time |
|---|---|---|
| 13 Jul 2022 | ||
| 1 Benefits from lower fixed-cost overhead while 2 benefits from lower per-lookup overhead. | 11:32:36 | |
| I feel dumb suggesting this but how does it sound to have a folder for each letter of alphabeth and place projects depending on the letter they start with 😄 | 12:21:51 | |
| thats a 'fix' for github 1000 files limit | 12:22:14 | |
| Gytis Ivaskevicius: This was discussed a bunch if you scroll up :) | 12:22:33 | |
| ah great, at least im not the only one considering that 😄 | 12:22:59 | |
Another idea I played around with is to extend the notion of packages and their versions. One of the goals of it is to clean up handling of versions, aka getting rid of the python, python2, python27, ffmpeg, ffmpeg_full, etc. inconsistencies | 12:33:51 | |
Main idea is to allow each package name to be associated with arbitrarily many versions. The interface might look something like python (default), python.version "2", python.version "2.7", ffmpeg, ffmpeg.version "full" | 12:35:24 | |
In reply to @infinisil:matrix.orgMaybe I lack creativity but I think that would be a different project. For now they will just end up in python.nix, python2.nix... Those files could just be trivial import stubs. | 12:35:34 | |
| Well it is another idea, but it plays into the above ideas, let me explain a bit more | 12:36:19 | |
| As implied with the "full", this can go a bit further, versions don't need to be a single string, but it can be something more abstract. A version could be a combination of: Multiple forks of a project, multiple semantic versions, different variants and more | 12:38:01 | |
In reply to @kevincox:matrix.org Also for overrides I think we can probably handle this basically the same we do today in
That isn't the prettiest but allows us to do overrides and maintains the current API. Then I think we can probably clean it up as a separate effort if we wanted too. Unless I am also missing a way that merging both projects returns a better result here. | 12:38:22 | |
In reply to @infinisil:matrix.orgAt this point how is this different from regular package arguments that can be overridden? Sounds like you can have python.override { version = "2.7" } if we anted to. | 12:39:48 | |
In reply to @infinisil:matrix.org* At this point how is this different from regular package arguments that can be overridden? Sounds like you can have python.override { version = "2.7" } if we wanted to. | 12:39:52 | |
In reply to @infinisil:matrix.orgAnd if we go even further, this can solve the problem of multiple projects having the same name, or projects renaming themselves: If two projects have the same name, in this new model this can be modeled as two versions of the same package. So this means that when there's two projects with the same name, they would both be accessible under pkgs.someName, but you then have to explicitly choose a version (no default) | 12:40:43 | |
And when a project gets renamed, it can be represented under two names, pkgs.oldName and pkgs.newName, but underneath it can be the same thing, and share its name with other projects of the same name | 12:41:29 | |
| One question that raises is what does hydra build? Right now hydra builds basically anything with a name. If you force a version argument then hydra won't build anything. | 12:41:56 | |
| This then ties a bit more into the whole "automating attributes from the file structure" | 12:41:58 | |
| kevincox: That won't be a problem, what hydra builds can be changed, needs some new conventions for that | 12:42:51 | |
In reply to @kevincox:matrix.org(I like that idea btw) | 12:43:39 | |
| I feel like many people here are rediscovering that an attrset and a function are synonymous things :P | 12:44:40 | |
| Oh also, this whole versioning thing then also ties into distributing nixpkgs, because it could allow third-party repos to add to the supported versions in a composition-friendly way. It also ties into allowing users to select specific versions in a generic way | 12:45:06 | |
| profpatsch: Well, sometimes at least | 12:46:15 | |
In reply to @kevincox:matrix.orgThe idea would be to make it super easy to make multiple versions work. Something package authors won't have to think about unless they need it. With .override it would be a very manual process | 12:47:23 | |
| This goes into the direction of fundamentally defining what a "package" really is. With this idea it would be something along the lines of "A derivation with a name and a version", where the version expresses notions of variants, backwards compatibility, is constrainable, etc. | 12:49:47 | |
| While this is a different problem to solve, we need to make sure we aren't solving one problem and then realizing it prevents us from solving another problem | 12:53:29 | |
| With nixpkgs, so many things tie into each other it feels like | 12:53:57 | |
In reply to @profpatsch:augsburg.one
well they're a bit different | 13:20:53 | |
| they're different types on the surface, but in Nix in particular they're also fundamentally different, I think | 13:24:58 | |
| AFAICT, because attr names are evaluated eagerly, you can only have finitely many of them in a set | 13:25:27 | |
so you can not build an attrset that is equivalent to a: a + "world" or something | 13:26:08 | |