Add `nix` development environment
Summary
- Adds
shell.nixwith android and gradle related dependencies for development - Adds
flake.nixto define flake for make it easy to share and use the dev shell and emulator
Related NGI issue: https://github.com/ngi-nix/ngi/issues/18
-
https://github.com/ngi-nix/ngi/issues/18 is a dead link or to a private repository
-
what is the benefit from this changes?
-
How this PR can be tested?
-
what will be needed to update this code?
@portothree Ping :slightly_smiling_face:
Hey, my bad, I missed the last message.
In the last 3 months the NixOS Foundation was sponsoring a project called Summer of Nix, which group a bunch of people to package / contribute with Nix for NGI projects and StreetComplete was assigned to my team.
Given that it's a mobile application, the only contribution I could add was a development environment. It uses the Nix package manager to provide reproducibility version pinning, which I have used to spin up an android emulator and build the apk for the project. I thought it was worth opening a PR upstream but I totally forgot to include some context.
If you think this could actually benefit someone else, I'm happy to update the PR description with more details and also on the documentation / Readme.
I am closing this because
-
this is not useful for any project maintainer or developer. Hence, also no project member would (be able to) maintain this project setup or even confirm that/if this PR is correct. Furthermore, the repo you link is private, so we do not have any way to get ourselves informed even if we planned to merge and maintain this
-
In general, I find it not too meaningful to add the build information of an external build environment to each project that should be built with it because you don't "own" it. I.e. if something needs to be changed for one reason or another, you need to create another PR. It appears to me that it would make more sense to add and maintain the build information externally, i.e. in an own repo, just like F-Droid also does this.
I am closing this because
- this is not useful for any project maintainer or developer. Hence, also no project member would (be able to) maintain this project setup or even confirm that/if this PR is correct. Furthermore, the repo you link is private, so we do not have any way to get ourselves informed even if we planned to merge and maintain this
- In general, I find it not too meaningful to add the build information of an external build environment to each project that should be built with it because you don't "own" it. I.e. if something needs to be changed for one reason or another, you need to create another PR. It appears to me that it would make more sense to add and maintain the build information externally, i.e. in an own repo, just like F-Droid also does this.
Thanks, that makes sense. I created this PR mainly because some other people in my team was using Nix for the development environment as well and each had it's own fork, etc.