Subject: [bug#76273] [PATCH v1 10/10] gnu: Add micro.

From: Ashvith Shetty <[email-masked]>
Date: Fri, 14 Feb 2025 10:29:04 +0530

From: Ashvith Shetty <[email-masked]>

* gnu/packages/text-editors.scm (micro): New variable.

Change-Id: I7dd8d7deffb5f1235f48759e73a15784570e782c
---
 gnu/packages/text-editors.scm | 49 +++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index f52bc092f1..6e48c0641b 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -35,6 +35,7 @@
 ;;; Copyright © 2024 Herman Rimm <[email-masked]>
 ;;; Copyright © 2024 Spencer King <[email-masked]>
 ;;; Copyright © 2024 Murilo <[email-masked]>
+;;; Copyright © 2025 Ashvith Shetty <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -61,6 +62,7 @@ (define-module (gnu packages text-editors)
   #:use-module (guix build-system cargo)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system go)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system meson)
   #:use-module (guix build-system python)
@@ -90,6 +92,9 @@ (define-module (gnu packages text-editors)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages golang-build)
+  #:use-module (gnu packages golang-check)
+  #:use-module (gnu packages golang-xyz)
   #:use-module (gnu packages graphics)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gtk)
@@ -1843,3 +1848,47 @@ (define-public xnedit
      "XNEdit is a fast and classic X11 text editor, based on NEdit,
 with full unicode support and antialiased text rendering.")
     (license license:gpl2+)))
+
+(define-public micro
+  (package
+    (name "micro")
+    (version "2.0.14")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/zyedidia/micro")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1pcfsaq7k6q59vh3xgh8gy350apkv5rkc09d4fh15lx7m6bxbwka"))))
+    (build-system go-build-system)
+    (arguments
+     (list
+      #:install-source? #f
+      #:import-path "github.com/zyedidia/micro/v2/cmd/micro"
+      #:unpack-path "github.com/zyedidia/micro/v2"))
+    (inputs (list go-github-com-layeh-gopher-luar
+                  go-github-com-zyedidia-go-runewidth
+                  go-github-com-zyedidia-go-shellquote
+                  go-gopkg-in-yaml-v2
+                  go-golang-org-x-text
+                  go-github-com-zyedidia-tcell-v2
+                  go-github-com-zyedidia-terminal
+                  go-github-com-zyedidia-json5
+                  go-github-com-zyedidia-glob
+                  go-github-com-zyedidia-clipper
+                  go-github-com-yuin-gopher-lua
+                  go-github-com-stretchr-testify
+                  go-github-com-sergi-go-diff
+                  go-github-com-mitchellh-go-homedir
+                  go-github-com-mattn-go-isatty
+                  go-github-com-go-errors-errors
+                  go-github-com-dustin-go-humanize
+                  go-github-com-blang-semver))
+    (home-page "https://github.com/zyedidia/micro")
+    (synopsis "A modern and intuitive terminal-based text editor")
+    (description
+     "@@strong{micro} is a terminal-based text editor that aims to be easy to use and
+intuitive, while also taking advantage of the capabilities of modern terminals.")
+    (license license:expat)))
-- 
2.48.1