diff mbox series

[bug#45853,1/1] Added a package definition for the C++17 header only library 'magic-enum'.

Message ID 20210114023630.53568-2-joshua.r.marshall.1991@gmail.com
State Accepted
Headers show
Series New package 'magic-enum' | 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

Anadon Jan. 14, 2021, 2:36 a.m. UTC
gnu/packages/cpp.scm: Added the package definition.
---
 gnu/packages/cpp.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

Comments

Leo Prikler Jan. 14, 2021, 11:59 a.m. UTC | #1
Hello Anadon,

I was prepared to overlook some formal errors and push this with some
slight adjustment, but my package build failed, so I'll have to make
you adjust it once again.

Am Mittwoch, den 13.01.2021, 21:36 -0500 schrieb Anadon:
> gnu/packages/cpp.scm: Added the package definition.
The commit message for this package should be (minus indentation)

    gnu: Add magic-enum.
    
    * gnu/packages/cpp.scm (magic-enum): New variable.

to keep with the already established style.

You don't need to send a cover letter for a single patch.  Also, don't
include guix-patches in your follow-up messages, but do CC me. 
Additionally, it'd be nice if you used --reroll-count, but I'll sort
things out.

> ---
>  gnu/packages/cpp.scm | 24 ++++++++++++++++++++++++
>  1 file changed, 24 insertions(+)
> 
> diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
> index 00e006928e..673867dbd2 100644
> --- a/gnu/packages/cpp.scm
> +++ b/gnu/packages/cpp.scm
> @@ -807,3 +807,27 @@ code will be mixed in with the actual
> programming logic.  This implementation
>  provides a number of utilities to make coding with expected
> cleaner.")
>      (home-page "https://tl.tartanllama.xyz/")
>      (license license:cc0)))
> +
> +(define-public magic-enum
> +    (package
> +      (name "magic-enum")
> +      (version "0.7.2")
> +      (home-page "https://github.com/Neargye/magic_enum")
> +      (source (origin
> +                (method git-fetch)
> +                (uri (git-reference
> +                      (url home-page)
> +                      (commit (string-append "v" version))))
Missing (file-name (git-file-name name version)).
This is needed with git-references as otherwise it'll just be named
"git-checkout", which isn't very helpful.
> +                (sha256
> +                 (base32
> +                  "0fmkyh1srkz2bx68agfa30sankg1ig1f95xqp8sp9wj3p9qil
> sv2"))
After I recently cleaned my checkout completely (unrelated bytecode
troubles), this hash does not match up the one I get with `guix build'.

r:sha256 hash mismatch for /gnu/store/ajxz311mls8ybih8cify2lcwnwkqd1wy-
git-checkout:
  expected hash: 0fmkyh1srkz2bx68agfa30sankg1ig1f95xqp8sp9wj3p9qilsv2
  actual hash:   07j5zdf3vkliwrcv6k663k35akn7qp23794sz2mnvkj9hbv9s8cx

Did something change upstream? 
> +                (modules '((guix build utils)))))
modules should only be needed if you have a snippet.

> +      (build-system cmake-build-system)
> +
> +      (inputs
> +       `(("gcc" ,gcc-9)))
Should probably be native-inputs.
> +      (synopsis "C++17 header only library for compile time
> reflection of enums")
> +      (description "C++17 header only library which offers static
> reflection
> +of enums, with to string, from string, and iteration, and related
> +functionality.")
> +      (license license:expat)))

Regards,
Leo
diff mbox series

Patch

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 00e006928e..673867dbd2 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -807,3 +807,27 @@  code will be mixed in with the actual programming logic.  This implementation
 provides a number of utilities to make coding with expected cleaner.")
     (home-page "https://tl.tartanllama.xyz/")
     (license license:cc0)))
+
+(define-public magic-enum
+    (package
+      (name "magic-enum")
+      (version "0.7.2")
+      (home-page "https://github.com/Neargye/magic_enum")
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url home-page)
+                      (commit (string-append "v" version))))
+                (sha256
+                 (base32
+                  "0fmkyh1srkz2bx68agfa30sankg1ig1f95xqp8sp9wj3p9qilsv2"))
+                (modules '((guix build utils)))))
+      (build-system cmake-build-system)
+
+      (inputs
+       `(("gcc" ,gcc-9)))
+      (synopsis "C++17 header only library for compile time reflection of enums")
+      (description "C++17 header only library which offers static reflection
+of enums, with to string, from string, and iteration, and related
+functionality.")
+      (license license:expat)))