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

Flake improvements #477

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

alexanderkunz
Copy link
Contributor

These are several changes I had to do before being able to work on Orgzly, so hopefully this makes it easier for other contributors to start.

flake.nix

Luckily a flake.nix was available, which turned out to be working for me with a few tweaks. The first issue is the manually imported nixpkgs which I was unable to turn off the unfree package error for (Android SDK), without modifying the file. This is because the neccessary environment variable for this can only be passed in impure nix mode. However unfree packages can be easily enabled with a single line addition.
Further on, the nixgl dependency seems to as well require an impure build, and I could not make it work on my system. I removed the nixgl dependency from the build because I am not sure why it is neccessary in the first place. Please tell me if this is an issue.
Additionally, I updated the flake dependencies to a recent version using "nix flake update".
This all combined now allows me to run "nix develop" to get into a shell that can successfully run "./gradlew assembleDebug" to build the APK without issues, which is very convenient.

.envrc

This allows to automatically load the flake environment when you change into the project directory, additionally it has a nice integration with Emacs as well. When direnv is installed and activated in a shell, it will query for permission to load the environment. This can also be disabled. The only minor downside in this being included is if somebody else uses a custom .envrc for some reason and has to take care of not commiting changes, however this seems to be standard pratice. Let me know if this is a problem.

.gitignore

These additions were neccessary to keep a clean working directory after running the Gradle build.

Tagging @colonelpanic8 as the original author of the flake build that was added recently. Let me know if there is an issue! Thank you for adding the flake, as building Orgzly was much easier with it than last time I tried 👍

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.

1 participant