From 3ec635be703c947b0b031eb79136037d07eeedd1 Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Tue, 11 Jan 2022 10:07:17 +0300 Subject: [PATCH 1/2] gnu: Add libcpuid. * gnu/packages/hardware.scm (libcpuid): New variable. --- gnu/packages/hardware.scm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm index 8727f0f20a..a2708e6b90 100644 --- a/gnu/packages/hardware.scm +++ b/gnu/packages/hardware.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2021 Raghav Gururajan ;;; Copyright © 2021 Vinicius Monego ;;; Copyright © 2021, 2022 John Kehayias +;;; Copyright © 2022 Zhu Zihao ;;; ;;; This file is part of GNU Guix. ;;; @@ -953,3 +954,22 @@ (define-public tpm2-tss libtss2-esys, libtss2-sys, libtss2-mu, libtss2-tcti-device, libtss2-tcti-swtpm and libtss2-tcti-mssim.") (license license:bsd-2))) + +(define-public libcpuid + (package + (name "libcpuid") + (version "0.5.1") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/anrieff/libcpuid/releases/download/v" + version "/libcpuid-" version ".tar.gz")) + (sha256 + (base32 "1nksdqk2w1c56lkrjcvh3nss9vq454j81j3yq14lwdn4x8bvmwfr")))) + (build-system gnu-build-system) + (supported-systems '("x86_64-linux" "i686-linux")) + (home-page "https://libcpuid.sourceforge.net/") + (synopsis "Small library for x86 CPU detection and feature extraction") + (description "Libcpuid is a small C library to get vendor, model, branding +string, code name and other information from x86 CPU.") + (license license:bsd-2))) -- 2.34.0