all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#49576] [PATCH] Add sterm
@ 2021-07-15 16:17 phodina via Guix-patches via
  2021-07-16 13:03 ` 宋文武
  0 siblings, 1 reply; 6+ messages in thread
From: phodina via Guix-patches via @ 2021-07-15 16:17 UTC (permalink / raw)
  To: 49576

---
index 4429a2b75a..a6f866cbea 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -24,6 +24,7 @@
 ;;; Copyright © 2021 qblade <qblade@protonmail.com>
 ;;; Copyright © 2021 Gerd Heber <gerd.heber@gmail.com>
 ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1297,6 +1298,35 @@ replacement for the OpenDWG libraries.")
     (description "@code{minicom} is a serial terminal emulator.")
     (license license:gpl2+)))

+(define-public sterm
+(package
+  (name "sterm")
+  (version "20200306")
+  (source (origin
+            (method git-fetch)
+            (uri
+	      (git-reference
+		(url "https://github.com/wentasah/sterm")
+		(commit version)))
+            (sha256
+             (base32
+              "031pd8yz2bfzqbari6za1c3xcqmw94ap4vbrjzb3v6izjcrca58c"))))
+  (build-system gnu-build-system)
+  (arguments
+    '(#:tests? #f
+      #:make-flags (list "PREFIX=$out" "CC=gcc")
+      #:phases (modify-phases %standard-phases
+		(delete 'configure)
+		(replace 'install
+		  (lambda* (#:key outputs #:allow-other-keys)
+			  (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
+			    (install-file "sterm" bin)
+			    #t))))))
+  (synopsis "Simple serial terminal")
+  (description "This is a minimalist terminal program like minicom or cu. The only thing it does is creating a bidirectional connection between stdin/stdout and a terminal device (e.g. serial line). It can also set serial line baudrate, manipulate DTR/RTS modem lines, send break and throttle transmission speed.")
+  (home-page "https://github.com/wentasah/sterm")
+  (license #f)))
+
 (define-public harminv
   (package
     (name "harminv")
--
2.31.1




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

* [bug#49576] [PATCH] Add sterm
  2021-07-15 16:17 [bug#49576] [PATCH] Add sterm phodina via Guix-patches via
@ 2021-07-16 13:03 ` 宋文武
  2021-07-17 10:50   ` phodina via Guix-patches via
  0 siblings, 1 reply; 6+ messages in thread
From: 宋文武 @ 2021-07-16 13:03 UTC (permalink / raw)
  To: phodina; +Cc: 49576

Hello!

phodina <phodina@protonmail.com> writes:
> ---
> index 4429a2b75a..a6f866cbea 100644
> --- a/gnu/packages/engineering.scm
> +++ b/gnu/packages/engineering.scm
> @@ -24,6 +24,7 @@
>  ;;; Copyright © 2021 qblade <qblade@protonmail.com>
>  ;;; Copyright © 2021 Gerd Heber <gerd.heber@gmail.com>
>  ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
> +;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -1297,6 +1298,35 @@ replacement for the OpenDWG libraries.")
>      (description "@code{minicom} is a serial terminal emulator.")
>      (license license:gpl2+)))
>
> +(define-public sterm
> +(package
> +  (name "sterm")
> +  (version "20200306")
> +  (source (origin
> +            (method git-fetch)
> +            (uri
> +	      (git-reference
> +		(url "https://github.com/wentasah/sterm")
> +		(commit version)))
The indention seems wrong here, we usually use:
--8<---------------cut here---------------start------------->8---
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "...")
                    (commit ...)))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "..."))))
--8<---------------cut here---------------end--------------->8---
Also a 'file-name' field is needed to get a better store directory name
for the checkout.

> +            (sha256
> +             (base32
> +              "031pd8yz2bfzqbari6za1c3xcqmw94ap4vbrjzb3v6izjcrca58c"))))
> +  (build-system gnu-build-system)
> +  (arguments
> +    '(#:tests? #f

When disable tests, we should add a comment, a simple "no tests" will
do.

> +      #:make-flags (list "PREFIX=$out" "CC=gcc")

I think "PREFIX=$out" is no effect here, also instead of 'gcc' you can
use 'cc-for-target' for cross-compile support, examples can be found in
suckless.scm:
--8<---------------cut here---------------start------------->8---
       #:make-flags
       (list (string-append "CC=" ,(cc-for-target))
             (string-append "PREFIX=" %output))
--8<---------------cut here---------------end--------------->8---

> +      #:phases (modify-phases %standard-phases
> +		(delete 'configure)
> +		(replace 'install
> +		  (lambda* (#:key outputs #:allow-other-keys)
> +			  (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
> +			    (install-file "sterm" bin)
> +			    #t))))))

Doesn't the builtin Makefile works?  It also install a man page and
shell completion files.

> +  (synopsis "Simple serial terminal")
> +  (description "This is a minimalist terminal program like minicom or cu. The only thing it does is creating a bidirectional connection between stdin/stdout and a terminal device (e.g. serial line). It can also set serial line baudrate, manipulate DTR/RTS modem lines, send break and throttle transmission speed.")

Please keep lines below 80 characters, and use two spaces between
the two sentences.

> +  (home-page "https://github.com/wentasah/sterm")
> +  (license #f)))
According to the files, the license is GPLv3+.


Could you send an update patch?  Thank you!




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

* [bug#49576] [PATCH] Add sterm
  2021-07-16 13:03 ` 宋文武
@ 2021-07-17 10:50   ` phodina via Guix-patches via
  2021-07-17 11:41     ` Tobias Geerinckx-Rice via Guix-patches via
  0 siblings, 1 reply; 6+ messages in thread
From: phodina via Guix-patches via @ 2021-07-17 10:50 UTC (permalink / raw)
  To: 49576

Hi iyzsong!

here is the patch with the changes as you suggested.

> Doesn't the builtin Makefile works? It also install a man page and
>
> shell completion files.

Unfortunately, the Makefile tries to install the binary under /usr

> I think "PREFIX=$out" is no effect here, also instead of 'gcc' you can
>
> use 'cc-for-target' for cross-compile support, examples can be found in
>
> suckless.scm:

I made the changes as you suggested but now I get the error due to 'cc-for-target':

/gnu/store/gqp3fqgb9h5l7ibzvsnqkv6gahy3r97i-sterm-20200306-guile-builder:1:2534: unquote: expression not valid outside of quasiquote in form (unquote (cc-for-target))

Could you help me fix that? Thanks

---
index 4429a2b75a..4ffb6060fe 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1297,6 +1297,36 @@ replacement for the OpenDWG libraries.")
     (description "@code{minicom} is a serial terminal emulator.")
     (license license:gpl2+)))

+(define-public sterm
+(package
+  (name "sterm")
+  (version "20200306")
+  (source (origin
+            (method git-fetch)
+            (uri (git-reference
+		  (url "https://github.com/wentasah/sterm")
+		  (commit version)))
+	    (file-name (git-file-name name version))
+            (sha256
+             (base32
+              "031pd8yz2bfzqbari6za1c3xcqmw94ap4vbrjzb3v6izjcrca58c"))))
+  (build-system gnu-build-system)
+  (arguments
+    '(#:tests? #f ; no tests
+      #:make-flags
+       (list (string-append "CC=" ,(cc-for-target))
+             (string-append "PREFIX=" %output))
+      #:phases
+      (modify-phases %standard-phases (delete 'configure))))
+  (synopsis "Simple serial terminal")
+  (description "This is a minimalist terminal program like minicom or cu.
+The only thing it does is creating a bidirectional connection between
+stdin/stdout and a terminal device (e.g. serial line).
+It can also set serial line baudrate, manipulate DTR/RTS modem lines,
+send break and throttle transmission speed.")
+  (home-page "https://github.com/wentasah/sterm")
+  (license license:gpl3+)))
+
 (define-public harminv
   (package
     (name "harminv")
--
2.31.1

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Friday, July 16th, 2021 at 3:03 PM, 宋文武 <iyzsong@outlook.com> wrote:

> Hello!
>
> phodina phodina@protonmail.com writes:
>
> > index 4429a2b75a..a6f866cbea 100644
> >
> > --- a/gnu/packages/engineering.scm
> >
> > +++ b/gnu/packages/engineering.scm
> >
> > @@ -24,6 +24,7 @@
> >
> > ;;; Copyright © 2021 qblade qblade@protonmail.com
> >
> > ;;; Copyright © 2021 Gerd Heber gerd.heber@gmail.com
> >
> > ;;; Copyright © 2021 Guillaume Le Vaillant glv@posteo.net
> >
> > +;;; Copyright © 2021 Petr Hodina phodina@protonmail.com
> >
> > ;;;
> >
> > ;;; This file is part of GNU Guix.
> >
> > ;;;
> >
> > @@ -1297,6 +1298,35 @@ replacement for the OpenDWG libraries.")
> >
> > (description "@code{minicom} is a serial terminal emulator.")
> >
> > (license license:gpl2+)))
> >
> > +(define-public sterm
> >
> > +(package
> >
> > -   (name "sterm")
> > -   (version "20200306")
> > -   (source (origin
> > -              (method git-fetch)
> >
> >
> > -              (uri
> >
> >
> > -         (git-reference
> >
> >
> > -       (url "https://github.com/wentasah/sterm")
> >
> >
> > -       (commit version)))
> >
> >
>
> The indention seems wrong here, we usually use:
>
> --8<---------------cut here---------------start------------->8---
>
>     (source (origin
>               (method git-fetch)
>               (uri (git-reference
>                     (url "...")
>                     (commit ...)))
>               (file-name (git-file-name name version))
>               (sha256
>                (base32
>                 "..."))))
>
>
> --8<---------------cut here---------------end--------------->8---
>
> Also a 'file-name' field is needed to get a better store directory name
>
> for the checkout.
>
> > -              (sha256
> >
> >
> > -               (base32
> >
> >
> > -                "031pd8yz2bfzqbari6za1c3xcqmw94ap4vbrjzb3v6izjcrca58c"))))
> >
> >
> > -   (build-system gnu-build-system)
> > -   (arguments
> > -   '(#:tests? #f
>
> When disable tests, we should add a comment, a simple "no tests" will
>
> do.
>
> > -        #:make-flags (list "PREFIX=$out" "CC=gcc")
> >
> >
>
> I think "PREFIX=$out" is no effect here, also instead of 'gcc' you can
>
> use 'cc-for-target' for cross-compile support, examples can be found in
>
> suckless.scm:
>
> --8<---------------cut here---------------start------------->8---
>
>        #:make-flags
>        (list (string-append "CC=" ,(cc-for-target))
>              (string-append "PREFIX=" %output))
>
>
> --8<---------------cut here---------------end--------------->8---
>
> > -        #:phases (modify-phases %standard-phases
> >
> >
> > -       (delete 'configure)
> >
> >
> > -       (replace 'install
> >
> >
> > -         (lambda* (#:key outputs #:allow-other-keys)
> >
> >
> > -       	  (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
> >
> >
> > -       	    (install-file "sterm" bin)
> >
> >
> > -       	    #t))))))
> >
> >
>
> Doesn't the builtin Makefile works? It also install a man page and
>
> shell completion files.
>
> > -   (synopsis "Simple serial terminal")
> > -   (description "This is a minimalist terminal program like minicom or cu. The only thing it does is creating a bidirectional connection between stdin/stdout and a terminal device (e.g. serial line). It can also set serial line baudrate, manipulate DTR/RTS modem lines, send break and throttle transmission speed.")
>
> Please keep lines below 80 characters, and use two spaces between
>
> the two sentences.
>
> > -   (home-page "https://github.com/wentasah/sterm")
> > -   (license #f)))
>
> According to the files, the license is GPLv3+.
>
> Could you send an update patch? Thank you!




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

* [bug#49576] [PATCH] Add sterm
  2021-07-17 10:50   ` phodina via Guix-patches via
@ 2021-07-17 11:41     ` Tobias Geerinckx-Rice via Guix-patches via
  2021-07-17 12:08       ` phodina via Guix-patches via
  0 siblings, 1 reply; 6+ messages in thread
From: Tobias Geerinckx-Rice via Guix-patches via @ 2021-07-17 11:41 UTC (permalink / raw)
  To: phodina; +Cc: 49576

Petr,

[Hm, PREFIX=$out... Nixer? Welcome ;-]

On 2021-07-17 12:50, phodina via Guix-patches via wrote:
> I made the changes as you suggested but now I get the error due to
> 'cc-for-target':
> 
> /gnu/store/gqp3fqgb9h5l7ibzvsnqkv6gahy3r97i-sterm-20200306-guile-builder:1:2534:
> unquote: expression not valid outside of quasiquote in form (unquote
> (cc-for-target))

[...]

> +       (list (string-append "CC=" ,(cc-for-target))
                                      ^
This , is the 'unquote' from the error message, and a quasiquote would 
be...

> +    `(#:tests? #f ; no tests
        ^
...this.  Whilst this is a regular, boring, non-Chad quote:

> +    '(#:tests? #f ; no tests
        ^
Unquote 'escapes' from one level of quoting, but only if the surrounding 
expression is quasiquoted.

Kind regards,

T G-R

Sent from a Web browser. Excuse or enjoy my brevity.




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

* [bug#49576] [PATCH] Add sterm
  2021-07-17 11:41     ` Tobias Geerinckx-Rice via Guix-patches via
@ 2021-07-17 12:08       ` phodina via Guix-patches via
  2021-07-18  9:42         ` bug#49576: " 宋文武
  0 siblings, 1 reply; 6+ messages in thread
From: phodina via Guix-patches via @ 2021-07-17 12:08 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: 49576

Thanks Tobias. Now it builds without errors.

Yes, I used Nix.

Here's the updated patch:
---
index 4429a2b75a..e0eb92967c 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1297,6 +1297,36 @@ replacement for the OpenDWG libraries.")
     (description "@code{minicom} is a serial terminal emulator.")
     (license license:gpl2+)))

+(define-public sterm
+(package
+  (name "sterm")
+  (version "20200306")
+  (source (origin
+            (method git-fetch)
+            (uri (git-reference
+                  (url "https://github.com/wentasah/sterm")
+                  (commit version)))
+            (file-name (git-file-name name version))
+            (sha256
+             (base32
+              "031pd8yz2bfzqbari6za1c3xcqmw94ap4vbrjzb3v6izjcrca58c"))))
+  (build-system gnu-build-system)
+  (arguments
+    `(#:tests? #f ; no tests
+      #:make-flags
+       (list (string-append "CC=" ,(cc-for-target))
+             (string-append "PREFIX=" %output))
+      #:phases
+      (modify-phases %standard-phases (delete 'configure))))
+  (synopsis "Simple serial terminal")
+  (description "This is a minimalist terminal program like minicom or cu.
+The only thing it does is creating a bidirectional connection between
+stdin/stdout and a terminal device (e.g. serial line).
+It can also set serial line baudrate, manipulate DTR/RTS modem lines,
+send break and throttle transmission speed.")
+  (home-page "https://github.com/wentasah/sterm")
+  (license license:gpl3+)))
+
 (define-public harminv
   (package
     (name "harminv")
--
2.31.1




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

* bug#49576: [PATCH] Add sterm
  2021-07-17 12:08       ` phodina via Guix-patches via
@ 2021-07-18  9:42         ` 宋文武
  0 siblings, 0 replies; 6+ messages in thread
From: 宋文武 @ 2021-07-18  9:42 UTC (permalink / raw)
  To: phodina; +Cc: 49576-done, Tobias Geerinckx-Rice

phodina <phodina@protonmail.com> writes:

> Thanks Tobias. Now it builds without errors.
>
> Yes, I used Nix.
>
> Here's the updated patch:
> [...]

Pushed, thank you and Tobias!




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

end of thread, other threads:[~2021-07-18  9:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-15 16:17 [bug#49576] [PATCH] Add sterm phodina via Guix-patches via
2021-07-16 13:03 ` 宋文武
2021-07-17 10:50   ` phodina via Guix-patches via
2021-07-17 11:41     ` Tobias Geerinckx-Rice via Guix-patches via
2021-07-17 12:08       ` phodina via Guix-patches via
2021-07-18  9:42         ` bug#49576: " 宋文武

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.