* [bug#49929] [PATCH] gnu: Add gmid.
@ 2021-08-07 18:23 cage
2022-02-24 4:33 ` Maxim Cournoyer
0 siblings, 1 reply; 5+ messages in thread
From: cage @ 2021-08-07 18:23 UTC (permalink / raw)
To: 49929
---
gnu/packages/networking.scm | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 05fd092b23..0ea07f0f15 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -44,6 +44,7 @@
;;; Copyright © 2021 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;; Copyright © 2021 Justin Veilleux <terramorpha@cock.li>
;;; Copyright © 2021 Vinicius Monego <monego@posteo.net>
+;;; Copyright © 2021 cage <cage-dev@twistfold.it>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -4177,3 +4178,38 @@ public key authentication and Kerberos single-sign-on. It also includes
command-line @acronym{SFTP} and @acronym{SCP} implementations.")
(home-page "https://www.chiark.greenend.org.uk/~sgtatham/putty/")
(license license:expat)))
+
+(define-public gmid
+ (package
+ (name "gmid")
+ (version "1.7.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/omar-polo/gmid/releases/download/"
+ version "/gmid-" version ".tar.gz"))
+ (sha256
+ (base32 "0ag5zcwnr5vmy13bc9c36hnv9pflks68b0k6w0ng97inrm37klis"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ;no tests
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ ;; The configure script is hand-written, not from GNU autotools.
+ (lambda* (#:key configure-flags inputs outputs #:allow-other-keys)
+ (let ((prefix (string-append "PREFIX=" (assoc-ref outputs "out"))))
+ (setenv "CC" ,(cc-for-target))
+ (apply invoke "./configure" (list prefix))
+ #t))))))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("bison" ,bison)
+ ("flex" ,flex)))
+ (inputs
+ `(("libevent" ,libevent)
+ ("libressl" ,libressl)))
+ (home-page "https://git.omarpolo.com/gmid/about/")
+ (synopsis "Simple and secure Gemini server")
+ (description "Gmid is a fast Gemini server written with security in mind.")
+ (license license:x11)))
--
2.32.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#49929] [PATCH] gnu: Add gmid.
2021-08-07 18:23 [bug#49929] [PATCH] gnu: Add gmid cage
@ 2022-02-24 4:33 ` Maxim Cournoyer
2022-02-26 15:53 ` cage
0 siblings, 1 reply; 5+ messages in thread
From: Maxim Cournoyer @ 2022-02-24 4:33 UTC (permalink / raw)
To: cage; +Cc: 49929
tags 49929 moreinfo
--
Hello!
cage <cage-dev@twistfold.it> writes:
> ---
> gnu/packages/networking.scm | 36 ++++++++++++++++++++++++++++++++++++
> 1 file changed, 36 insertions(+)
>
> diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
> index 05fd092b23..0ea07f0f15 100644
> --- a/gnu/packages/networking.scm
> +++ b/gnu/packages/networking.scm
> @@ -44,6 +44,7 @@
> ;;; Copyright © 2021 Hartmut Goebel <h.goebel@crazy-compilers.com>
> ;;; Copyright © 2021 Justin Veilleux <terramorpha@cock.li>
> ;;; Copyright © 2021 Vinicius Monego <monego@posteo.net>
> +;;; Copyright © 2021 cage <cage-dev@twistfold.it>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -4177,3 +4178,38 @@ public key authentication and Kerberos single-sign-on. It also includes
> command-line @acronym{SFTP} and @acronym{SCP} implementations.")
> (home-page "https://www.chiark.greenend.org.uk/~sgtatham/putty/")
> (license license:expat)))
> +
> +(define-public gmid
> + (package
> + (name "gmid")
> + (version "1.7.2")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append "https://github.com/omar-polo/gmid/releases/download/"
> + version "/gmid-" version ".tar.gz"))
> + (sha256
> + (base32 "0ag5zcwnr5vmy13bc9c36hnv9pflks68b0k6w0ng97inrm37klis"))))
> + (build-system gnu-build-system)
> + (arguments
> + `(#:tests? #f ;no tests
Apparently, the Makefile has a 'regress' target [0] to run a test suite
(the project has a CI enabled, in doubt you can refer to their CI
recipe).
[0] https://github.com/omar-polo/gmid/blob/master/Makefile
> + #:phases
> + (modify-phases %standard-phases
> + (replace 'configure
> + ;; The configure script is hand-written, not from GNU autotools.
> + (lambda* (#:key configure-flags inputs outputs #:allow-other-keys)
> + (let ((prefix (string-append "PREFIX=" (assoc-ref outputs "out"))))
> + (setenv "CC" ,(cc-for-target))
> + (apply invoke "./configure" (list prefix))
> + #t))))))
Ending phases by #t is obsolete (you can drop it), and you can more
simply write (invoke "./configure" (string-append #$output)), as long as
you replace the backquoted arguments list by a simple (list ...) and
define the phases as a G-exp, e.g.: #~(modify-phases [...])
> + (native-inputs
> + `(("pkg-config" ,pkg-config)
> + ("bison" ,bison)
> + ("flex" ,flex)))
> + (inputs
> + `(("libevent" ,libevent)
> + ("libressl" ,libressl)))
You can use the new style for inputs, as explained in this blog post [1]
[1] https://guix.gnu.org/en/blog/2021/the-big-change/
> + (home-page "https://git.omarpolo.com/gmid/about/")
> + (synopsis "Simple and secure Gemini server")
> + (description "Gmid is a fast Gemini server written with security in mind.")
> + (license license:x11)))
The rest looks good to me, well done!
Could you send an update with changes along these lines?
Thank you,
Maxim
^ permalink raw reply [flat|nested] 5+ messages in thread
* [bug#49929] [PATCH] gnu: Add gmid.
2022-02-24 4:33 ` Maxim Cournoyer
@ 2022-02-26 15:53 ` cage
2022-02-27 4:50 ` bug#49929: " Maxim Cournoyer
0 siblings, 1 reply; 5+ messages in thread
From: cage @ 2022-02-26 15:53 UTC (permalink / raw)
To: Maxim Cournoyer; +Cc: 49929, cage
On Wed, Feb 23, 2022 at 11:33:59PM -0500, Maxim Cournoyer wrote:
Hi!
Thanks for your feedback!
[...]
> The rest looks good to me, well done!
> Could you send an update with changes along these lines?
Here is my best attempt to fix the definition form following your
advice; i have enabled the 'check' phase and removed the backtick
notation. I was not able to update the call to 'invoke', because
-honestly- i was not able to wrap my head around g-expr. I hope the
results are acceptable by the way! :)
Bye and thanks again!
C.
---
gnu/packages/networking.scm | 38 +++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 11f1cad007..49776fd666 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -48,6 +48,7 @@
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2022 Simon South <simon@simonsouth.net>
+;;; Copyright © 2022 cage <cage-dev@twistfold.it>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -4196,3 +4197,40 @@ (define-public putty
implementations.")
(home-page "https://www.chiark.greenend.org.uk/~sgtatham/putty/")
(license license:expat)))
+
+(define-public gmid
+ (package
+ (name "gmid")
+ (version "1.7.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/omar-polo/gmid/releases/download/"
+ version "/gmid-" version ".tar.gz"))
+ (sha256
+ (base32 "0ag5zcwnr5vmy13bc9c36hnv9pflks68b0k6w0ng97inrm37klis"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:test-target "regress"
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'configure
+ ;; The configure script is hand-written, not from GNU autotools.
+ (lambda* (#:key configure-flags inputs outputs #:allow-other-keys)
+ (let ((prefix (string-append "PREFIX=" (assoc-ref outputs "out"))))
+ (setenv "CC" #$(cc-for-target))
+ (apply invoke "./configure" (list prefix))))))))
+ (native-inputs
+ (list pkg-config
+ bison
+ flex
+ coreutils
+ which
+ procps))
+ (inputs
+ (list libevent
+ libressl))
+ (home-page "https://git.omarpolo.com/gmid/about/")
+ (synopsis "Simple and secure Gemini server")
+ (description "Gmid is a fast Gemini server written with security in mind.")
+ (license license:x11)))
--
2.34.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* bug#49929: [PATCH] gnu: Add gmid.
2022-02-26 15:53 ` cage
@ 2022-02-27 4:50 ` Maxim Cournoyer
2022-02-27 12:06 ` [bug#49929] " cage
0 siblings, 1 reply; 5+ messages in thread
From: Maxim Cournoyer @ 2022-02-27 4:50 UTC (permalink / raw)
To: cage; +Cc: 49929-done
Hello!
cage <cage-dev@twistfold.it> writes:
> On Wed, Feb 23, 2022 at 11:33:59PM -0500, Maxim Cournoyer wrote:
>
> Hi!
>
> Thanks for your feedback!
>
> [...]
>
>> The rest looks good to me, well done!
>> Could you send an update with changes along these lines?
>
> Here is my best attempt to fix the definition form following your
> advice; i have enabled the 'check' phase and removed the backtick
> notation. I was not able to update the call to 'invoke', because
> -honestly- i was not able to wrap my head around g-expr. I hope the
> results are acceptable by the way! :)
Thank, that's much nicer with the test suite! I moved the package to
(gnu packages web), updated it to 1.8.1 (per 'guix lint'
recommendation), ordered the inputs, simplified the phase a bit and
enumerated some of the supported features in the description.
I also fixed the license, which is ISC rather than X11 (see
https://directory.fsf.org/wiki/License:ISC).
Pushed as 7eb68770efb33c1444f0ba1654334cfe19b3f5c6.
Closing; thank you!
Maxim
> Bye and thanks again!
> C.
>
> ---
> gnu/packages/networking.scm | 38 +++++++++++++++++++++++++++++++++++++
> 1 file changed, 38 insertions(+)
>
> diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
> index 11f1cad007..49776fd666 100644
> --- a/gnu/packages/networking.scm
> +++ b/gnu/packages/networking.scm
> @@ -48,6 +48,7 @@
> ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
> ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
> ;;; Copyright © 2022 Simon South <simon@simonsouth.net>
> +;;; Copyright © 2022 cage <cage-dev@twistfold.it>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -4196,3 +4197,40 @@ (define-public putty
> implementations.")
> (home-page "https://www.chiark.greenend.org.uk/~sgtatham/putty/")
> (license license:expat)))
> +
> +(define-public gmid
> + (package
> + (name "gmid")
> + (version "1.7.2")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append "https://github.com/omar-polo/gmid/releases/download/"
> + version "/gmid-" version ".tar.gz"))
> + (sha256
> + (base32 "0ag5zcwnr5vmy13bc9c36hnv9pflks68b0k6w0ng97inrm37klis"))))
> + (build-system gnu-build-system)
> + (arguments
> + (list #:test-target "regress"
> + #:phases
> + #~(modify-phases %standard-phases
> + (replace 'configure
> + ;; The configure script is hand-written, not from GNU autotools.
> + (lambda* (#:key configure-flags inputs outputs #:allow-other-keys)
> + (let ((prefix (string-append "PREFIX=" (assoc-ref outputs "out"))))
> + (setenv "CC" #$(cc-for-target))
> + (apply invoke "./configure" (list prefix))))))))
> + (native-inputs
> + (list pkg-config
> + bison
> + flex
> + coreutils
> + which
> + procps))
> + (inputs
> + (list libevent
> + libressl))
> + (home-page "https://git.omarpolo.com/gmid/about/")
> + (synopsis "Simple and secure Gemini server")
> + (description "Gmid is a fast Gemini server written with security in mind.")
> + (license license:x11)))
> --
> 2.34.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [bug#49929] [PATCH] gnu: Add gmid.
2022-02-27 4:50 ` bug#49929: " Maxim Cournoyer
@ 2022-02-27 12:06 ` cage
0 siblings, 0 replies; 5+ messages in thread
From: cage @ 2022-02-27 12:06 UTC (permalink / raw)
To: Maxim Cournoyer; +Cc: 49929-done, cage
On Sat, Feb 26, 2022 at 11:50:18PM -0500, Maxim Cournoyer wrote:
> Hello!
Hi!!
[...]
> > Here is my best attempt to fix the definition form following your
> > advice;
[...]
> Thank, that's much nicer with the test suite!
The upstream developer has spent a lot of time writing a proper test
suite, was a pity if was left unused. :)
[...]
> Closing; thank you!
Thanks to you for your suggestions and improving the patch!
Also i was able to fix the package's test phase only with the help of
people from the IRC channel, thanks to they all!
I am going to track the development upstream and upgrade this
definition form in the future.
Bye!
C.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-02-27 12:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-07 18:23 [bug#49929] [PATCH] gnu: Add gmid cage
2022-02-24 4:33 ` Maxim Cournoyer
2022-02-26 15:53 ` cage
2022-02-27 4:50 ` bug#49929: " Maxim Cournoyer
2022-02-27 12:06 ` [bug#49929] " cage
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).