First successful Nix build! (iOS, not tested yet);
Linux and Windows builds break on CI, most likely cause is that nixos Docker image is based on Alpine, @jakubgs will make an image based on Ubuntu to work around this;
linuxdeployqt is still leaving some references to /nix folders on executable, will need to write code to manually fix up references.
Look into why CI server cannot build Linux app when it passes locally;
Update: Although the Linux build is passing locally, our CI Docker image is Ubuntu 16.04 (which only has glibc 2.23, whereas 18.04 has 2.27). Will need to investigate possible solutions to this issue, assuming we want to keep supporting 16.04;
Victory! I wrote a script that traverses/copies/patches all the dependencies of the Status executable and that way the output AppImage (generated on Ubuntu 18.04) was able to run directly on Ubuntu 16.04 (we should be able to run even on lower versions that than now).
As a note to @jakubgs when he’s back from vacations, the current state is:
if we run the build on 16.04 with the AppImage version of linuxdeployqt, it fails due to a missing library when extracting (--appimage-extract-and-run). It might be possible to complete successfully if we use a version compiled in Nix and doesn’t resort to that;
currently the way I’m able to run on 16.04 is to bundle all dependencies down to glibc 2.27, running the whole bundling process under nix-shell on 18.04 except the last step (appimagetool), which is run on 16.04. I’m going to dig deeper into this to see if we can run the whole process in 16.04 to keep the process simple.
Interestingly I was contacted by a non-Core dev on Status who was trying to build the app on Android but failing, he tried the feature/nix branch and was able to build it successfully at the first attempt, which is encouraging. He’s still having issues with the iOS build, but that looks like it’s due to some stuff prefixed on his PATH environment variable.
@jarradhope@rachel@vitaliy@anna I’d like to get your thoughts on the feasibility of merging the Nix branch with support for Ubuntu 18.04 and above only (so we’d lose support for 16.04, at least temporarily). Out of the box at least, the apps generated with the toolchain provided by Nix only run on 18.04 and above. I’ve been able to make it run on Ubuntu 16.04 by packaging all dependencies down to the lowest level, but it was more of a PoC that still requires quite a bit more work to productize (e.g. it requires handing off a CI build from 18.04 to a 16.04 job that will package things into an AppImage, and the logic to search for Qt plugins instead of packaging the whole shebang still needs to be written).
Keeping the branch going will risk slowing us down by forcing me to rebase as work happens on develop (e.g. there’s a new ongoing branch that’ll update the Android NDK to a new version, and that is work that will need to be redone on the Nix branch).
Another idea is to simply postpone further support for 16.04. As @jakubgs said, by the time the release version comes out, this might not even be an issue anymore (having to support 16.04). Until then, we could simply add the minimum requirements for Linux on the download page.
Shame that we don’t have a sense for how many developers use lower Ubuntu versions.
Assuming we are certain about moving ahead with Nix—and it sounds like it will help a lot of people—I’d say, let’s merge and deal with Ubuntu 16.04 later if necessary? Although it blocks some, it seems we’ll still be alienating way fewer developers overall if we merge it.
Fixed the mobile debug build by patching the runIOS.js script of react-native-cli to force it to use the legacy build system and not installing Nix’s version of the compiler;
Continue playing the whack-a-mole game by fixing the Desktop debug build which got broken by previous step.
@jakubgs Figured out that you have to do nix-build -A env.all if you want it to build all expressions, otherwise it’ll only build the first. That’s why our caches weren’t fully populated, and make setup wasn’t downloading everything.
Improved detection logic in make setup and make shell;
The NSIS package was merged upstream and the Conan package was fixed, so they were both removed from the status-react codebase and referenced from upstream.
As for today and probably tomorrow, there won’t be much work done on the Nix branch as we’re quickly switching focus to the Chaos Unicorn Day before the feature freeze on Wednesday. The current state is as follows:
most issues revolve around running react-native run-desktop. On some platforms it is not able to fetch the sources, and on Ubuntu 18.04 it is not able to decrypt the data while inside the nix-shell (this is also an issue seen when building the AppImage, but in that case we can exit the nix-shell and run the AppImage just fine);
missing icons in MacOS: this is a known issue due to a bug in the macdeployqt which we’ll need to work around in our deployment script. Should be at most a day’s work, and we’ll do that before merging to develop so as to avoid a perceived broken nightly.