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 ;;; Copyright © 2024, 2025 Ashish SHUKLA ;;; Copyright © 2024 Jakob Kirsch -;;; Copyright © 2024, 2025 Giacomo Leidi +;;; Copyright © 2024-2026 Giacomo Leidi ;;; Copyright © 2024 Artyom V. Poptsov ;;; Copyright © 2025 Karl Hallsby ;;; Copyright © 2025 Douglas Deslauriers ;;; Copyright © 2025 Andreas Enge +;;; Copyright © 2026 Nguyễn Gia Phong ;;; ;;; 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+)))