NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.83k stars 13.92k forks source link

Update protonmail-bridge to 1.3.x #97991

Closed stefano-m closed 3 years ago

stefano-m commented 4 years ago

Describe the bug

This is not really a bug, but neither it's a new package request.

AFAIU, we currently have a version of protonmail-bridge whose source code is not available

https://github.com/NixOS/nixpkgs/blob/4c9e280001518328ae3be74cf80cb7b6e3017952/pkgs/applications/networking/protonmail-bridge/default.nix#L5

Recently, the source code has been made available at https://github.com/ProtonMail/proton-bridge/

Although I have not tried to build it with Qt, I managed to get it built with CLI support (which is enough for my needs because I use it as a systemd user service anyway), you can see my take on this here

https://github.com/stefano-m/nix-stefano-m-nix-overlays/blob/master/protonmail-bridge/default.nix

maybe this can be integrated into nixpkgs so other people may benefit from the latest version of the bridge? I'd be happy to help.

Thanks!

Notify maintainers

Cc @lightdiscord

Metadata

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
    - protonmail-bridge
# a list of nixos modules affected by the problem
module:
lightdiscord commented 4 years ago

That's a great idea but I don't know what's the best strategy for this.

stefano-m commented 4 years ago

Hi! Thanks for your reply. My thoughts are below:

Should we wait for protonmail-bridge to upgrade qt to a version we have?

I'm afraid that this might take too long: IIRC they are using a version that is too recent and patching and using Qt with NixOS is not trivial. I would definitely need the help of some NixOS Qt expert to get it to build. Others are interested in improving the situation though (https://github.com/ProtonMail/proton-bridge/issues/16).

It may be possible to eventually use our own Qt (https://github.com/therecipe/qt/wiki/Installation-on-Linux#your-system-package-managers-version-without-android-support) but it feels like a lot of work.

Should we do two packages, one cli-only and one with gui?

If we were able to build with Qt, that wouldn't be a bad idea, but even giving the option to build cli-only version and then let users do so in, say, an overlay wouldn't be bad (the cli-only build is pretty simple and does not take long), see e.g. the optional Gtk support for the Awesome WM (#61161)

Should we remove the old version of protonmail-bridge and update it to a cli-only version?

Considering the above, I would say yes. My view on this is that it would be better to have a working recent version of the bridge, even though limited to CLI only, rather than an outdated one.

Another advantage to building it from source is that we can disable the Sentry reports and increase privacy

https://github.com/ProtonMail/proton-bridge/blob/bfdfc81d65dacde57538def61af70195ca397b02/pkg/constants/constants.go#L33