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

feat: add nix support(#80) #82

Merged
merged 4 commits into from
Mar 15, 2024
Merged

feat: add nix support(#80) #82

merged 4 commits into from
Mar 15, 2024

Conversation

ICE-GB
Copy link
Contributor

@ICE-GB ICE-GB commented Jan 26, 2024

Thanks to (#80) for the example, I did some nix related work, but I have no experience in doing that before this, this pr is still not perfect, I hope someone who is really familiar with nix and rust will help to improve it!

@ICE-GB
Copy link
Contributor Author

ICE-GB commented Jan 26, 2024

Regarding CACHIX_AUTH_TOKEN, you need to register cachix, create a binary cache called lan-mouse, and create an auth token in the settings so that this workflow can upload built packages to https://lan-mouse.cachix.org/

@feschber
Copy link
Owner

I will read up on nix packaging a bit. And the cachix token should probably be stored in a secret.

@feschber
Copy link
Owner

@ICE-GB @PedroHLC can you give me an update on this? Is this PR still relevant if its in the main nix repos?

Sorry I could not get back to this any sooner

@PedroHLC
Copy link

Hi @feschber, having a flake.nix is worth if the project has several pre-releases tags (we avoid those in nixpkgs) or has a very active development that we cannot follow because of the bureaucracy of reviewing and delays between Hydra deployment cycles. If you believe that's not the case, you can totally skip it (and close this).

Presently, with nix installed in any distro, one can run nix run nixpkgs#lan-mouse and use a pre-compiled lan-mouse v0.6.0. Meanwhile, with the flake.nix here, one can nix run 'github:feschber/lan-mouse, this will (1) fetch latest artifacts from cachix, (2) or if it is missing, automatically, clone the repo (in its latest commit), download all dependencies, build it, and run it. As long as the flake.nix's packages is up-to-date with the dependencies list.

@feschber
Copy link
Owner

@ICE-GB I dont have access to the settings for the cache. Can you give me the permissions to generate an access token?

@feschber feschber merged commit 8ff991a into feschber:main Mar 15, 2024
4 checks passed
feschber pushed a commit that referenced this pull request Mar 15, 2024
* feat: add nix support(#80)

* chore: nix flake update

* update actions
@ICE-GB
Copy link
Contributor Author

ICE-GB commented Mar 16, 2024

@ICE-GB I dont have access to the settings for the cache. Can you give me the permissions to generate an access token?

Please let me know your cachix account and I'll transfer the permissions to you

@feschber
Copy link
Owner

I signed up via GitHub so same email as on my profile.

@feschber
Copy link
Owner

If that does not work I will create an account

@ICE-GB
Copy link
Contributor Author

ICE-GB commented Mar 16, 2024

I signed up via GitHub so same email as on my profile.

Now you should have permission to try

@ICE-GB
Copy link
Contributor Author

ICE-GB commented Mar 16, 2024

And I'm trying to transfer the cache to you.

@feschber
Copy link
Owner

It still gives me a 401 on the settings page (https://app.cachix.org/cache/lan-mouse/settings/authtokens)

@ICE-GB
Copy link
Contributor Author

ICE-GB commented Mar 16, 2024

I just deleted it. You can create a new one.

@feschber
Copy link
Owner

Looks like it worked, I reran the build job

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.

3 participants