!djTaTBQyWEPRQxrPTb:nixos.org

Nixpkgs Architecture Team

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

Load older messages


SenderMessageTime
11 Jul 2023
@nbp:mozilla.orgnbp

adisbladis: I had not thought of using the final as the source for the input, but S.O.S. is kind of layed out this way. With the same disadvantage that the update operator is becoming overwhelmingly present. I think this is part of the solution, except that as mkDerivation is still present. Thus you still need overrideAttrs to modify its argument.

To which the solution is simply to let people override whatever they want before applying mkDerivation at the very last moment.

09:38:13
@nbp:mozilla.orgnbp The idea of S.O.S. is that derivations are available only through final / self, and prev / super provides the recipes. 09:38:54
@nbp:mozilla.orgnbp You want to override anything, use prev. You want to use a program, then use final.
I warned people that I would be happy to break their code if they do not follow the rule.
09:40:15
@piegames:matrix.org@piegames:matrix.org Speaking of mkPackage, a lot of the problems that package modules attempt to solve are actually mkDerivation problems, and I'd like to see them solved first separately 09:56:35
@piegames:matrix.org@piegames:matrix.org Passing random shit as attribute set down through a chain of function calls should be an anti pattern. builtins.removeAttrs should not exist 09:57:32
@k900:conduit.0upti.meK900 (deprecated)removeAttrs is useful in other contexts10:00:19
@k900:conduit.0upti.meK900 (deprecated)But I agree with the core of the argument10:00:29
@piegames:matrix.org@piegames:matrix.org
In reply to @k900:conduit.0upti.me
removeAttrs is useful in other contexts
Agreed
10:05:34
@profpatsch:augsburg.oneprofpatschroberthensing: I don’t think it’s any question10:32:28
@profpatsch:augsburg.oneprofpatschnixos as-is is way to slow already10:32:35
@profpatsch:augsburg.oneprofpatschand that’s only a couple hundred modules10:32:45
@piegames:matrix.org@piegames:matrix.orgWait, would be the goal to have one shared global module system for packages? o.O10:38:44
@piegames:matrix.org@piegames:matrix.orgI thought the idea was to have local module system instances for individual packages or groups thereof10:39:01
@profpatsch:augsburg.oneprofpatschthat sounds … even worse?11:12:29
@piegames:matrix.org@piegames:matrix.orgI don't know11:16:56
@piegames:matrix.org@piegames:matrix.org IMO we should rewrite all builders so that there is exactly only one override function (or maybe two for now). Because I'm pretty sure this should be possible 11:18:56
@toonn:matrix.orgtoonn Has any profiling been done? I'd be interested to see which parts of Nixpkgs a typical system build spends most time in. 11:20:30
@raitobezarius:matrix.orgraitobezarius
In reply to @profpatsch:augsburg.one
roberthensing: I don’t think it’s any question
I think you are forgetting you are discussing this with the person who works actively on NixOS modules and has ideas to make it fast…
11:31:33
@profpatsch:augsburg.oneprofpatschraitobezarius: It’s fundamentally impossible to make it fast as far as I understand, but I’d love if it were otherwise12:27:34
@profpatsch:augsburg.oneprofpatsch If you can get it to work without having to strictly evaluate all options first, then you might be able to 12:28:15
@profpatsch:augsburg.oneprofpatschbut then you have something that’s not the nixos module system anymore, because the semantics is different12:28:36
@nbp:mozilla.orgnbpIt would be possible to make NixOS module use less memory and potentially be faster … by implementing it in C++. But one must understand that the module system, while not evolving frequently is still evolving. And from my point of view, of someone who never managed to get anything large accepted in Nix source code, this is a not an option.12:30:54
@infinisil:matrix.orginfinisilIt could be implemented as a Nix plugin12:31:50
@nbp:mozilla.orgnbpNot mentioning the fact that evolution would be restricted to evolution of the Nix binary.12:31:54
@nbp:mozilla.orgnbpCan Nix plugin extend the grammar, to experiment new syntax / primitive?12:34:01
@piegames:matrix.org@piegames:matrix.org
In reply to @infinisil:matrix.org
It could be implemented as a Nix plugin
Are these a thing already? What can they do?
12:42:09
@piegames:matrix.org@piegames:matrix.org
In reply to @nbp:mozilla.org
Can Nix plugin extend the grammar, to experiment new syntax / primitive?
Simply being able to efficiently implement external functions exposed in Nix would probably be sufficient
12:42:47
* @piegames:matrix.org@piegames:matrix.org dreams of a WASM interface to Nix, to be able to implement complex functions efficiently in other languages, without being tied to the Nix code base12:43:36
@nbp:mozilla.orgnbpthe reason I am asking is for S.O.S. implementation.12:43:38
@nbp:mozilla.orgnbp * the reason I am asking is for S.O.S. implementation draft. 12:43:59

Show newer messages


Back to Room ListRoom Version: 9