Open shymega opened 2 months ago
NB: I'm happy to make a PR. The issue is reproducible with Himalaya as well.
The structure is not well documented yet, but the first level correspond to host platforms, the second the cross platforms. From x86_64-linux
, you can cross compile for x86_64-linux
, arm64-linux
and also x86_64-windows
. I like the structure, it took me a while to set it up correctly. It just needs to be better documented and fixed (somehow does not work properly since last upgrade).
Ah... I see. Okay. That makes sense. Maybe, just to make it clear for people, you could add - either a prefix or a suffix - -cross
.
That way it's obvious it's for cross-compiling. What are your thoughts on that?
It allows this kind of things in CI, which I find great and I would like to keep it. It makes builds more predictable and reproducible.
Agreed. Wouldn't a suffix/prefix be relatively easy to adjust in CI as well, though? I mean, it wouldn't be 'typical' user-facing, only for those like me who inspect the Flake, and even then, with documentation in the flake, it would be explained.
Maybe, just to make it clear for people, you could add - either a prefix or a suffix -
-cross
.
Yes indeed, I like the proposition!
Would you like me to make a PR?
Actually, I think it's best you do this. The Flake looks rather complex.
As you wish. It should not take long for me to fix it, I already put my nose in recently. Thank you for proposing, feel free to submit other PRs if you want!
I've been thinking about this some more.
I may be wrong, but I believe nix/nixpkgs does support system
attributes,
such as: x86_64-windows
, and aarch64-darwin
.
We could refactor the Flake here (and on the other projects) to export the nested attributes up a level. It should work with Nix, but you may want to check on the forums.
I think this would be simpler than the current approach and/or adding a
-cross
suffix.
I suppose the ultimate goal is to upstream to Nixpkgs, right?
Sorry, I realized I've never replied to you.
I think this would be simpler than the current approach and/or adding a
-cross
suffix.
Should be definitely enough, would you like to propose a PR?
I suppose the ultimate goal is to upstream to Nixpkgs, right?
It's already available on Nixpkgs, but with another derivation. The best would be to use the same between both, do you think it's doable?
The Flake is misleading. Packages should be
system
-specific, and not expose attrs of moresystem
s.Below is a screenshot. I would propose
arm64-linux
andx86_64-windows
to be moved up a level.