| 15 May 2024 |
@jade_:matrix.org |  Download holy trinity nix.png | 21:04:02 |
FireFly | I think the fact that people end up calling it "nixlang" or "nix DSL" or ... already makes the point very well how confusing it is :p | 21:04:36 |
FireFly | or indeed now using cppnix as shorthand for the implementation | 21:04:48 |
FireFly | (not to be confused with nix(1)/new CLI \o/) | 21:05:05 |
@jade_:matrix.org | the impl being named cppnix is our fault :P | 21:05:32 |
puck | CppNix being the canonical name for it is so great | 21:05:43 |
Qyriad | In reply to@firefly:raccoon.college I keep thinking that a lot of the key abstractions all come from pure nixlang implementations within nixpkgs (like representing the package set as a function-as-fixpoint, how overlays get implemented, scopes, mkDerivation etc) A lot of key abstractions also come from bash implementations within Nixpkgs | 21:05:46 |
Charles | In reply to @jade_:matrix.org nope, doesn't work, since you also need other args imo Out of curiosity, when you say other args, what exactly do you mean? Like, a specific set of other args, or any arbitrary args? | 21:05:57 |
@jade_:matrix.org | well and that is somewhat of the question, since you could conceivably either want to, say, replace the stdenv everywhere, or have different attrs for the stdenv depending on how you want to do things | 21:06:36 |
Qyriad | The three system doubles are not sufficient to describe a cross compilation environment | 21:06:37 |
FireFly | In reply to @jade_:matrix.org the impl being named cppnix is our fault :P I mean I'm glad we seem to have collectively settled on one name for it, just makes it easier to talk about in relation to other impls (or indeed other parts of nix) heh | 21:06:45 |
@jade_:matrix.org | but cross compilation is just a specific case of the general situation of "i want settings" | 21:07:06 |
@jade_:matrix.org | In reply to @qyriad:katesiria.org The three system doubles are not sufficient to describe a cross compilation environment yes, correct, since you can have different ABIs and many other things | 21:07:19 |
FireFly | Qyriad: yeah that's true, especially in mkDerivation I guess (or things like the trivial builders) | 21:07:24 |
Qyriad | In the repl go ahead and :p stdenv.hostPlatform. Basically anything in that might need to be set to something specific to sufficiently describe a cross environment | 21:07:35 |
mjm | this is a strength of the schemaless .nix files, it's as general as you can get | 21:07:41 |
Charles | In reply to @jade_:matrix.org but cross compilation is just a specific case of the general situation of "i want settings" Yeah | 21:07:57 |
Qyriad | If you want to really be able to cross compile something, you basically need to control the initial import nixpkgs { settings } settings | 21:08:43 |
Charles | I think part of the value of flake packages taking no arguments is that you know you'll get a cache hit/that that exact configuration is tested | 21:08:49 |
FireFly | every now and then I get the urge to try to write a mini nixlike (but I really don't think I'd be able to get far on such a project without putting it down and jumping to something else) | 21:09:03 |
Charles | So I think that cross compilation should be treated more specially than just being grouped with arbitrary settings | 21:09:18 |
puck | In reply to @firefly:raccoon.college every now and then I get the urge to try to write a mini nixlike (but I really don't think I'd be able to get far on such a project without putting it down and jumping to something else) i mean, doing the .drv bit is relatively easy to emulate | 21:09:25 |
FireFly | (not really a practical one, more just a sandbox for experimenting with things) | 21:09:26 |
FireFly | puck: ye fair | 21:09:55 |
Charles | In reply to @charles:computer.surgery So I think that cross compilation should be treated more specially than just being grouped with arbitrary settings But as has been pointed out, I suppose this may not be feasible in practice | 21:12:11 |
Qyriad | Honestly part of the problem is that Nix{,pkgs} is not actually that good at cross compilation in the first place, right now, so it's hard to even know what something like flakes would need to do to properly support it as it evolves | 21:13:15 |
@jade_:matrix.org | i also think that it might be reasonable to actually do something different than that, maybe expose sets of settings that are ci'd? | 21:14:16 |
@jade_:matrix.org | like, cross isn't special for "is it ci'd" | 21:14:33 |
Charles | Yeah | 21:14:58 |
mjm | yeah plenty of flakes support multiple systems but only have x86_64-linux cached | 21:15:05 |