all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#49942] [PATCH] gnu: Add shell-color-scripts
@ 2021-08-08 11:50 phodina via Guix-patches via
  2021-09-18  8:09 ` [bug#49942] Patch status phodina via Guix-patches via
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: phodina via Guix-patches via @ 2021-08-08 11:50 UTC (permalink / raw)
  To: 49942

* gnu/packages/terminals.scm (shell-color-scripts): New variable.

diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index 9377e5622b..c2028956fd 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -25,6 +25,7 @@
 ;;; Copyright © 2020 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2021 Ekaitz Zarraga <ekaitz@elenq.tech>
 ;;; Copyright © 2021 Raphaël Mélotte <raphael.melotte@mind.be>
+;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -45,6 +46,7 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix build-system cargo)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system go)
@@ -766,6 +768,36 @@ It's a terminal emulator with few dependencies, so you don't need a full GNOME
 desktop installed to have a decent terminal emulator.")
     (license license:gpl2)))

+(define-public shell-color-scripts
+ (package
+  (name "colorscript")
+  (version "3dbdfac24bb629238fdc3e1c8909e2c8577f8735") ; no tags
+  (source (origin
+            (method git-fetch)
+            (uri (git-reference
+                   (url "https://gitlab.com/dwt1/shell-color-scripts")
+                   (commit version)))
+            (file-name (git-file-name name version))
+            (sha256
+             (base32
+              "0lkiz6fkrqryr1vh0lh067q7hp8ba8887pkk8caipqphjswp2z16"))))
+  (build-system copy-build-system)
+  (arguments
+    `(#:install-plan '(("colorscript.sh" "bin/colorscript.sh")
+                       ("colorscripts" "colorscripts"))
+      #:phases
+      (modify-phases %standard-phases
+        (add-after 'unpack 'fix-colorscipts-location
+          (lambda* (#:key outputs #:allow-other-keys)
+            (substitute* "colorscript.sh"
+              (("/opt/shell-color-scripts/colorscripts")
+               (string-append (assoc-ref outputs "out") "/colorscripts"))))))))
+  (inputs `(("ncurses" ,ncurses)))
+  (synopsis "Collection of terminal color scripts")
+  (description "Collection of terminal color scripts")
+  (home-page "https://gitlab.com/dwt1/shell-color-scripts")
+  (license license:expat))) ; MIT
+
 (define-public go-github.com-nsf-termbox-go
   (let ((commit "288510b9734e30e7966ec2f22b87c5f8e67345e3")
         (revision "1"))
--
2.32.0




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#49942] Patch status
  2021-08-08 11:50 [bug#49942] [PATCH] gnu: Add shell-color-scripts phodina via Guix-patches via
@ 2021-09-18  8:09 ` phodina via Guix-patches via
  2021-09-18 13:09 ` [bug#49942] [PATCH] gnu: Add shell-color-scripts Maxime Devos
  2021-09-18 14:10 ` [bug#49942] [PATCH v2] " phodina via Guix-patches via
  2 siblings, 0 replies; 4+ messages in thread
From: phodina via Guix-patches via @ 2021-09-18  8:09 UTC (permalink / raw)
  To: 49942@debbugs.gnu.org

[-- Attachment #1: Type: text/plain, Size: 60 bytes --]

Hi!
Is there anything to be improved to upstream this patch?

[-- Attachment #2: Type: text/html, Size: 1675 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#49942] [PATCH] gnu: Add shell-color-scripts
  2021-08-08 11:50 [bug#49942] [PATCH] gnu: Add shell-color-scripts phodina via Guix-patches via
  2021-09-18  8:09 ` [bug#49942] Patch status phodina via Guix-patches via
@ 2021-09-18 13:09 ` Maxime Devos
  2021-09-18 14:10 ` [bug#49942] [PATCH v2] " phodina via Guix-patches via
  2 siblings, 0 replies; 4+ messages in thread
From: Maxime Devos @ 2021-09-18 13:09 UTC (permalink / raw)
  To: phodina, 49942

[-- Attachment #1: Type: text/plain, Size: 1933 bytes --]

Hi,

> +(define-public shell-color-scripts
> + (package
> +  (name "colorscript")
> +  (version "3dbdfac24bb629238fdc3e1c8909e2c8577f8735") ; no tags
> +  (source (origin
> +            (method git-fetch)
> +            (uri (git-reference
> +                   (url "https://gitlab.com/dwt1/shell-color-scripts")
> +                   (commit version)))
> +            (file-name (git-file-name name version))
> +            (sha256
> +             (base32
> +              "0lkiz6fkrqryr1vh0lh067q7hp8ba8887pkk8caipqphjswp2z16"))))
> +  (build-system copy-build-system)
> +  (arguments
> +    `(#:install-plan '(("colorscript.sh" "bin/colorscript.sh")
> +                       ("colorscripts" "colorscripts"))
> +      #:phases
> +      (modify-phases %standard-phases
> +        (add-after 'unpack 'fix-colorscipts-location
> +          (lambda* (#:key outputs #:allow-other-keys)
> +            (substitute* "colorscript.sh"
> +              (("/opt/shell-color-scripts/colorscripts")
> +               (string-append (assoc-ref outputs "out") "/colorscripts"))))))))
> +  (inputs `(("ncurses" ,ncurses)))

Missing: 'awk', 'sed' and 'coreugils'.
The colorscript.sh needs some ‘absolutification’, e.g. using 'substitute*',
to refer to awk, sed, tr, wc ... by their absolute path instead of using
whatever is in the profile.

Some script in ‘colorscripts’ may need changes as well

> +  (synopsis "Collection of terminal color scripts")
> +  (description "Collection of terminal color scripts")
> +  (home-page "https://gitlab.com/dwt1/shell-color-scripts")
> +  (license license:expat))) ; MIT

"; MIT" isn't necessary, as license:expat is unambigious,
whereas MIT is sometimes used for the X11 license and can theoretically
refer to any license ever used by MIT.  (Though in practice ‘the MIT license’
either refers to the X11 or the expat license.)

Greetings,
Maxime

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#49942] [PATCH v2] gnu: Add shell-color-scripts.
  2021-08-08 11:50 [bug#49942] [PATCH] gnu: Add shell-color-scripts phodina via Guix-patches via
  2021-09-18  8:09 ` [bug#49942] Patch status phodina via Guix-patches via
  2021-09-18 13:09 ` [bug#49942] [PATCH] gnu: Add shell-color-scripts Maxime Devos
@ 2021-09-18 14:10 ` phodina via Guix-patches via
  2 siblings, 0 replies; 4+ messages in thread
From: phodina via Guix-patches via @ 2021-09-18 14:10 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 49942

Hi Maxime,

thanks for hints on improvements!

--8<---------------cut here---------------start------------->8--

* gnu/packages/terminals.scm (shell-color-scripts): New variable.

diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index de9bec9e66..d7e3199606 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -27,6 +27,7 @@
 ;;; Copyright © 2021 Raphaël Mélotte <raphael.melotte@mind.be>
 ;;; Copyright © 2021 ikasero <ahmed@ikasero.com>
 ;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
+;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -47,6 +48,7 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix build-system cargo)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system go)
@@ -58,6 +60,7 @@
   #:use-module (guix utils)
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages base)
   #:use-module (gnu packages build-tools)   ;for meson-0.55
   #:use-module (gnu packages check)
   #:use-module (gnu packages cmake)
@@ -69,6 +72,7 @@
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages fribidi)
+  #:use-module (gnu packages gawk)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages ghostscript)
   #:use-module (gnu packages gl)
@@ -810,6 +814,57 @@ It's a terminal emulator with few dependencies, so you don't need a full GNOME
 desktop installed to have a decent terminal emulator.")
     (license license:gpl2)))

+(define-public shell-color-scripts
+  (let ((commit "3dbdfac24bb629238fdc3e1c8909e2c8577f8735")
+        (revision "1"))
+    (package
+      (name "colorscript")
+      (version commit)
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://gitlab.com/dwt1/shell-color-scripts")
+                      (commit version)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "0lkiz6fkrqryr1vh0lh067q7hp8ba8887pkk8caipqphjswp2z16"))))
+      (build-system copy-build-system)
+      (arguments
+       `(#:install-plan '(("colorscript.sh" "bin/colorscript.sh")
+                          ("colorscripts" "colorscripts"))
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'fix-colorscipts-location
+             (lambda* (#:key outputs #:allow-other-keys)
+               (substitute* "colorscript.sh"
+                 (("/opt/shell-color-scripts/colorscripts")
+                  (string-append (assoc-ref outputs "out") "/colorscripts"))
+                 (("sed") (string-append
+                            (assoc-ref %build-inputs "sed") "/bin/sed"))
+                 (("awk") (string-append
+                            (assoc-ref %build-inputs "gawk") "/bin/awk"))
+                 (("wc") (string-append
+                           (assoc-ref %build-inputs "coreutils") "/bin/wc"))
+                 (("nl") (string-append
+                           (assoc-ref %build-inputs "coreutils") "/bin/nl"))
+                 (("cut") (string-append
+                            (assoc-ref %build-inputs "coreutils") "/bin/cut"))
+                 (("echo") (string-append
+                            (assoc-ref %build-inputs "coreutils") "/bin/echo"))
+                 (("printf") (string-append
+                    (assoc-ref %build-inputs "coreutils") "/bin/printf"))
+                 (("tr") (string-append
+                    (assoc-ref %build-inputs "coreutils") "/bin/tr"))))))))
+      (inputs `(("ncurses" ,ncurses)
+                ("gawk" ,gawk)
+                ("sed" ,sed)
+                ("coreutils" ,coreutils)))
+      (synopsis "Collection of terminal color scripts")
+      (description "Collection of terminal color scripts")
+      (home-page "https://gitlab.com/dwt1/shell-color-scripts")
+      (license license:expat))))
+
 (define-public go-github.com-nsf-termbox-go
   (let ((commit "288510b9734e30e7966ec2f22b87c5f8e67345e3")
         (revision "1"))
--
2.32.0




^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-09-18 14:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-08 11:50 [bug#49942] [PATCH] gnu: Add shell-color-scripts phodina via Guix-patches via
2021-09-18  8:09 ` [bug#49942] Patch status phodina via Guix-patches via
2021-09-18 13:09 ` [bug#49942] [PATCH] gnu: Add shell-color-scripts Maxime Devos
2021-09-18 14:10 ` [bug#49942] [PATCH v2] " phodina via Guix-patches via

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.