Skip to content

tmcl/minimal-android-nix-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A minimal Android/Nix example

This draws entirely on the work of github.com/tadfisher, who basically did all the work and almost documented it. Consider this a tutorial in one way to use their stuff. Most significantly, I used tadfisher/android-nixpkgs and was guided by this gist.

This should be usable by:

  1. Checking it out.
  2. Producing the update-locks script
  3. Running the update-locks script in the android package
  4. Building it.
1% git checkout https://github.com/tmcl/minimal-android-example
2% nix-build -A updateLocks
3% cd ../android
3% ../nix/result/bin/update-locks
3% mv deps.json ../nix
3% cd ../nix
4% nix-build

But it isn't. Different compilations of the same maven packages that use the same name and version but have different SHA224 sums are uploaded to different repos. In order to get the same dependencies from update-locks and the nix script, you might need to reorder the repos in default.nix a few times (and use --keep-going). Eventually it will build.

I show my working in the history of this repo. This may be useful if you want help adding this to your own project.

About

If you want to see how to get a modern Android package to compile with nix, here you go.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published