From 15a1c57994cb03e0068ecc0d88e32e227dbbbe50 Mon Sep 17 00:00:00 2001 From: Perchun Pak Date: Mon, 13 Apr 2026 13:13:06 +0200 Subject: [PATCH 1/2] equibop: specify electron version Ports #486865 --- pkgs/by-name/eq/equibop/package.nix | 32 ++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/pkgs/by-name/eq/equibop/package.nix b/pkgs/by-name/eq/equibop/package.nix index f04a380bce09..5750da37668e 100644 --- a/pkgs/by-name/eq/equibop/package.nix +++ b/pkgs/by-name/eq/equibop/package.nix @@ -6,16 +6,20 @@ makeWrapper, makeDesktopItem, copyDesktopItems, - electron, + electron_40, python3Packages, pipewire, libpulseaudio, + jq, autoPatchelfHook, bun, nodejs, withTTS ? true, withMiddleClickScroll ? false, }: +let + electron = electron_40; +in stdenv.mkDerivation (finalAttrs: { pname = "equibop"; version = "3.1.8"; @@ -40,6 +44,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ bun + jq nodejs # XXX: Equibop *does not* ship venmic as a prebuilt node module. The package # seems to build with or without this hook, but I (NotAShelf) don't have the @@ -67,15 +72,22 @@ stdenv.mkDerivation (finalAttrs: { ''; # electron builds must be writable to support electron fuses - preBuild = - lib.optionalString stdenv.hostPlatform.isDarwin '' - cp -r ${electron.dist}/Electron.app . - chmod -R u+w Electron.app - '' - + lib.optionalString stdenv.hostPlatform.isLinux '' - cp -r ${electron.dist} electron-dist - chmod -R u+w electron-dist - ''; + preBuild = '' + # Validate electron version matches upstream package.json + if [ "`jq -r '.devDependencies.electron' < package.json | cut -d. -f1 | tr -d '^'`" != "${lib.versions.major electron.version}" ] + then + echo "ERROR: electron version mismatch between package.json and nixpkgs" + exit 1 + fi + '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' + cp -r ${electron.dist}/Electron.app . + chmod -R u+w Electron.app + '' + + lib.optionalString stdenv.hostPlatform.isLinux '' + cp -r ${electron.dist} electron-dist + chmod -R u+w electron-dist + ''; buildPhase = '' runHook preBuild From a69628a2e2b9ca240754086c32ab92c45ca1f0a4 Mon Sep 17 00:00:00 2001 From: Perchun Pak Date: Mon, 13 Apr 2026 13:14:12 +0200 Subject: [PATCH 2/2] equibop: Add `NIXOS_SPEECH` variable to allow turning off speech without rebuilding Ports #398693 --- pkgs/by-name/eq/equibop/package.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/eq/equibop/package.nix b/pkgs/by-name/eq/equibop/package.nix index 5750da37668e..c4af7cd19250 100644 --- a/pkgs/by-name/eq/equibop/package.nix +++ b/pkgs/by-name/eq/equibop/package.nix @@ -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 {