Skip to content

discord-rpc: fix build with CMake 4; various: disable discord-rpc#449212

Merged
vcunat merged 5 commits intoNixOS:masterfrom
marcin-serwin:push-vmvxxquywulx
Oct 9, 2025
Merged

discord-rpc: fix build with CMake 4; various: disable discord-rpc#449212
vcunat merged 5 commits intoNixOS:masterfrom
marcin-serwin:push-vmvxxquywulx

Conversation

@marcin-serwin
Copy link
Contributor

@marcin-serwin marcin-serwin commented Oct 6, 2025

discord-rpc is unmaintained upstream.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 6.topic: games Gaming on NixOS labels Oct 6, 2025
@felixalbrigtsen
Copy link
Member

Accounting for #445447 in the actual mudlet package as well, mudlet builds fine like this without discord-rpc. LGTM 🚀

@WheelsForReals
Copy link
Contributor

Seems good to me for Parallel Launcher, though we could also just remove it from the derivation entirely. It appears PL doesn't use the nixpkgs version of the library at runtime at all. PL actually downloads its own precompiled version of the lib to /home/$USER/.local/share/parallel-launcher/plugins and dlopens that one at runtime instead.

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 449212 --package parallel-launcher
Commit: 297f8fb901ffc15d1a1f425b4875c50247dcc5c5


x86_64-linux

✅ 1 package built:
  • parallel-launcher

@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Oct 6, 2025
Copy link
Member

@keenanweaver keenanweaver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

openrct2 is still failing, but that's because of innoextract. #449252 should address

@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Oct 7, 2025
@matteo-pacini
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review-gha

Command: nixpkgs-review pr 449212
Commit: 297f8fb901ffc15d1a1f425b4875c50247dcc5c5 (subsequent changes)
Merge: 7f72f226e17c22d03d18a9bb9fe74f35741b602b

Logs: https://github.com/matteo-pacini/nixpkgs-review-gha/actions/runs/18314219557


x86_64-linux

❌ 2 packages failed to build:
  • mudlet
  • openrct2
✅ 4 packages built:
  • discord-rpc
  • parallel-launcher
  • rmg
  • rmg-wayland

Error logs: `x86_64-linux`
mudlet
patching file src/CMakeLists.txt
Hunk #1 succeeded at 524 (offset -38 lines).
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Updating Autotools / GNU config script to a newer upstream version: ./3rdparty/edbee-lib/vendor/onig/config.sub
Updating Autotools / GNU config script to a newer upstream version: ./3rdparty/edbee-lib/vendor/onig/config.guess
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
cmake flags: -DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DCMAKE_INSTALL_LOCALEDIR=/nix/store/mrwn1f5p89l1g0ldbffyxgisjb4gp1bi-mudlet-4.17.2/share/locale -DCMAKE_INSTALL_LIBEXECDIR=/nix/store/mrwn1f5p89l1g0ldbffyxgisjb4gp1bi-mudlet-4.17.2/libexec -DCMAKE_INSTALL_LIBDIR=/nix/store/mrwn1f5p89l1g0ldbffyxgisjb4gp1bi-mudlet-4.17.2/lib -DCMAKE_INSTALL_DOCDIR=/nix/store/mrwn1f5p89l1g0ldbffyxgisjb4gp1bi-mudlet-4.17.2/share/doc/mudlet -DCMAKE_INSTALL_INFODIR=/nix/store/mrwn1f5p89l1g0ldbffyxgisjb4gp1bi-mudlet-4.17.2/share/info -DCMAKE_INSTALL_MANDIR=/nix/store/mrwn1f5p89l1g0ldbffyxgisjb4gp1bi-mudlet-4.17.2/share/man -DCMAKE_INSTALL_INCLUDEDIR=/nix/store/mrwn1f5p89l1g0ldbffyxgisjb4gp1bi-mudlet-4.17.2/include -DCMAKE_INSTALL_SBINDIR=/nix/store/mrwn1f5p89l1g0ldbffyxgisjb4gp1bi-mudlet-4.17.2/sbin -DCMAKE_INSTALL_BINDIR=/nix/store/mrwn1f5p89l1g0ldbffyxgisjb4gp1bi-mudlet-4.17.2/bin -DCMAKE_INSTALL_NAME_DIR=/nix/store/mrwn1f5p89l1g0ldbffyxgisjb4gp1bi-mudlet-4.17.2/lib -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_STRIP=/nix/store/dmypp1h4ldn0vfk3fi6yfyf5yxp9yz0k-gcc-wrapper-14.3.0/bin/strip -DCMAKE_RANLIB=/nix/store/dmypp1h4ldn0vfk3fi6yfyf5yxp9yz0k-gcc-wrapper-14.3.0/bin/ranlib -DCMAKE_AR=/nix/store/dmypp1h4ldn0vfk3fi6yfyf5yxp9yz0k-gcc-wrapper-14.3.0/bin/ar -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=/nix/store/mrwn1f5p89l1g0ldbffyxgisjb4gp1bi-mudlet-4.17.2 -DCMAKE_SKIP_BUILD_RPATH=ON
CMake Error at CMakeLists.txt:36 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.

Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.

-- Configuring incomplete, errors occurred!


aarch64-linux

❌ 2 packages failed to build:
  • mudlet
  • openrct2
✅ 3 packages built:
  • discord-rpc
  • rmg
  • rmg-wayland

Error logs: `aarch64-linux`
mudlet
patching file src/CMakeLists.txt
Hunk #1 succeeded at 524 (offset -38 lines).
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Updating Autotools / GNU config script to a newer upstream version: ./3rdparty/edbee-lib/vendor/onig/config.sub
Updating Autotools / GNU config script to a newer upstream version: ./3rdparty/edbee-lib/vendor/onig/config.guess
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
cmake flags: -DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DCMAKE_INSTALL_LOCALEDIR=/nix/store/69vxrbknrcbjclavanhdqcgd8pbch946-mudlet-4.17.2/share/locale -DCMAKE_INSTALL_LIBEXECDIR=/nix/store/69vxrbknrcbjclavanhdqcgd8pbch946-mudlet-4.17.2/libexec -DCMAKE_INSTALL_LIBDIR=/nix/store/69vxrbknrcbjclavanhdqcgd8pbch946-mudlet-4.17.2/lib -DCMAKE_INSTALL_DOCDIR=/nix/store/69vxrbknrcbjclavanhdqcgd8pbch946-mudlet-4.17.2/share/doc/mudlet -DCMAKE_INSTALL_INFODIR=/nix/store/69vxrbknrcbjclavanhdqcgd8pbch946-mudlet-4.17.2/share/info -DCMAKE_INSTALL_MANDIR=/nix/store/69vxrbknrcbjclavanhdqcgd8pbch946-mudlet-4.17.2/share/man -DCMAKE_INSTALL_INCLUDEDIR=/nix/store/69vxrbknrcbjclavanhdqcgd8pbch946-mudlet-4.17.2/include -DCMAKE_INSTALL_SBINDIR=/nix/store/69vxrbknrcbjclavanhdqcgd8pbch946-mudlet-4.17.2/sbin -DCMAKE_INSTALL_BINDIR=/nix/store/69vxrbknrcbjclavanhdqcgd8pbch946-mudlet-4.17.2/bin -DCMAKE_INSTALL_NAME_DIR=/nix/store/69vxrbknrcbjclavanhdqcgd8pbch946-mudlet-4.17.2/lib -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_STRIP=/nix/store/frxwlync78r3l94863r2cbnz7ngy273j-gcc-wrapper-14.3.0/bin/strip -DCMAKE_RANLIB=/nix/store/frxwlync78r3l94863r2cbnz7ngy273j-gcc-wrapper-14.3.0/bin/ranlib -DCMAKE_AR=/nix/store/frxwlync78r3l94863r2cbnz7ngy273j-gcc-wrapper-14.3.0/bin/ar -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=/nix/store/69vxrbknrcbjclavanhdqcgd8pbch946-mudlet-4.17.2 -DCMAKE_SKIP_BUILD_RPATH=ON
CMake Error at CMakeLists.txt:36 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.

Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.

-- Configuring incomplete, errors occurred!


x86_64-darwin (sandbox = true)

❌ 2 packages failed to build:
  • discord-rpc
  • mudlet

Error logs: `x86_64-darwin`
discord-rpc
  Manually-specified variables were not used by the project:
BUILD_TESTING
CMAKE_EXPORT_NO_PACKAGE_REGISTRY
CMAKE_FIND_USE_PACKAGE_REGISTRY
CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY
CMAKE_POLICY_DEFAULT_CMP0025

-- Build files have been written to: /nix/build/nix-9750-505625855/source/build
cmake: enabled parallel building
cmake: enabled parallel installing
configurePhase completed in 36 seconds
Running phase: buildPhase
@nix { "action": "setPhase", "phase": "buildPhase" }
build flags: -j3 SHELL=/nix/store/j3wkpf582ngf1brv85jbgi1fk6c9lspq-bash-5.3p3/bin/bash
[ 0%] Built target clangformat
[ 16%] Building CXX object src/CMakeFiles/discord-rpc.dir/serialization.cpp.o
[ 33%] Building CXX object src/CMakeFiles/discord-rpc.dir/rpc_connection.cpp.o
[ 50%] Building CXX object src/CMakeFiles/discord-rpc.dir/discord_rpc.cpp.o


aarch64-darwin (sandbox = true)

❌ 2 packages failed to build:
  • discord-rpc
  • mudlet

Error logs: `aarch64-darwin`
discord-rpc
CMake Warning:
  Manually-specified variables were not used by the project:
BUILD_TESTING
CMAKE_EXPORT_NO_PACKAGE_REGISTRY
CMAKE_FIND_USE_PACKAGE_REGISTRY
CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY
CMAKE_POLICY_DEFAULT_CMP0025

-- Build files have been written to: /nix/build/nix-7511-3336183747/source/build
cmake: enabled parallel building
cmake: enabled parallel installing
Running phase: buildPhase
@nix { "action": "setPhase", "phase": "buildPhase" }
build flags: -j3 SHELL=/nix/store/xhsnsmvh1ka5mxszd1psxq36vaanb8jy-bash-5.3p3/bin/bash
[ 0%] Built target clangformat
[ 16%] Building CXX object src/CMakeFiles/discord-rpc.dir/discord_rpc.cpp.o
[ 33%] Building CXX object src/CMakeFiles/discord-rpc.dir/rpc_connection.cpp.o
[ 50%] Building CXX object src/CMakeFiles/discord-rpc.dir/serialization.cpp.o

@marcin-serwin
Copy link
Contributor Author

I can't reproduce the darwin build failure, I think it's unlikely that it's caused by this change.

Copy link
Contributor

@fxzzi fxzzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 3+ This PR was reviewed and approved by three or more persons. and removed 12.approvals: 2 This PR was reviewed and approved by two persons. labels Oct 8, 2025
@SuperSandro2000
Copy link
Member

I don't get why we disable discord-rpc in all those packages. Just because it is unmaintained?

@surfaceflinger
Copy link
Member

It appears PL doesn't use the nixpkgs version of the library at runtime at all. PL actually downloads its own precompiled version of the lib to /home/$USER/.local/share/parallel-launcher/plugins and dlopens that one at runtime instead.

Is this the only thing that PL downloads? Because if yes, then it would be good to patch it out/disable it during build to use discord-rpc from system if there's an option.

@marcin-serwin
Copy link
Contributor Author

I don't get why we disable discord-rpc in all those packages. Just because it is unmaintained?

Yep, I'd rather avoid unmaintained optional dependencies and drop the discord-rpc the next time it breaks.

@vcunat vcunat added this pull request to the merge queue Oct 9, 2025
Merged via the queue into NixOS:master with commit 4b3a7fb Oct 9, 2025
38 of 40 checks passed
@marcin-serwin marcin-serwin deleted the push-vmvxxquywulx branch October 11, 2025 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: games Gaming on NixOS 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 3+ This PR was reviewed and approved by three or more persons. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants