aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorVinicius Monego <monego@posteo.net>2024-03-27 09:43:15 -0300
committerVinicius Monego <monego@posteo.net>2024-04-06 08:11:32 -0300
commit9909866a689b303a4017041cd8aa65a241a46c9c (patch)
tree31ffd5546eeb5e870052aa2173d3adf0fc179fee /gnu/packages
parent5cb8b47b89fff50e2608bd47f19223f86bc850b0 (diff)
downloadguix-9909866a689b303a4017041cd8aa65a241a46c9c.tar
guix-9909866a689b303a4017041cd8aa65a241a46c9c.tar.gz
gnu: Add pystring.
* gnu/packages/cpp.scm (pystring): New variable. Change-Id: Ifff1ae3d3ed8ec880a2dd098d6d81de28d7bdda6
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/cpp.scm38
1 files changed, 38 insertions, 0 deletions
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 8d15b32f8e..b4a0abb525 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -477,6 +477,44 @@ the name of the library itself, which is written in C++.")
(license (list license:expat ; cJSON
license:bsd-4))))) ; everything else (LICENSE.txt)
+(define-public pystring
+ (package
+ (name "pystring")
+ (version "1.1.4")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/imageworks/pystring")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32 "0h12x24skrlx4fv0k5vl8wnar8gi6bq091yp93awkwsbnm8qwkzd"))
+ (file-name (git-file-name name version))))
+ (build-system cmake-build-system)
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ ;; The install phase doesn't install the header
+ (add-after 'install 'install-header
+ (lambda _
+ (mkdir-p (string-append #$output "/include"))
+ (copy-file
+ (string-append #$(package-source this-package)
+ "/pystring.h")
+ (string-append #$output
+ "/include/pystring.h")))))))
+ (native-inputs (list pkg-config))
+ (home-page "https://github.com/imageworks/pystring")
+ (synopsis "C++ functions matching the Python string methods")
+ (description
+ "Pystring is a collection of C++ functions which match the interface and
+behavior of Python's string class methods using std::string. Implemented in
+C++, it does not require or make use of a python interpreter. It provides
+convenience and familiarity for common string operations not included in the
+standard C++ library. It's also useful in environments where both C++ and
+Python are used.")
+ (license license:bsd-3)))
+
(define-public dashel
(package
(name "dashel")