|
;(use-modules (ice-9 readline)) |
|
|
|
;(activate-readline) |
|
;(use-modules (oop goops)) ; for class-of |
|
|
|
(use-modules (web client) |
|
(web uri) |
|
(web response) |
|
(srfi srfi-1) |
|
(rnrs bytevectors) |
|
(rnrs io ports) |
|
(guile) |
|
(gcrypt hash)) |
|
|
|
(define (bytevector->hex-string bv) |
|
(let ((len (bytevector-length bv))) |
|
(list->string |
|
(let loop ((i 0) (result '())) |
|
(if (= i len) |
|
result |
|
(let ((byte (bytevector-u8-ref bv i))) |
|
(loop (+ i 1) |
|
(append result |
|
(list (integer->char |
|
(if (< (quotient byte 16) 10) |
|
(+ (quotient byte 16) (char->integer #\0)) |
|
(+ (- (quotient byte 16) 10) (char->integer #\a)))) |
|
(integer->char |
|
(if (< (modulo byte 16) 10) |
|
(+ (modulo byte 16) (char->integer #\0)) |
|
(+ (- (modulo byte 16) 10) (char->integer #\a) |
|
) |
|
) |
|
) |
|
) |
|
) |
|
) |
|
) |
|
) |
|
) |
|
) |
|
) |
|
) |
|
|
|
|
|
|
|
;(define thehash (bytevector->hex-string (sha256 (cadr (call-with-values (lambda () (http-get "https://download.qemu.org/qemu-9.2.0.tar.xz" #:decode-body? #f)) list))))) |
|
|
|
|
|
(define-module (bsprak) |
|
#:use-module (gnu packages) |
|
#:use-module (gnu packages attr) |
|
#:use-module (gnu packages admin) |
|
#:use-module (gnu packages audio) |
|
#:use-module (gnu packages base) |
|
#:use-module (gnu packages bison) |
|
#:use-module (gnu packages bootloaders) |
|
#:use-module (gnu packages compression) |
|
#:use-module (gnu packages flex) |
|
#:use-module (gnu packages gcc) |
|
#:use-module (gnu packages gettext) |
|
#:use-module (gnu packages gl) |
|
#:use-module (gnu packages glib) |
|
#:use-module (gnu packages gtk) |
|
#:use-module (gnu packages image) |
|
#:use-module (gnu packages libusb) |
|
#:use-module (gnu packages linux) |
|
#:use-module (gnu packages ncurses) |
|
#:use-module (gnu packages ninja) |
|
#:use-module (gnu packages perl) |
|
#:use-module (gnu packages pkg-config) |
|
#:use-module (gnu packages pulseaudio) |
|
#:use-module (gnu packages python) |
|
#:use-module (gnu packages python-build) |
|
#:use-module (gnu packages python-xyz) |
|
#:use-module (gnu packages sdl) |
|
#:use-module (gnu packages sphinx) |
|
#:use-module (gnu packages spice) |
|
#:use-module (gnu packages texinfo) |
|
#:use-module (gnu packages virtualization) |
|
#:use-module (gnu packages vim) |
|
#:use-module (gnu packages wget) |
|
#:use-module (gnu packages build-tools) |
|
#:use-module (gnu packages xdisorg) |
|
#:use-module (gnu packages networking) |
|
#:use-module (gnu packages firmware) |
|
#:use-module (gnu packages containers) |
|
#:use-module (gnu packages dbm) |
|
#:use-module (gnu packages base) |
|
#:use-module ((guix licenses) #:prefix license:) |
|
#:use-module (guix build-system gnu) |
|
#:use-module (guix build-system meson) |
|
#:use-module (guix build-system cmake) |
|
#:use-module (guix download) |
|
#:use-module (guix packages) |
|
#:use-module (guix gexp) |
|
#:use-module (guix git-download) |
|
#:export (qemu-bsprak |
|
cppcheck-bsprak) |
|
) |
|
|
|
|
|
(define-public qemu-bsprak |
|
(package |
|
(name "qemu") |
|
(version "9.2.0") |
|
(source (origin |
|
(method url-fetch) |
|
(uri (string-append "https://download.qemu.org/qemu-" version ".tar.xz")) |
|
(sha256 |
|
(base32 |
|
"156qkc44vd1gcmy6i9i1r7r5mvpcrwmwks5v83837xg1cnyg0ngq")) |
|
(patches |
|
(list (local-file "./qemu-led.patch") |
|
(local-file "./qemu-txff.patch") |
|
(local-file "./qemu-unaligned.patch"))) |
|
|
|
)) |
|
(build-system gnu-build-system) |
|
(arguments |
|
`(#:tests? #f ; Add this line to skip tests |
|
#:configure-flags |
|
(list (string-append "--prefix=" (assoc-ref %outputs "out"))) |
|
#:phases |
|
(modify-phases %standard-phases |
|
(add-before 'configure 'set-cc |
|
(lambda _ |
|
(setenv "CC" "gcc") ;; actually works |
|
#t)) |
|
;; Override the default configure phase to avoid unwanted flags |
|
(replace 'configure |
|
(lambda* (#:key outputs #:allow-other-keys) |
|
(let ((out (assoc-ref outputs "out"))) |
|
(invoke "./configure" |
|
(string-append "--prefix=" out)))))))) |
|
(native-inputs |
|
(list pkg-config |
|
python-wrapper |
|
python-sphinx |
|
python-sphinx-rtd-theme |
|
python-tomli |
|
bison |
|
flex |
|
perl |
|
meson |
|
ninja |
|
vim |
|
wget |
|
tar)) |
|
(inputs |
|
(list alsa-lib |
|
attr |
|
dtc |
|
gdbm |
|
gettext-minimal |
|
glib |
|
gtk+ |
|
libaio |
|
libcacard |
|
libcap-ng |
|
libdrm |
|
libepoxy |
|
libjpeg-turbo |
|
libpng |
|
libseccomp |
|
libslirp |
|
liburing |
|
libusb |
|
mesa |
|
ncurses |
|
openbios-qemu-ppc |
|
opensbi-qemu |
|
pixman |
|
pulseaudio |
|
sdl2 |
|
seabios-qemu |
|
spice |
|
texinfo |
|
usbredir |
|
util-linux |
|
vde2 |
|
virglrenderer |
|
zlib |
|
zstd |
|
ipxe-qemu)) |
|
(home-page "https://www.qemu.org") |
|
(synopsis "Machine emulator and virtualizer") |
|
(description "QEMU is a generic machine emulator and virtualizer. |
|
When used as a machine emulator, QEMU can run operating systems and programs made |
|
for one machine on a different machine. When used as a virtualizer, QEMU achieves |
|
near native performances by executing the guest code directly on the host CPU.") |
|
(license license:gpl2+))) |
|
|
|
|
|
(define-public cppcheck-bsprak |
|
(package |
|
(name "cppcheck") |
|
(version "2.14.2") |
|
(source (origin |
|
(method git-fetch) |
|
(uri (git-reference |
|
(url "https://github.com/danmar/cppcheck") |
|
(commit version))) |
|
(file-name (git-file-name name version)) |
|
(sha256 |
|
(base32 "1xfxcg00rxjrb9m2k78yd3jjlldkciv67fsbmjb6n3l43hgfxb9k")) |
|
(patches (search-patches "cppcheck-disable-char-signedness-test.patch")))) |
|
(build-system cmake-build-system) |
|
(arguments |
|
'(#:configure-flags '("-DBUILD_TESTS=ON"))) |
|
(home-page "https://cppcheck.sourceforge.io") |
|
(synopsis "Static C/C++ code analyzer") |
|
(description "Cppcheck is a static code analyzer for C and C++. Unlike |
|
C/C++ compilers and many other analysis tools it does not detect syntax errors |
|
in the code. Cppcheck primarily detects the types of bugs that the compilers |
|
normally do not detect. The goal is to detect only real errors in the code |
|
(i.e. have zero false positives).") |
|
(license license:gpl3+))) |
|
|