Unverified Commit a69628a2 authored by Perchun Pak's avatar Perchun Pak
Browse files

equibop: Add `NIXOS_SPEECH` variable to allow turning off speech without rebuilding

Ports #398693
parent 15a1c579
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -131,10 +131,12 @@ stdenv.mkDerivation (finalAttrs: {
  postFixup = ''
    makeWrapper ${electron}/bin/electron $out/bin/equibop \
      --add-flags $out/opt/Equibop/resources/app.asar \
      ${lib.optionalString withTTS "--add-flags \"--enable-speech-dispatcher\""} \
      ${lib.optionalString withTTS ''
        --run 'if [[ "''${NIXOS_SPEECH:-default}" != "False" ]]; then NIXOS_SPEECH=True; else unset NIXOS_SPEECH; fi' \
        --add-flags "\''${NIXOS_SPEECH:+--enable-speech-dispatcher}" \
      ''} \
      ${lib.optionalString withMiddleClickScroll "--add-flags \"--enable-blink-features=MiddleClickAutoscroll\""} \
      --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}" \
      --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ (lib.getLib stdenv.cc.cc) ]}"
      --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}"
  '';

  desktopItems = makeDesktopItem {