How to release package for multiple architectures #990
-
Hello everyone, I am creating some nix-package out of python packages using dream2nix, which works like a charm. Thanks a lot. Now my problem is, that I need to install the nix-package at different architectures, not only I searched the repo here, but could not find an answer. I hope it was not just my stupidity to not find it. Can anyone give a hint how to allow building on multiple platforms? This is my current flake.nix, just like in the example:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
I have the same problem. I want my package to run on |
Beta Was this translation helpful? Give feedback.
-
Hello!
You can avoid hard-coding a single system by defining a helper function which iterates over a list of systems, as in this example: https://github.com/nix-systems/nix-systems?tab=readme-ov-file#basic-usage (the list could either come from nix-systems or just from your flake, i.e.
I think you didn't publish your package definitions here? You are probably using the
to your module. You'd still need to |
Beta Was this translation helpful? Give feedback.
my_package
was an example, you need to use the actual packages attribute name here.nixpkgs.lib.genAttrs above those lines, already creates an attribute set where the keys are the system. You
${system}
is where the packages attribute name should be, so your package is probably calledx86_64-linux
atm.e.g.
would maybe make the lock command above work.