Skip to content

chore: adds nix and nixflakes environment #110

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

cristianoliveira
Copy link

Hello there 👋

While reviewing this PR: NixOS/nixpkgs#402453 I wanted to test some stuff and for that I added the nix development in the project :)

Once this is merged one can install it using

nix profile install 'github:opencode-ai/opencode'

@kujtimiihoxha
Copy link
Collaborator

@cristianoliveira thanks for the PR, I am zero familiar with nix 😓 so checking if @thdxr has any experience. One thing I noticed is that the version is hard coded to 0.0.34, we use the scripts/release to tag a release and than GH actions automatically release. I am wondering if there is a way to automate this here too.

@cristianoliveira
Copy link
Author

No worries! I just wanted to contribute back, since I'll be using the tool :D

Regarding the auto release, the challenge is that we need to regenerate the hashes based on a commit from the repo. So probably the way to go is that we can have a github action that automatically creates a PR with the new version and generates the hashes after a release. Does that make sense?

@kujtimiihoxha
Copy link
Collaborator

So what if we just push to main with the changes instead of a PR since it should not be able to break anything right?

@cristianoliveira
Copy link
Author

That also can work! Just a bit more YOLO hehe

Here how I do in my projects to generate hashes automatically: https://github.com/cristianoliveira/funzzy/blob/master/scripts/bump-nix-default

There might be a more elegant way to do it

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