Skip to content
This repository has been archived by the owner on Mar 3, 2024. It is now read-only.

Archived: conversations has not been updated since 2021-08

Notifications You must be signed in to change notification settings

ngi-nix/conversations

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Android on Nix

This repo summarizes my several attempts at packaging android applications as nix flakes:

All attempts were unsuccessful with semi-complex application configurations that use any of the following:

  • subprojects
  • gradle build configurations
  • buildscript dependencies
  • custom maven repositories (tend to lack a maven-metadata.xml)

Conversations.im specific nits

The Conversations application vendors in libwebrtc because it is not provided as a consumable library via a maven repository. Build instructions suggest downloading the .aar file and placing it inside /libs. To side step this, make use of the following patch that fetches libwebrtc from an unofficial maven repo:

20a21,23
>     maven {
>         url 'https://raw.github.com/abdularis/libwebrtc-android/repo/'
>     }
36a40
>     implementation 'com.aar.app:google-webrtc:M83'
81d84
<     implementation fileTree(include: ['libwebrtc-m90.aar'], dir: 'libs')
293d295
< 

Entering a nix-shell with the android sdk and gradle should now allow you to build the application with:

./gradlew assembleConversationsFreeSystemDebug

General notes

  • all project sources are loaded from local directories, a local copy of build.gradle is required to run any form of gradle locking + SHA calculation
  • gradle v7 has an internal lock mechanism but unlike tools like cargo or yarn, lock files aren't as useful because gradle further resolves these dependencies into "artifacts". Additionally, gradle gives projects the ability to modify this resolution process (resolution strategies, dependency substitution, module replacement), making it pretty complex to replicate in nix
  • there exists a androidenv.buildApp in nixpkgs, this works only for ANT based android projects. The utility to convert gradle projects to ANT android projects has been deprecated by google

About

Archived: conversations has not been updated since 2021-08

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Nix 79.7%
  • Shell 16.3%
  • Awk 4.0%