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

Add NixOS flake. #2139

Merged
merged 50 commits into from
Sep 23, 2023
Merged

Add NixOS flake. #2139

merged 50 commits into from
Sep 23, 2023

Conversation

Svenum
Copy link
Contributor

@Svenum Svenum commented Sep 18, 2023

This PR adds the ability to install solaar as a flake in NixOS bzw. with the Nix-Package-Manger. With this feature you can be on the latest stable or development version in NixOS without waiting to be merged into the default NixOS-Code base.

@pfps
Copy link
Collaborator

pfps commented Sep 22, 2023

This repository doesn't distribute files needed by packaging mechanisms. If you want to package Solaar you will have to set up something to add this information to the package area.

The Ubuntu packages are set up to do most of this automatically.

@Svenum
Copy link
Contributor Author

Svenum commented Sep 22, 2023

Sorry but nix flakes work like this. It pulls the git (normaly an extra branch with the stable Version ref) or the Sourcecode tar.gz file and reads the flake.nix. Maybe its possible to open a second repo for the nix flake. The source code doesnt need to be in it only needs the nix files. Maybe "pwr-solaar/solaar-flake"?

@pfps
Copy link
Collaborator

pfps commented Sep 22, 2023

It would be possible to set up a separate github repository for this purpose. The problem with putting it in the main Solaar repository is that it is a new thing to be maintained and I don't have any facility for testing whether it works.

@Svenum
Copy link
Contributor Author

Svenum commented Sep 22, 2023

A new repo would be fine for me.

@pfps
Copy link
Collaborator

pfps commented Sep 22, 2023

You should be able to do that yourself (once you have set up a GitHub account that can create and update repositories).

@Svenum
Copy link
Contributor Author

Svenum commented Sep 22, 2023

And how do I create such an account to create a repo in pwr-solaar? Or should I maintain it under Svenum?

@pfps
Copy link
Collaborator

pfps commented Sep 22, 2023

You can just use the fork of Solaar that you have already created. (It may be that you have set up everything needed to easily push to this repository - I had to do some extra stuff to control this repository but that may be part of setting up any repository now.)

@Svenum
Copy link
Contributor Author

Svenum commented Sep 22, 2023

So should I left my Nix things in my fork or should I contribute it to this repo? The only think needed to port to a Nix Flake is this flake.nix (Meta description of the Package), the flake.lock (state of thirdparty needed things) an the default.nix (the build instruction).
FIrst you said that I have to make my own repo and then you say I maybe have to set up a bit to contribute here. Sorry but I am a little confused 😓

@pfps
Copy link
Collaborator

pfps commented Sep 22, 2023

If all you want to do is to have something for Nix then you should be all set up - just use your repository as the source.

But you probably also want to grab new releases of Solaar so you should put yourself on the notification list for new releases. (It's somewhere on the release page for Solaar - I've never done it.)

And you may be contributing to the Solaar code itself if there are problems in Solaar itself that are discovered by using Nix. I think that you are fine there as well as you put together this PR.

Sorry I can't be fully helpful. I've done some of this several years ago but GitHub changes how things work on an irregular basis.

@Svenum
Copy link
Contributor Author

Svenum commented Sep 22, 2023

Updated My PR and only added link to my repo https://github.com/Svenum/Solaar-Flake

Copy link
Collaborator

@pfps pfps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good

@pfps pfps merged commit 902815e into pwr-Solaar:master Sep 23, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants