Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make cross compilation of Nix itself easy using default.nix #8561

Open
roberth opened this issue Jun 21, 2023 · 3 comments
Open

Make cross compilation of Nix itself easy using default.nix #8561

roberth opened this issue Jun 21, 2023 · 3 comments
Labels
good first issue Quick win for first-time contributors portability Supporting more platforms

Comments

@roberth
Copy link
Member

roberth commented Jun 21, 2023

We could make cross compilation a lot easier using default.nix, as it can take the systems as parameters

Originally posted by @roberth in #8556 (comment)

@roberth roberth added good first issue Quick win for first-time contributors portability Supporting more platforms labels Jun 21, 2023
roberth added a commit to hercules-ci/nix that referenced this issue Jun 22, 2023
…ir relation to Nix

We don't rely on this terminology a lot, but when we do, we should
refer to them through here because we need to add our own context.

This will be useful for our hacking documentation and our documentation
for [cross compiling nix] (TBD), but I haven't made any references to
these terms yet, because another PR is already touching the text.

[cross compiling nix]: NixOS#8561
@roberth roberth changed the title Make cross compilation easy using default.nix Make cross compilation of Nix itself easy using default.nix Jun 22, 2023
@roberth
Copy link
Member Author

roberth commented Jun 22, 2023

Either this, or we decide that we only want a flake and admit that flakes through the nix CLI are not particularly conducive to flexible cross compilation yet. In that case we should refer people to Nixpkgs which has established patterns and reasonable (?) documentation for doing cross compilation of all its packages including nix.

@Ericson2314
Copy link
Member

In #7876 I proposed that we have separate Nixpkgs-style default.nix for each constituent project (Nix itself, Perl bindings, etc.). I think that is good for this too.

@roberth
Copy link
Member Author

roberth commented Jun 23, 2023

The alternative is to expose a function on the flake, but that would implicitly be public, but also inconvenient to use and not an interface we'd want to keep. So yes, it would be nice to do #7876 first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Quick win for first-time contributors portability Supporting more platforms
Projects
None yet
Development

No branches or pull requests

2 participants