Change:
When I try to run , I get console error output similar to what is described in , i.e. a cli help message and then some error messages, at which point the program quits: Steps to reproduce the behavior: I was expecting the behavior I see when I use a non-nixpkgs version of the protonmail-bridge application, namely that a GUI window pop ups inviting me to log in with my protonmail account. Please run and paste the result.
Hi yes unfortunately there is no support for the gui in nixpkgs atm
Hm, this is surprising - is there any reason it's difficult to provide GUI support in nixpkgs? Is this a deliberate decision?
Well the main reason for me is that I don't use the gui. But there's two different programs to launch the GUI with two different build system as well...
Problem is the GUI is needed to show the password to enter into e.g. Thunderbird to set up proton mail via the bridge.... so this seems to prevent use of proton mail in nixos . I set this up in Ubuntu no probs.
You can do that with the info command in the cli
Thanks. Sorry to be so dim, nix newbie.... but I do not have any such command available with what I have in my config file and the command line output nor in -cli "mode". 1) my config file bit about proton bridge: # 28-10-2023 suggested by @ responding to issue with proton bridge # = true; # 28-10-23 from = true; = { description = "Protonmail Bridge"; enable = true; script = "${pkgs.protonmail-bridge}/bin/protonmail-bridge --noninteractive --log-level info"; path = [ ]; # HACK: wantedBy = [ "graphical-" ]; partOf = [ "graphical-" ]; }; 2) my command line gives me this: [--- protonmail-bridge -i Incorrect Usage: flag provided but not defined: -i NAME: ProtonMailBridge - Proton Mail IMAP and SMTP Bridge USAGE: ProtonMailBridge [global options] command [command options] [arguments...] COMMANDS: help, h Shows a list of commands or help for one command GLOBAL OPTIONS: --cpu-prof, -p Generate CPU profile (default: false) --mem-prof, -m Generate memory profile (default: false) --log-level value, -l value Set the log level (one of panic, fatal, error, warn, info, debug) --grpc, -g Start the gRPC service (default: false) --cli, -c Start the command line interface (default: false) --noninteractive, -n Start the app in non-interactive mode (default: false) --log-imap value Enable logging of IMAP communications (allserver) (may contain decrypted data!) --log-smtp Enable logging of SMTP communications (may contain decrypted data!) (default: false) --help, -h show help FATA[0000] flag provided but not defined: -i [---- protonmail-bridge info INFO[0000] Migrating keychain helper WARN[Oct 29 09:43:30.167] Failed to create lock file; another instance is running [----- protonmail-bridge -c INFO[0000] Migrating keychain helper WARN[Oct 29 09:44:05.339] Failed to create lock file; another instance is running
I pasted from config into this github field and the formatting went crazy... of course markup ... sorry... new to this.. but fat stuff in after the hash..... i.e. comments.. sorry
When you launch in mode you need to and then get the info you need for thunderbird with . If you don't see the CLI (it prints a little bridge in ASCI and wait for input) that's probably because of that try to kill the running bridge or remove manually the lockfile (I don't know where it is though).

Discussion:
postInstall = '' mv $out/bin/Desktop-Bridge $out/bin/protonmail-bridge # The cli is named like that in other distro packages <del> install -Dm444 dist/proton-bridge.desktop -t $out/share/applications install -Dm444 dist/bridge.svg $out/share/icons/hicolor/scalable/apps/protonmail-bridge.svg </del> ''; <del> meta = with lib; { homepage = "https://github.com/ProtonMail/proton-bridge"; </del> <ins> meta = { </ins> changelog = "https://github.com/ProtonMail/proton-bridge/blob/${src.rev}/Changelog.md"; <del> downloadPage = "https://github.com/ProtonMail/proton-bridge/releases"; license = licenses.gpl3Plus; maintainers = with maintainers; [ mrfreezeex ]; </del> description = "Use your ProtonMail account with your local e-mail client"; <ins> downloadPage = "https://github.com/ProtonMail/proton-bridge/releases"; homepage = "https://github.com/ProtonMail/proton-bridge"; license = lib.licenses.gpl3Plus; </ins> longDescription = '' An application that runs on your computer in the background and seamlessly encrypts and decrypts your mail as it enters and leaves your computer.

To work, use secret-service freedesktop.org API (e.g. Gnome keyring) or pass. ''; mainProgram = "protonmail-bridge"; <ins> maintainers = with lib.maintainers; [ mrfreezeex daniel-fahey ]; </ins> }; }

<ins> { lib , stdenv , pkg-config , libsecret , cmake , ninja , qt6 , grpc , protobuf , zlib , gtest , sentry-native , protonmail-bridge }: stdenv.mkDerivation (finalAttrs: { pname = "protonmail-bridge-gui"; inherit (protonmail-bridge) version src; patches = [ # Use `gtest` from Nixpkgs to allow an offline build ./use-nix-googletest.patch ]; nativeBuildInputs = [ pkg-config cmake ninja qt6.qtbase qt6.qtdeclarative qt6.qtwayland qt6.qtsvg qt6.wrapQtAppsHook ]; buildInputs = [ libsecret grpc protobuf zlib gtest sentry-native ]; sourceRoot = "${finalAttrs.src.name}/internal/frontend/bridge-gui"; postPatch = '' # Bypass `vcpkg` by deleting lines that `include` BridgeSetup.cmake find . -type f -name "CMakeLists.txt" -exec sed -i "/BridgeSetup.cmake/d" {} ; # Use the available ICU version sed -i "s/libicu(i18n|uc|data).so.56/libicu1.so/g" bridge-gui/DeployLinux.cmake # Create a Desktop Entry that uses a `protonmail-bridge-gui` binary without upstream's launcher sed "s/^(Icon|Exec)=.*$/1=protonmail-bridge-gui/" ../../../dist/proton-bridge.desktop > proton-bridge-gui.desktop # Also update `StartupWMClass` to match the GUI binary's `wmclass` (Wayland app id) sed -i "s/^(StartupWMClass=)Proton Mail Bridge$/1ch.proton.bridge-gui/" proton-bridge-gui.desktop # Don't build `bridge-gui-tester` sed -i "/add_subdirectory(bridge-gui-tester)/d" CMakeLists.txt ''; preConfigure = '' cmakeFlagsArray+=( "-DCMAKE_BUILD_TYPE=Release" "-DBRIDGE_APP_FULL_NAME=Proton Mail Bridge" "-DBRIDGE_VENDOR=Proton AG" "-DBRIDGE_REVISION=${finalAttrs.src.rev}" "-DBRIDGE_TAG=${finalAttrs.version}" "-DBRIDGE_BUILD_ENV=Nix" "-DBRIDGE_APP_VERSION=${finalAttrs.version}" ) ''; installPhase = '' runHook preInstall # Install the GUI binary install -Dm755 bridge-gui/bridge-gui $out/lib/bridge-gui # Symlink the backend binary from the protonmail-bridge (CLI) package ln -s ${protonmail-bridge}/bin/protonmail-bridge $out/lib/bridge # Symlink the GUI binary mkdir -p $out/bin ln -s $out/lib/bridge-gui $out/bin/protonmail-bridge-gui # Install desktop assets install -Dm644 ../proton-bridge-gui.desktop -t $out/share/applications install -Dm644 ../../../../dist/bridge.svg $out/share/icons/hicolor/scalable/apps/protonmail-bridge-gui.svg runHook postInstall ''; meta = { changelog = "https://github.com/ProtonMail/proton-bridge/blob/${finalAttrs.src.rev}/Changelog.md"; description = "Qt-based GUI to use your ProtonMail account with your local e-mail client"; downloadPage = "https://github.com/ProtonMail/proton-bridge/releases"; homepage = "https://github.com/ProtonMail/proton-bridge"; license = lib.licenses.gpl3Plus; longDescription = '' Provides a GUI application that runs in the background and seamlessly encrypts and decrypts your mail as it enters and leaves your computer. To work, use secret-service freedesktop.org API (e.g. Gnome keyring) or pass. ''; mainProgram = "protonmail-bridge-gui"; maintainers = with lib.maintainers; [ daniel-fahey ]; platforms = lib.platforms.linux; }; }) </ins>

<ins> diff --git a/bridgepp/CMakeLists.txt b/bridgepp/CMakeLists.txt index f4a0a553..02d631dc 100644 --- a/bridgepp/CMakeLists.txt +++ b/bridgepp/CMakeLists.txt @@ -172,16 +172,8 @@ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0") cmake_policy(SET CMP0135 NEW) # avoid warning DOWNLOAD_EXTRACT_TIMESTAMP endif () -include(FetchContent) -FetchContent_Declare( -    googletest -    URL https://github.com/google/googletest/archive/b796f7d44681514f58a683a3a71ff17c94edb0c1.zip -) - -# For Windows: Prevent overriding the parent project's compiler/linker settings -set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) - -FetchContent_MakeAvailable(googletest) +# Use find_package to use the gtest package provided by Nix +find_package(GTest REQUIRED) enable_testing() </ins>