[PATCH] gnu: Add qtmips.

  • Done
  • quality assurance status badge
Details
2 participants
  • Efraim Flashner
  • Mathieu Othacehe
Owner
unassigned
Submitted by
Efraim Flashner
Severity
normal
E
E
Efraim Flashner wrote on 13 Aug 2020 11:18
(address . guix-patches@gnu.org)(name . Efraim Flashner)(address . efraim@flashner.co.il)
20200813091850.30918-1-efraim@flashner.co.il
* gnu/packages/emulators.scm (qtmips): New variable.
---
gnu/packages/emulators.scm | 60 +++++++++++++++++++++++++++++++++++++-
1 file changed, 59 insertions(+), 1 deletion(-)

Toggle diff (80 lines)
diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index 1cf1c433dc..a527c612d6 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -5,7 +5,7 @@
;;; Copyright © 2015, 2016 Taylan Ulrich Bay?rl?/Kammer <taylanbayirli@gmail.com>
;;; Copyright © 2015, 2018 David Thompson <dthompson2@worcester.edu>
;;; Copyright © 2016 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
-;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017, 2018, 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017, 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2017, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
@@ -279,6 +279,64 @@ SoundBlaster/Gravis Ultra Sound card for excellent sound compatibility with
older games.")
(license license:gpl2+)))
+(define-public qtmips
+ (package
+ (name "qtmips")
+ (version "0.7.3")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cvut/QtMips")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1khvwgqz4h6q6mhbbq0yx43ajz8gx9wmwzs8784vmfrglndbxgax"))))
+ (build-system cmake-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (invoke "qmake"
+ (string-append "PREFIX=" (assoc-ref outputs "out"))
+ "qtmips.pro")))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (substitute* "tests/test.sh"
+ (("qtchooser.*") ""))
+ (substitute* '("tests/cpu_trap/test.sh"
+ "tests/registers/test.sh")
+ (("sub-qtmips_cli") "qtmips_cli"))
+ (if tests?
+ (invoke "tests/run-all.sh")
+ #t)))
+ (replace 'install
+ ;; There is no install target.
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin"))
+ (apps (string-append out "/share/applications"))
+ (icons (string-append out "/share/icons/hicolor")))
+ (install-file "qtmips_gui/qtmips_gui" bin)
+ (install-file "qtmips_cli/qtmips_cli" bin)
+ (install-file "data/qtmips.desktop" apps)
+ (install-file "data/icons/qtmips_gui.svg"
+ (string-append icons "/scalable/apps"))
+ (install-file "data/icons/qtmips_gui.png"
+ (string-append icons "/48x48/apps"))
+ #t))))
+ #:tests? #f)) ; test suite wants mips toolchain
+ (inputs
+ `(("elfutils" ,elfutils)
+ ("qtbase" ,qtbase)))
+ (home-page "https://github.com/cvut/QtMips")
+ (synopsis "MIPS CPU emulator")
+ (description "This package contains a MIPS CPU emulator. The simulator
+accepts ELF statically linked executables compiled for 32-bit big-endian
+MIPS target, targeting mips-linux-gnu or mips-elf.")
+ (license license:gpl2+))) ; License file says GPL3
+
(define-public emulation-station
;; No release for a long time, new commits fix build issues
(let ((commit "9cc42adff67946175d2b7e25c6ae69cc374e98a0")
--
2.28.0
M
M
Mathieu Othacehe wrote on 13 Aug 2020 15:07
(name . Efraim Flashner)(address . efraim@flashner.co.il)(address . 42843@debbugs.gnu.org)
87zh6yr8wk.fsf@gnu.org
Hello Efraim,

Toggle quote (4 lines)
> + (uri (git-reference
> + (url "https://github.com/cvut/QtMips")
> + (commit (string-append "v" version))))

Indentation is off here,

Toggle quote (4 lines)
> + (if tests?
> + (invoke "tests/run-all.sh")
> + #t)))

and here.

Otherwise, looks fine :)

Thanks,

Mathieu
E
E
Efraim Flashner wrote on 13 Aug 2020 18:10
(name . Mathieu Othacehe)(address . othacehe@gnu.org)(address . 42843-done@debbugs.gnu.org)
20200813161045.GF1228@E5400
Thanks for the review.

Patch pushed.


--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl81ZgQACgkQQarn3Mo9
g1FDTw//WuPNdUto3SrSa8DBsyu4JnBiflI0Db+u+P+OoNxdylXfwK0lMqrU3hxD
IY+ZHHLnAQiGC0ML2xoSmb/hPeSAczOQweiLJ2zbNrNX7RPZb3QbhNdsrQ0NB7u6
psNB1g1uCDTsJVQT4VdxR69JcowiXcw0T+NM+2fU2wItL8D4kOnatmnPiJflLoxQ
19PkSNZunPX9R9IRhIORDlnKjvWmxrhBExraSdjrBsAM9L6rCFFgsmtXUSvVxTDi
mO8N0dohNlHDIJyrQ3wc6wIZm3xtfFy0utIstao8/psVSxbbHc+wLZIkLl/jJwKS
mj9fsXkqj0RCcvYq6Ae2nodEDGDFGOes3bu/BcDIy5+hG0MPSQJDcAAbriLjcZS4
TjspckwRM5Hlsfc7nts7UphPM7N7xmkM+O562H3Jy0dijoxysPieqjfBIHDH6SGl
s9neXLDu+w0g6ibm5IyQKa53DFiIIAzE1DNiRovbrVDDpCQ4UFEzMChJvsKCtK53
ZOR5bSMsGlvOpWxxuciao65fm0RuEVptHs6sM7Rj7j00YNRmf1592rJ+i88pYFPg
nRhPV9IptPaEWmOSxUwjvo8vAughbsT8TWwwAyCtu/vTvF0bR65Jm4r1/Z6zGBD8
2i1uyj9V08kLztGTUdUYcdYU8Mth6cZjj9IINsOopRiIk/WuofQ=
=jAl6
-----END PGP SIGNATURE-----


Closed
?