[PATCH] gnu: Add ubench-h

  • Open
  • quality assurance status badge
Details
One participant
  • Artyom V. Poptsov
Owner
unassigned
Submitted by
Artyom V. Poptsov
Severity
normal
A
A
Artyom V. Poptsov wrote on 26 Jun 2022 22:23
(address . guix-patches@gnu.org)
87o7yf2mz3.fsf@gmail.com
Hello,

this patch adds "ubench.h"[1] under the name "ubench-h".
From 032c55ab247ce50dfe22fe37b742634c69ab4f94 Mon Sep 17 00:00:00 2001
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
Date: Sun, 26 Jun 2022 23:19:38 +0300
Subject: [PATCH] gnu: Add ubench-h.

* gnu/packages/c.scm (ubench-h): New variable.
---
gnu/packages/c.scm | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)

Toggle diff (46 lines)
diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index bcacccfd03..0d929ff892 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -1166,3 +1166,39 @@ string.h, but with a utf8* prefix instead of the str* prefix.")
(synopsis "Single header unit testing framework for C and C++")
(description "A simple one header solution to unit testing for C/C++.")
(license license:unlicense))))
+
+(define-public ubench-h
+ ;; The latest commit is used as there is no release.
+ (let ((commit "bcf152d83c3495242aa46df69cecdc9f3fbdf687") (revision "0"))
+ (package
+ (name "ubench-h")
+ (version (git-version "0.0.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/sheredom/ubench.h")
+ (commit commit)))
+ (file-name (git-file-name "ubench.h" version))
+ (sha256
+ (base32
+ "0sdnycxmrp78zhwydqbca985c3cg7px3n90vfs8c3agzra7xrhsi"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:phases (modify-phases %standard-phases
+ (delete 'build)
+ (delete 'configure)
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (with-directory-excursion "test"
+ (invoke "cmake" ".")
+ (invoke "make")))))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (install-file "ubench.h"
+ (string-append out "/include"))))))))
+ (home-page "https://github.com/sheredom/ubench.h")
+ (synopsis "Single header benchmark framework for C and C++")
+ (description "A simple one header solution to benchmarking for C/C++.")
+ (license license:unlicense))))
--
2.25.1
Thanks,

- Artyom

References:

--
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE B57C E9C5 A2D9 0898 A02F
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEE0MLqwTMQgi2Y3rV86cWi2QiYoC8FAmK4wDAACgkQ6cWi2QiY
oC/RxQf/RcpysmPmZYB3qoCbAnyO+JTlpsDRV38hTk6Wbef3cMxOH20r/KYNCtJ4
/eU9SRBlwsGXKcXspYgBsmwI9WVFuIvJ0WP7VYlbz9s7LwHFRyAamXaHB6iIV0YV
24LdQfCVpSS0hzj59Ty5DIsybOqfo2g3BHTDavK9WoF+M8kpfjMut+gl3j3MKr2M
ipzIyKo0BJGmA/exHfJ5w5diHlfNEDlacGxNwMUIMqKt/J0EuqIrdOvXh8VfyFhR
a+Ud1/dUsYcK93LQ9ROdhonsDgBG44+B/L6P8QTsN3f90CBFg1886pfDii9qNPi4
Jh73Nue0mgvaAg9Yeyop8W0laNfSRg==
=Y5nm
-----END PGP SIGNATURE-----

A
A
Artyom V. Poptsov wrote on 6 Jul 2022 22:33
(address . guix-patches@gnu.org)
87mtdmugkv.fsf@gmail.com
Hello Guixers,

I see that my 'utest-h' patch was merged recently (hooray!)

It would be nice if someone could do a patch-review for my 'ubench-h'
patch as well. ;-)

Thanks!

- Artyom

--
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE B57C E9C5 A2D9 0898 A02F
-----BEGIN PGP SIGNATURE-----

iQFNBAEBCgA3FiEE0MLqwTMQgi2Y3rV86cWi2QiYoC8FAmLF8ZAZHHBvcHRzb3Yu
YXJ0eW9tQGdtYWlsLmNvbQAKCRDpxaLZCJigL2q+CACCv+SGaf5kN64kw+MvwXl9
o3UsW/107tNpeW1uJqo54FEdWhnHEOvXGxheHW/dkHWq5mVxBGxT1V1LXC98x5M0
RoDlwyzjBuwfwAE0W8FjLZsSNlNJ743GMRyUoaenMNv84cm7IpYCIWGpidSOciyS
2pqElSEroSLUVfejbHiTMusndltBbu3LhEdQZixLlKM9zuVvOK8i7aa8iQkvTHLp
nb0HV/Wh2YG+7LZJHB/ihIV0EQskVYiYuRcLK6Q+TyOO5MRtbcNQCFoqHB058Oxm
CRCnKiFaA5GTDbw/Jb62V4siez+q/MIRebg0LXXWdJUkOtw0ZXIChkcwxFa3I5Qy
=LzOq
-----END PGP SIGNATURE-----

A
A
Artyom V. Poptsov wrote on 3 Jan 2023 22:43
(address . guix-patches@gnu.org)
87zgaz47m0.fsf@gmail.com
Hello,

I've rebased my patch that adds "ubench.h" benchmark framework onto the
"master" branch.
From c2f163bb8f8f2acf82432893f3860e35dbb95d5a Mon Sep 17 00:00:00 2001
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
Date: Wed, 4 Jan 2023 00:39:27 +0300
Subject: [PATCH] gnu: Add ubench-h.

* gnu/packages/c.scm (ubench-h): New variable.
---
gnu/packages/c.scm | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)

Toggle diff (46 lines)
diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index 04c9fcdc62..0bdc6e9fc5 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -1376,3 +1376,39 @@ (define-public utest-h
(description
"This package provides a header-only unit testing library for C/C++.")
(license license:unlicense))))
+
+(define-public ubench-h
+ ;; The latest commit is used as there is no release.
+ (let ((commit "bcf152d83c3495242aa46df69cecdc9f3fbdf687") (revision "0"))
+ (package
+ (name "ubench-h")
+ (version (git-version "0.0.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/sheredom/ubench.h")
+ (commit commit)))
+ (file-name (git-file-name "ubench.h" version))
+ (sha256
+ (base32
+ "0sdnycxmrp78zhwydqbca985c3cg7px3n90vfs8c3agzra7xrhsi"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:phases (modify-phases %standard-phases
+ (delete 'build)
+ (delete 'configure)
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (with-directory-excursion "test"
+ (invoke "cmake" ".")
+ (invoke "make")))))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (install-file "ubench.h"
+ (string-append out "/include"))))))))
+ (home-page "https://github.com/sheredom/ubench.h")
+ (synopsis "Single header benchmark framework for C and C++")
+ (description "A simple one header solution to benchmarking for C/C++.")
+ (license license:unlicense))))
--
2.34.1
Could you please review the patch?

Thanks,
avp

--
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE B57C E9C5 A2D9 0898 A02F
-----BEGIN PGP SIGNATURE-----

iQFNBAEBCgA3FiEE0MLqwTMQgi2Y3rV86cWi2QiYoC8FAmO0oXcZHHBvcHRzb3Yu
YXJ0eW9tQGdtYWlsLmNvbQAKCRDpxaLZCJigL8TyB/9tqJA8bZx4CYiTonOhctGm
drjcED7braXnMLmM11TZyseDC2ufuXiLsFYXhbPFz9rQ1BWiUsc1MzA7dv1fufl8
ALLVwrRZzu1CHNqPX6R40dwwHuwGpwiAM0nPKjoEjKfksCPhp5fxjwbcI7qUBbwI
WlQ2JFp8ujKwQHIC/wq/2RSOL6Mv6UG/AzjXtdkMXzybMPFG+blFlLVaRebevEPg
nmXfO90xBBeSrbwSYapc8Oz9E1I9T2+xsPO8Km1HllM8fbqo4ubf5nBzbeJUeu0C
p2mm67HQFfPBrX1jSahTltTfBcCZ45h/mU8AUbtRvkAz2rpDaXsAp8NCwIEx8UeV
=JesH
-----END PGP SIGNATURE-----

?