Nixos and react-native for Android projects

Is there anyone using Nixos and React-native? I am having trouble building a project because the binaries used by gradle have hardcoded paths for the system libraries.

Right now the stumbling block is aapt2, and using patchelf to patch the binary in the cache of .gradle is not enough because gradle replaces it each time.

Any hint is welcome, I’m stuck.

take a look at repository. They migrate to Nix as buld system for a bunch of stack, including react native and gradle.

Here is the code:
Some context: The road to Nix, a functional package manager to rule them all - Software Engineering -