diff mbox series

[bug#47433,1/2] gnu: Add the-foundation.

Message ID 20210327134629.31646-1-lle-bout@zaclys.net
State Accepted
Headers show
Series gnu: Add lagrange. | expand

Checks

Context Check Description
cbaines/submitting builds success
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Léo Le Bouter March 27, 2021, 1:46 p.m. UTC
* gnu/packages/web.scm (the-foundation): New variable.
---
 gnu/packages/web.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

Comments

Leo Famulari March 27, 2021, 6:12 p.m. UTC | #1
On Sat, Mar 27, 2021 at 02:46:28PM +0100, Léo Le Bouter via Guix-patches via wrote:
> * gnu/packages/web.scm (the-foundation): New variable.

Thanks!

> +(define-public the-foundation
> +  (let ((commit "8172d35cad24ec392bfd27e1f4de3a2205f988d2"))

Please add a "revision" variable ...

> +    (package
> +      (name "the-foundation")
> +      (version (string-take commit 7))

... and use the git-version procedure, as described in the manual
section Version Numbers:

https://guix.gnu.org/manual/en/html_node/Version-Numbers.html

> +      (native-inputs
> +       `(("git" ,git-minimal)

Does it only use Git at build-time, and not keep a reference to the Git
package? You can check like this:

$ guix gc --references $(guix build --no-grafts thefoundation) | grep git

If it keeps a reference, then Git should be a regular input. I ask
because it's unusual for Guix packages to need to Git as a
native-inputs, because the .git directory is deleted before building,
and there is no network access at build time.

Otherwise, looks good to me.
diff mbox series

Patch

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index ae41588037..dc45c2a3b2 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -6639,6 +6639,42 @@  Rust with GTK.  It currently supports the Gemini, Gopher and Finger
 protocols.")
     (license license:expat)))
 
+(define-public the-foundation
+  (let ((commit "8172d35cad24ec392bfd27e1f4de3a2205f988d2"))
+    (package
+      (name "the-foundation")
+      (version (string-take commit 7))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://git.skyjake.fi/skyjake/the_Foundation")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "010kgbii33rb52g6iyrcjpb9sicnfw684pyrfwv1h8igpiv6hsv9"))))
+      (build-system cmake-build-system)
+      (arguments
+       `(;; Tests are not meant to be run automatically for now.
+         ;; See https://codeberg.org/skyjake/the_Foundation/issues/2
+         #:tests? #f))
+      (native-inputs
+       `(("git" ,git-minimal)
+         ("pkg-config" ,pkg-config)))
+      (inputs
+       `(("curl" ,curl)
+         ("zlib" ,zlib)
+         ("pcre" ,pcre)
+         ("openssl" ,openssl)
+         ("libunistring" ,libunistring)))
+      (home-page "https://git.skyjake.fi/skyjake/the_Foundation")
+      (synopsis "Opinionated C11 library for low-level functionality")
+      (description "@code{the_Foundation} is a C11 library and a coding
+convention for object-oriented programming that has been designed from the
+point of view of someone who appreciates the user-friendliness of Qt and some
+of the thinking behind C++ STL.")
+      (license license:bsd-2))))
+
 (define-public python-py-ubjson
   (package
     (name "python-py-ubjson")