diff options
author | Stanisław Pitucha <git@viraptor.info> | 2023-10-17 15:34:59 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-17 15:34:59 +1100 |
commit | 28b90e27f8383189a7e2f02ba0164aa8ddad86dd (patch) | |
tree | 55786ade2cfa333bea20f64d9f65fa989b33f757 /pkgs/by-name | |
parent | 14df4328794349c0f62dfe9b01d36c7cfc5d76bd (diff) | |
parent | 48b03a94091578e4f9bcf3d2bd06cc0e78585ca5 (diff) |
Merge pull request #261555 from viraptor/cpu-x-by-name
cpu-x: migrate to by-name
Diffstat (limited to 'pkgs/by-name')
-rw-r--r-- | pkgs/by-name/cp/cpu-x/package.nix | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/pkgs/by-name/cp/cpu-x/package.nix b/pkgs/by-name/cp/cpu-x/package.nix new file mode 100644 index 0000000000000..5e15b860db3c6 --- /dev/null +++ b/pkgs/by-name/cp/cpu-x/package.nix @@ -0,0 +1,53 @@ +{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, gtk3, ncurses +, libcpuid, pciutils, procps, wrapGAppsHook, nasm, makeWrapper +, opencl-headers, ocl-icd +, vulkan-headers, vulkan-loader, glfw +, libXdmcp, pcre, util-linux +, libselinux, libsepol +, libthai, libdatrie, libxkbcommon, libepoxy +, dbus, at-spi2-core +, libXtst +}: + +# 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 rec { + pname = "cpu-x"; + version = "5.0.0"; + + src = fetchFromGitHub { + owner = "X0rg"; + repo = "CPU-X"; + rev = "v${version}"; + sha256 = "sha256-mykN+E2ghp2+a06WLYXg9oaQQ2SJDyxIVQSUM00zrCo="; + }; + + nativeBuildInputs = [ cmake pkg-config wrapGAppsHook nasm makeWrapper ]; + buildInputs = [ + gtk3 ncurses libcpuid pciutils procps + vulkan-headers vulkan-loader glfw + opencl-headers ocl-icd + libXdmcp pcre util-linux + libselinux libsepol + libthai libdatrie libxkbcommon libepoxy + dbus at-spi2-core + libXtst + ]; + + postInstall = '' + wrapProgram $out/bin/cpu-x \ + --prefix PATH : ${lib.makeBinPath [ stdenv.cc ]} \ + --prefix LD_LIBRARY_PATH : ${vulkan-loader}/lib + ''; + + meta = with lib; { + description = "Free software that gathers information on CPU, motherboard and more"; + homepage = "https://thetumultuousunicornofdarkness.github.io/CPU-X"; + license = licenses.gpl3Plus; + platforms = [ "x86_64-linux" ]; + maintainers = with maintainers; [ viraptor ]; + }; +} |