Add Nix flake development shell#14562
Conversation
b7d58a1 to
16e746c
Compare
|
Is there a was with an additional nix_buildenv.sh to match the guide in the readme? |
Are you refering to the |
|
I meant the instructions for all other targets.
Can we do this with nix as well? |
|
Looks to me like the Nix works a bit different. You can declare all the required programs and libraries that you need for a specific project in a flake, like I have done here, and the you can run I don't think it makes sense to create a script that would essentially just run |
|
My Idea was to just keep the Linux description in the readme generic as possible. |
|
Yea, I see the point. Just to be clear Nix is not a Linux distro, it is more like a package manager that is used on both Linux and Mac. Then there is NixOS which is a Linux distro that also uses Nix to configure the whole operating system. So I understand that it can be a bit confusing that the instructions in the Wiki are under "Compiling on Linux", but since the old instructions for the Do you think it would make more sense to add a separate "Compiling with Nix" like this: |
|
The new commit only installs the Qt6 libraries that are needed for actually getting Mixxx to build. The |
|
qtkeychain-qt6-dev The wiki suggestion looks good. Unfortunately we had to make it read only. I can copy it into the wiki if you propose the required change here. How does a nix package compare to a flatpack or snap package? How does is compare to vs-code devcontainers #14018 |
|
qtkeychain is available in the Nix package manager. But I can't find packages corresponding to Figuring out how all the Qt libraries are packaged in the Nix package manager is too big of a task for me. Don't know about flatpack or snap. But looks like vs-code devcontainers create a docker image and runs everything in there. |
|
Just noticed that there is a problem when the commit hook tries to run clang-format. That definately needs a fix. |
|
Maybe they are already integrated? I don't think you will be able to compile not run Mixxx without. So if you can anyway, it confirms that they are not extra in nix. |
|
Yea, I just confirmed that Can you guide me on how to check if QtKeychain is working? |
|
If you find the QtKeychain SO file in the CMakeCache.txt it works. You need to delete that file first, that cmake looks it up again. |
|
I don't see an so file but it looks like it is using QtKeychain as well From CMakeCache.txt: |
7d09521 to
c4c9d26
Compare
|
I now tested the flake on a fresh NixOS and Ubuntu system, and it successfully runs the I also updated the changes to the Wiki, explaining how to get the |
|
having a nix flake would be quite nice. I wanted to build the project from source on NixOS, which is quite hard without something like this PR. |
|
Thanks for the PR. One of the reasons for removing the nix files is that we cannot reasonably maintain it when no core team member uses nix. And if a contributor submits a PR witblh changes, we also cannot properly review/test them ourselves. Would it be possible to submit this to some Nix repo instead? For example, this looks like it might be a good fit: The then we may link to this repo from our docs/wiki, but the actual maintenance is done by the Nix community (who have the necessary expertise to maintain Nix package files - in contrast to the Mixxx team 🫣) What do you think? |
|
Perhaps, mixxx could make a repo under the GitHub org to host the files there? So that maintainership can be handled perhaps by @yen3k but it's still at least discoverable. The readme could have disclaimers that this is not officially endorsed and is community maintained. The responsibility of mixxx then just becomes one of delegating ownership. |
|
I even would volunteer to own it, as long as the SLA I am giving is:
|
|
@TheButlah Thank you for offering to take care for this. It looks like we have at least two contributors who are willing to maintain the file. The approach taken here is way more straight forward compared to the original nix file we have removed. If it breaks one day, it won't break anything else, so there is a low risk. I don't like the idea to maintain this file in another repository under mixxxdj, because that will increase the maintenance burden even more. |
I would have thought that something like the "NUR" would be more discoverable than a random repo in the mixxxdj org. But i'm not a Nix user, so this was just my assumption.
I think some Nix specific repo makes more sense than our tree, but if you think it makes more sense to merge it here, go ahead 🙂 |
|
Ok, so let's merge it and hope it does not fall apart soon. |
|
@yen3k It looks like we have missed to ask you for permission to publish your work with Mixxx. |
|
Signed it as yen3k @daschuer |
|
Thank you |
I created a Nix flake that builds a development shell with all the tools nessecary to build Mixxx.
This is just a convenient way to create isolated environments for projects.
I also prepared changes for the "Compiling on Linux" section in the Wiki that updates the outdated Nix instructions.
I will post the wiki changes here