aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/hardware.scm56
1 files changed, 55 insertions, 1 deletions
diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm
index 8727f0f20a..a93db0be3f 100644
--- a/gnu/packages/hardware.scm
+++ b/gnu/packages/hardware.scm
@@ -9,6 +9,8 @@
;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
;;; Copyright © 2021 Vinicius Monego <monego@posteo.net>
;;; Copyright © 2021, 2022 John Kehayias <john.kehayias@protonmail.com>
+;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com>
+;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -70,7 +72,8 @@
#:use-module (guix svn-download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
- #:use-module (guix utils))
+ #:use-module (guix utils)
+ #:use-module (srfi srfi-1))
;; This is a module for packages related to physical hardware that don't (yet)
;; have a more specific home like gps.scm, security-token.scm, &c.
@@ -953,3 +956,54 @@ of your CRT/LCD monitor.")
libtss2-esys, libtss2-sys, libtss2-mu, libtss2-tcti-device, libtss2-tcti-swtpm
and libtss2-tcti-mssim.")
(license license:bsd-2)))
+
+(define-public libcpuid
+ ;; We need to remove blobs from the source, first we have to isolate the blob
+ ;; source in build system.
+ ;; See https://github.com/anrieff/libcpuid/pull/159.
+ (let ((commit "2e61160983f32ba840b2246d3c3850c44626ab0d")
+ (revision "1"))
+ (package
+ (name "libcpuid")
+ (version (git-version "0.5.1" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/anrieff/libcpuid")
+ (commit commit)))
+ (sha256
+ (base32 "1mphvkiqq6z33sq6i490fq27sbyylacwrf8bg7ccvpcjms208sww"))
+ (modules '((guix build utils)))
+ (snippet
+ ;; Now remove blobs.
+ #~(begin
+ (delete-file "libcpuid/msrdriver.c")
+ (delete-file-recursively "contrib/MSR Driver")))
+ (file-name (git-file-name name version))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:configure-flags #~(list "-DLIBCPUID_TESTS=ON")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'absolutize
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Linux specific
+ (when #$(target-linux?)
+ (substitute* "libcpuid/rdmsr.c"
+ (("modprobe") (which "modprobe")))))))))
+ (inputs
+ (if (target-linux?)
+ (list kmod)
+ '()))
+ (native-inputs (list python-3)) ;required by tests
+ (supported-systems
+ (filter (lambda (t) (or (target-x86-64? t) (target-x86-32? t)))
+ %supported-systems))
+ (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. This library is not to be
+confused with the @code{cpuid} command line utility from package @code{cpuid}.")
+ (license license:bsd-2))))
ase "multiplexed-build-output" and remove "use-ssh-substituter". * guix/store.scm (set-build-options): Add #:multiplexed-build-output? and honor it. (%protocol-version): Bump to #x163. * tests/store.scm ("multiplexed-build-output"): New test. fixlet Ludovic Courtès 2018-04-19guix-daemon: Disable garbage collection for remote connections....* nix/nix-daemon/nix-daemon.cc (isRemoteConnection): New variable. (performOp): For wopCollectGarbage, throw an error when isRemoteConnection is set. (acceptConnection): Set isRemoteConnection when connection is not AF_UNIX. * tests/guix-daemon.sh: Add a test for the new behavior. Roel Janssen 2017-07-17daemon: Flush the sink upon 'exportPath' errors....Prior to this change, errors such as wrong permissions on /etc/guix/signing-key.sec would give: guix-daemon: nix/libutil/serialise.cc:15: virtual nix::BufferedSink::~BufferedSink(): Assertion `!bufPos' failed. This patch correctly propagates the error to the client and thus changes that to: error: build failed: file `/etc/guix/signing-key.sec' should be secret (inaccessible to everybody else)! * nix/nix-daemon/nix-daemon.cc (performOp): Wrap 'exportPath' call in 'try' block. Co-authored-by: Ludovic Courtès <ludo@gnu.org> Jan Nieuwenhuizen 2017-07-10daemon: Allow compilation with GCC 4.9....Reported by Ricardo Wurmus. * nix/nix-daemon/nix-daemon.cc (acceptConnection): Remove intermediate 'inaddr' variables that relied on implicit casts. This fixes compilation with GCC 4.9. Ludovic Courtès 2017-06-22daemon: Set TCP_NODELAY and TCP_QUICKACK on remote sockets....* nix/nix-daemon/nix-daemon.cc (acceptConnection): Set TCP_NODELAY and TCP_QUICKACK on REMOTE. Ludovic Courtès 2017-06-22daemon: '--listen' can be passed several times, can specify TCP endpoints....* nix/nix-daemon/guix-daemon.cc (DEFAULT_GUIX_PORT): New macro. (listen_options): New variable. (parse_opt): Push back '--listen' options to LISTEN_OPTIONS. (open_unix_domain_socket, open_inet_socket) (listening_sockets): New functions. (main): Use it. Pass SOCKETS to 'run'. * nix/nix-daemon/nix-daemon.cc (matchUser): Remove. (SD_LISTEN_FDS_START): Remove. (acceptConnection): New function. (daemonLoop): Rewrite to take a vector of file descriptors, to select(2) on them, and to call 'acceptConnection'. (run): Change to take a vector of file descriptors. * tests/guix-daemon.sh: Add test. Ludovic Courtès 2017-01-15daemon: Client settings no longer override daemon settings....Fixes <http://bugs.gnu.org/20217>. * nix/libstore/worker-protocol.hh (PROTOCOL_VERSION): Bump to 0x161. * nix/nix-daemon/nix-daemon.cc (performOp): "build-max-jobs", "build-max-silent-time", and "build-cores" are no longer read upfront; instead, read them from the key/value list at the end. * nix/nix-daemon/guix-daemon.cc (main): Explicitly set 'settings.maxBuildJobs'. * guix/store.scm (%protocol-version): Bump to #x161. (set-build-options): #:max-build-jobs, #:max-silent-time, and #:build-cores now default to #f. Adjust handshake to new protocol. * tests/store.scm ("build-cores"): New test. * tests/guix-daemon.sh: Add test for default "build-cores" value. Ludovic Courtès 2016-12-09daemon: Set ownership of kept build directories to the calling user....Fixes <http://bugs.gnu.org/15890>. * nix/libstore/globals.hh (Settings) Add clientUid and clientGid. * nix/nix-daemon/nix-daemon.cc (daemonLoop] Store UID and GID of the caller in settings. * nix/libstore/build.cc (_chown): New function. (DerivationGoal::deleteTmpDir): Use it, change ownership of build directory if it is kept and the new owner is not root. Hartmut Goebel 2016-12-01daemon: Buffer data sent to clients by the 'export-path' RPC....Before that we'd have STDERR_WRITE round trips for very small amounts of data, ranging from a few bytes for the metadata of nars to the size of one file being exported. With this change, something like: guix archive --export /gnu/store/5rrsbaghh5ix1vjcicsl60gsxilhjnf2-coreutils-8.25 | dd of=/dev/null reports a throughput of 35 MB/s instead of 25 MB/s before. * nix/nix-daemon/nix-daemon.cc (TunnelSink): Inherit from 'BufferedSink' rather than 'Sink'. Rename 'operator ()' to 'write'. (performOp) <wopExportPath>: Add 'sink.flush' call. Ludovic Courtès