StreetComplete icon indicating copy to clipboard operation
StreetComplete copied to clipboard

Add `nix` development environment

Open portothree opened this issue 3 years ago • 2 comments

Summary

  • Adds shell.nix with android and gradle related dependencies for development
  • Adds flake.nix to 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

portothree avatar Aug 25 '22 18:08 portothree

  1. https://github.com/ngi-nix/ngi/issues/18 is a dead link or to a private repository

  2. what is the benefit from this changes?

  3. How this PR can be tested?

  4. what will be needed to update this code?

matkoniecz avatar Aug 26 '22 06:08 matkoniecz

@portothree Ping :slightly_smiling_face:

FloEdelmann avatar Oct 04 '22 18:10 FloEdelmann

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.

portothree avatar Oct 04 '22 19:10 portothree

I am closing this because

  1. 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

  2. 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.

westnordost avatar Dec 03 '22 00:12 westnordost

I am closing this because

  1. 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
  2. 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.

portothree avatar Dec 03 '22 10:12 portothree