guix_mirror_bot pushed a commit to branch master
in repository guix.
commit 25548ddbf26e4faf78c5c76bec789d51c0cbe366
Author: Giacomo Leidi <[email protected]>
AuthorDate: Fri Jan 2 21:07:37 2026 +0100
gnu: Add virt-what.
* gnu/packages/virtualization.scm (virt-what): New variable.
Change-Id: I8fee626b3525dd4b81b2cd1dc3628f090af8d84b
Co-authored-by: Nguyễn Gia Phong <[email protected]>
---
gnu/packages/virtualization.scm | 45 ++++++++++++++++++++++++++++++++++++++++-
1 file changed, 44 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index 434eea4e7e..e8ab4616bb 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -38,11 +38,12 @@
;;; Copyright © 2024 jgart <[email protected]>
;;; Copyright © 2024, 2025 Ashish SHUKLA <[email protected]>
;;; Copyright © 2024 Jakob Kirsch <[email protected]>
-;;; Copyright © 2024, 2025 Giacomo Leidi <[email protected]>
+;;; Copyright © 2024-2026 Giacomo Leidi <[email protected]>
;;; Copyright © 2024 Artyom V. Poptsov <[email protected]>
;;; Copyright © 2025 Karl Hallsby <[email protected]>
;;; Copyright © 2025 Douglas Deslauriers <[email protected]>
;;; Copyright © 2025 Andreas Enge <[email protected]>
+;;; Copyright © 2026 Nguyễn Gia Phong <[email protected]>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -3858,3 +3859,45 @@ create_header"))))))))))
libxcrypt
numactl
yajl)))))
+
+(define-public virt-what
+ (package
+ (name "virt-what")
+ (version "1.27")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
"https://people.redhat.com/~rjones/virt-what/"
+ "files/" name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1wcvqs5g6b86bym75f1h8gmwf5ak95iwdyj3ficrb4759afvvnfl"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'install 'wrap-binaries
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* (string-append #$output "/sbin/virt-what")
+ (("^PATH=\".*\"")
+ (simple-format #f "PATH=\"~a\""
+ (string-join
+ (search-path-as-list '("bin" "sbin" "libexec")
+ (cons #$output (map cdr inputs)))
+ ":")))))))))
+ (native-inputs
+ (list perl))
+ (inputs
+ (list coreutils
+ bash-minimal
+ dmidecode
+ util-linux
+ which))
+ (home-page "https://people.redhat.com/~rjones/virt-what/")
+ (synopsis "Detect if running in a virtual machine")
+ (description
+ "@code{virt-what} is a program which can be used to detect if the program
+is running in a virtual machine.
+
+The program prints out a list of \"facts\" about the virtual machine,
+derived from heuristics. One fact is printed per line.")
+ (license license:gpl2+)))