From d3e663a4a7d8c2f527fc2b9f0392031032973689 Mon Sep 17 00:00:00 2001 From: wxt <3264117476@qq.com> Date: Thu, 1 Jan 2026 19:57:52 +0800 Subject: [PATCH] cpu-x: fix build --- pkgs/by-name/cp/cpu-x/package.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/cp/cpu-x/package.nix b/pkgs/by-name/cp/cpu-x/package.nix index f8ae9f30b695..0817e99d435e 100644 --- a/pkgs/by-name/cp/cpu-x/package.nix +++ b/pkgs/by-name/cp/cpu-x/package.nix @@ -32,11 +32,6 @@ gtkmm3, }: -# Known issues: -# - The daemon can't be started from the GUI, because pkexec requires a shell -# registered in /etc/shells. The nix's bash is not in there when running -# cpu-x from nixpkgs. - stdenv.mkDerivation (finalAttrs: { pname = "cpu-x"; version = "5.4.0"; @@ -48,6 +43,13 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-db7NxoVZgnYb1MZKfiFINx00JqDnf/TvwumBp6qDooQ="; }; + postPatch = '' + # https://github.com/TheTumultuousUnicornOfDarkness/CPU-X/pull/402 + # FIXME: remove in the next version + substituteInPlace src/core/bandwidth/{OOC/utility,routines}-x86-64bit.asm \ + --replace-fail "cpu ia64" "cpu default" + ''; + nativeBuildInputs = [ cmake pkg-config