guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#62324] [PATCH] gnu: Add emu8051.


From: c4droid
Subject: [bug#62324] [PATCH] gnu: Add emu8051.
Date: Fri, 31 Mar 2023 14:48:42 +0800
User-agent: mu4e 1.8.13; emacs 28.2

>From a9f8f4e71dc5270ab7cbfd6da74a3fc7b304e5b6 Mon Sep 17 00:00:00 2001
From: c4droid <c4droid@foxmail.com>
Date: Fri, 31 Mar 2023 14:46:50 +0800
Subject: [PATCH] [PATCH] gnu: Add emu8051.

---
 gnu/packages/embedded.scm | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index 8d854c7..653e02a 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2021 Morgan Smith <Morgan.J.Smith@outlook.com>
 ;;; Copyright © 2022 Mathieu Othacehe <othacehe@gnu.org>
 ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2023 c4droid <c4droid@foxmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1747,3 +1748,41 @@ (define-public ts4900-utils
 @item tssilomon
 @end itemize")
       (license license:bsd-2))))
+
+(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.comjarikomppa/emu8051";)
+      (synopsis "8051/8052 emulator with curses-based UI")
+      (description "emu8051 is a simulator of the 8051/8052 microcontrollers.")
+      (license license:expat))))
-- 
2.39.2






reply via email to

[Prev in Thread] Current Thread [Next in Thread]