Using Nix for building deltachat-desktop

Just posting an idea to see if it has merit. As a n00b I was able to build deltachat-android on my WSL2 Ubuntu installation thanks to the Nix / Flake configuration provided with deltachat-android. When I tried to build deltachat-desktop I did not find a Nix configuration.

Is this build process different by design? Does Nix have some characteristic that does not make it desirable for building the desktop client?

To me it seems that it allows for easier building of people not having the development tools configured themselves, so for me it would be useful to have a Nix configuration for deltachat-desktop as well. Sadly I am on the wrong end of the Nix / Flake learning curve to attempt to provide this myself, especially not knowing whether it is a good idea to have this. What do you think?

@link2xt It seems you know quite a bit about Flake / Nix. What do you think? Is this worthwhile to have?

It seems that if we choose to allow for this Flake / Nix approach we might also want to include the rust core in the desktop repo with gitmodules.

@dotlambda packaged Deltachat Desktop into upstream nixpkgs already: nixpkgs/pkgs/applications/networking/instant-messengers/deltachat-desktop at master · NixOS/nixpkgs · GitHub

As for providing a Nix flake for the GitHub - deltachat/deltachat-desktop: Email-based instant messaging for Desktop. repository so someone can build the latest development version easily, it is welcome if someone wants to do it. I don’t actually know Nix well enough to write meaningful package, Android flake is mostly an example copy-paste and I am not even sure why I made it a flake rather than just a default.nix or shell.nix.

No need, Nix flakes are able to use other repositories as dependencies.

Thanks for the clarifications. I don’t even know this Nix / Flake well enough to understand the difference between with or without Flake. Might be worthwhile techniques for me to look into some day.

For now I will skip it and focus on Allow customising name of DeltaChat folder - #9 by Simon . I will definitely not be able to implement any user interface changes, but I can try to build 2 versions of the Android app (thanks to this easy Flake / Nix environment :wink: ) to have hard-coded folder names for me and my wife, such we can test the use case of single mailbox multiple users, at least on Android.

1 Like