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

chore: add flake #102

Merged
merged 1 commit into from
Apr 30, 2024
Merged

chore: add flake #102

merged 1 commit into from
Apr 30, 2024

Conversation

adfaure
Copy link
Contributor

@adfaure adfaure commented Apr 24, 2024

PR: Add Flake for Development Environment in NixOS

Description

This PR introduces a flake to facilitate development within a NixOS environment.

To utilize this enhancement, ensure you have Nix installed with the flake feature enabled. Detailed instructions can be found here.

Once installed, navigate to the root of the project and execute nix develop. This command will drop you into a new shell equipped with the necessary Java dependency. I encountered no issues when following the command described in the contributing guide.

Additionally, this PR includes a modification to use gradle instead of gradlew in the build-images.sh script, as gradlew was not accessible in my path.

Copy link

netlify bot commented Apr 24, 2024

👷 Deploy request for merry-cranachan-ee7f1c pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit f0f92d0

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Congrats on making your first PR and thank you for contributing to TypeStream! 🎉 ❤️

We hope to see you in our discord community too!

@jevy jevy requested a review from lucapette April 24, 2024 09:57
@jevy
Copy link

jevy commented Apr 24, 2024

Works great on my machine:
swappy-20240424-055742

@lucapette What do you think? Only change is the gradlew in the build script but if we used this for building the images, the dependencies are already locked in flake.lock.
I can update the doc as an alternative way to getting started.

@adfaure
Copy link
Contributor Author

adfaure commented Apr 24, 2024

Hi, I just want to draw your attention to the fact that I think that your kotlin/java dependencies are not managed by nix with this approach.

This comment gives more context. The only locked dependencies are the gradle, and the jdk stated in targetPkgs.

@lucapette
Copy link
Contributor

@adfaure first of all, thank you for your work on this!

Second off, I can't comment on flake/nix as I don't actually know what they are.

As for the change in the script, I wouldn't want to do that as that's now how you'd want to use gradle in a project. The "gradle wrapper" (gradlew) is the best way to use gradle which is why it's checked in the repo.

I updated the script in #103 this morning so that the build images script uses the absolute path when calling gradle (basically removing the constraint that you have to run the build images script from the root of the repo).

@adfaure
Copy link
Contributor Author

adfaure commented Apr 27, 2024

@lucapette I understand, I removed the gradle changes in the build script. It still works with your new script.

@jevy could you confirm please?

Regards

@lucapette
Copy link
Contributor

@adfaure thank you very much for taking care of this. I will be adding notes about this in the docs after we merge

@lucapette lucapette merged commit 249ec7f into typestreamio:main Apr 30, 2024
3 checks 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.

None yet

3 participants