aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorc4droid <c4droid@foxmail.com>2023-03-31 14:46:50 +0800
committer宋文武 <iyzsong@member.fsf.org>2023-03-31 19:31:47 +0800
commit1c6238794b0058003fa6c827ca0d039764ebe699 (patch)
treef6e50a1b865ab0b7bfab144105bedda7413e2455 /gnu
parenta368e3cf6b38022aaedb21760c1c65e92b1fd227 (diff)
downloadguix-1c6238794b0058003fa6c827ca0d039764ebe699.tar.gz
guix-1c6238794b0058003fa6c827ca0d039764ebe699.zip
gnu: Add emu8051.
* gnu/packages/emulators.scm (emu8051): New variable. Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/emulators.scm40
1 files changed, 40 insertions, 0 deletions
diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index 166c3b4ec6..7e73b217ea 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -17,6 +17,7 @@
;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2023 c4droid <c4droid@foxmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2580,3 +2581,42 @@ on a Commodore C64, C128 etc.")
"This package provides an assembler and emulator for the Uxn
stack-machine, written in ANSI C. Graphical output is implemented using SDL2.")
(license license:expat))))
+
+(define-public emu8051
+ (let ((commit "5dc681275151c4a5d7b85ec9ff4ceb1b25abd5a8")
+ (revision "1"))
+ (package
+ (name "emu8051")
+ (version (git-version "0.1" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/jarikomppa/emu8051")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1xxmkcwvd5fjnhwbricafg4xvxvr8dxhfanyfp4rbksw37dgk2fx"))
+ (modules '((guix build utils)))
+ (snippet #~(begin
+ ;; Replace LDFLAGS -lcurses to -lncurses
+ (substitute* "Makefile"
+ (("-lcurses") "-lncurses"))))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:tests? #f ;No test suite
+ #:make-flags #~(list (string-append "CC="
+ #$(cc-for-target)))
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure) ;No ./configure script
+ (replace 'install
+ ;; No installation procedure
+ (lambda _
+ (install-file "emu"
+ (string-append #$output "/bin")))))))
+ (inputs (list ncurses))
+ (home-page "https://github.com/jarikomppa/emu8051")
+ (synopsis "8051/8052 emulator with curses-based UI")
+ (description "emu8051 is a simulator of the 8051/8052 microcontrollers.")
+ (license license:expat))))