cpu-x: fix gtk support (#335367)

This commit is contained in:
Aleksana 2024-09-04 11:12:17 +08:00 committed by GitHub
commit ece67dbfe2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,12 +1,35 @@
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, gtk3, ncurses {
, libcpuid, pciutils, procps, wrapGAppsHook3, nasm, makeWrapper lib,
, opencl-headers, ocl-icd testers,
, vulkan-headers, vulkan-loader, glfw stdenv,
, libXdmcp, pcre, util-linux fetchFromGitHub,
, libselinux, libsepol cmake,
, libthai, libdatrie, libxkbcommon, libepoxy pkg-config,
, dbus, at-spi2-core gtk3,
, libXtst ncurses,
libcpuid,
pciutils,
procps,
wrapGAppsHook3,
nasm,
opencl-headers,
ocl-icd,
vulkan-headers,
vulkan-loader,
glfw,
libXdmcp,
pcre,
util-linux,
libselinux,
libsepol,
libthai,
libdatrie,
libxkbcommon,
libepoxy,
dbus,
at-spi2-core,
libXtst,
gtkmm3,
}: }:
# Known issues: # Known issues:
@ -14,41 +37,69 @@
# registered in /etc/shells. The nix's bash is not in there when running # registered in /etc/shells. The nix's bash is not in there when running
# cpu-x from nixpkgs. # cpu-x from nixpkgs.
stdenv.mkDerivation rec { stdenv.mkDerivation (finalAttrs: {
pname = "cpu-x"; pname = "cpu-x";
version = "5.0.4"; version = "5.0.4";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "X0rg"; owner = "X0rg";
repo = "CPU-X"; repo = "CPU-X";
rev = "v${version}"; rev = "refs/tags/v${finalAttrs.version}";
sha256 = "sha256-8jJP0gxH3B6qLrhKNa4P9ZfSjxaXTeBB1+UuadflLQo="; hash = "sha256-8jJP0gxH3B6qLrhKNa4P9ZfSjxaXTeBB1+UuadflLQo=";
}; };
nativeBuildInputs = [ cmake pkg-config wrapGAppsHook3 nasm makeWrapper ]; nativeBuildInputs = [
cmake
pkg-config
wrapGAppsHook3
nasm
];
buildInputs = [ buildInputs = [
gtk3 ncurses libcpuid pciutils procps gtk3
vulkan-headers vulkan-loader glfw gtkmm3
opencl-headers ocl-icd ncurses
libXdmcp pcre util-linux libcpuid
libselinux libsepol pciutils
libthai libdatrie libxkbcommon libepoxy procps
dbus at-spi2-core vulkan-headers
vulkan-loader
glfw
opencl-headers
ocl-icd
libXdmcp
pcre
util-linux
libselinux
libsepol
libthai
libdatrie
libxkbcommon
libepoxy
dbus
at-spi2-core
libXtst libXtst
]; ];
postInstall = '' preFixup = ''
wrapProgram $out/bin/cpu-x \ gappsWrapperArgs+=(
--prefix PATH : ${lib.makeBinPath [ stdenv.cc ]} \ --prefix PATH : ${lib.makeBinPath [ stdenv.cc ]}
--prefix LD_LIBRARY_PATH : ${vulkan-loader}/lib --prefix LD_LIBRARY_PATH : ${vulkan-loader}/lib
)
''; '';
meta = with lib; { passthru = {
tests = {
version = testers.testVersion { package = finalAttrs.finalPackage; };
};
};
meta = {
description = "Free software that gathers information on CPU, motherboard and more"; description = "Free software that gathers information on CPU, motherboard and more";
mainProgram = "cpu-x"; mainProgram = "cpu-x";
homepage = "https://thetumultuousunicornofdarkness.github.io/CPU-X"; homepage = "https://thetumultuousunicornofdarkness.github.io/CPU-X";
license = licenses.gpl3Plus; license = lib.licenses.gpl3Plus;
platforms = [ "x86_64-linux" ]; platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ viraptor ]; maintainers = with lib.maintainers; [ viraptor ];
}; };
} })