summary refs log tree commit diff
path: root/gnu/packages/cpp.scm
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2023-01-30 11:33:18 +0200
committerEfraim Flashner <efraim@flashner.co.il>2023-01-30 12:39:40 +0200
commit4cf1acc7f3033b50b0bf19e02c9f522d522d338c (patch)
tree9fd64956ee60304c15387eb394cd649e49f01467 /gnu/packages/cpp.scm
parentedb8c09addd186d9538d43b12af74d6c7aeea082 (diff)
parent595b53b74e3ef57a1c0c96108ba86d38a170a241 (diff)
downloadguix-4cf1acc7f3033b50b0bf19e02c9f522d522d338c.tar.gz
Merge remote-tracking branch 'origin/master' into core-updates
 Conflicts:
	doc/guix.texi
	gnu/local.mk
	gnu/packages/admin.scm
	gnu/packages/base.scm
	gnu/packages/chromium.scm
	gnu/packages/compression.scm
	gnu/packages/databases.scm
	gnu/packages/diffoscope.scm
	gnu/packages/freedesktop.scm
	gnu/packages/gnome.scm
	gnu/packages/gnupg.scm
	gnu/packages/guile.scm
	gnu/packages/inkscape.scm
	gnu/packages/llvm.scm
	gnu/packages/openldap.scm
	gnu/packages/pciutils.scm
	gnu/packages/ruby.scm
	gnu/packages/samba.scm
	gnu/packages/sqlite.scm
	gnu/packages/statistics.scm
	gnu/packages/syndication.scm
	gnu/packages/tex.scm
	gnu/packages/tls.scm
	gnu/packages/version-control.scm
	gnu/packages/xml.scm
	guix/build-system/copy.scm
	guix/scripts/home.scm
Diffstat (limited to 'gnu/packages/cpp.scm')
-rw-r--r--gnu/packages/cpp.scm546
1 files changed, 533 insertions, 13 deletions
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index c8bff7dbce..f83674fd58 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -8,9 +8,9 @@
 ;;; Copyright © 2019 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>
 ;;; Copyright © 2020, 2021 Nicolò Balzarotti <nicolo@nixo.xyz>
 ;;; Copyright © 2020 Roel Janssen <roel@gnu.org>
-;;; Copyright © 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2020, 2021, 2023 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
-;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
+;;; Copyright © 2020, 2021, 2022 Vinicius Monego <monego@posteo.net>
 ;;; Copyright © 2020, 2022 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
@@ -29,6 +29,11 @@
 ;;; Copyright © 2022 muradm <mail@muradm.net>
 ;;; Copyright © 2022 Attila Lendvai <attila@lendvai.name>
 ;;; Copyright © 2022 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2022 David Elsing <david.elsing@posteo.net>
+;;; Copyright © 2022 Zheng Junjie <873216071@qq.com>
+;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2023 Sughosha <Sughosha@proton.me>
+;;; Copyright © 2023 Artyom V. Poptsov <poptsov.artyom@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -56,9 +61,11 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system meson)
   #:use-module (guix build-system python)
+  #:use-module (guix build-system scons)
   #:use-module (guix modules)
   #:use-module (guix gexp)
   #:use-module (gnu packages)
+  #:use-module (gnu packages assembly)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages build-tools)
@@ -68,8 +75,13 @@
   #:use-module (gnu packages compression)
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages curl)
+  #:use-module (gnu packages datastructures)
   #:use-module (gnu packages documentation)
+  #:use-module (gnu packages fontutils)
   #:use-module (gnu packages gcc)
+  #:use-module (gnu packages gl)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages gtk)
   #:use-module (gnu packages libevent)
   #:use-module (gnu packages libunwind)
   #:use-module (gnu packages linux)
@@ -87,6 +99,7 @@
   #:use-module (gnu packages tls)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml)
+  #:use-module (gnu packages xorg)
   #:use-module (ice-9 match))
 
 (define-public argagg
@@ -281,7 +294,7 @@ various formats, including @code{json}.")
 (define-public libzen
   (package
     (name "libzen")
-    (version "0.4.39")
+    (version "0.4.40")
     (source (origin
               (method url-fetch)
               ;; Warning: This source has proved unreliable 1 time at least.
@@ -292,7 +305,7 @@ various formats, including @code{json}.")
                                   "libzen_" version ".tar.bz2"))
               (sha256
                (base32
-                "1rwaxmid9iv65n0y6xlcyxxydsvihjni9ldxpg6pbqz43amp49xx"))))
+                "17pnp5i1ppcxhxnfs9qlkzzy35h23pkdwhsgpbqdkf8lab2f4hsm"))))
     (native-inputs
      (list autoconf automake libtool))
     (build-system gnu-build-system)
@@ -435,7 +448,7 @@ operating on batches.")
 (define-public google-highway
   (package
     (name "google-highway")
-    (version "0.17.0")
+    (version "1.0.3")
     (source
      (origin
        (method git-fetch)
@@ -444,7 +457,7 @@ operating on batches.")
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "0iwn7m8f1j7bchwbi5h84nzkzmzqd7byddbr4lh6i6lpd87wny08"))))
+        (base32 "1828rz9w9sr3zlyg25b6nm7j5j5m0xnic7hy36gpsbxvq358ibpf"))))
     (build-system cmake-build-system)
     (arguments
      `(#:configure-flags (list "-DHWY_SYSTEM_GTEST=on")))
@@ -551,6 +564,37 @@ container which uses the order in which keys were inserted to the container
 as ordering relation.")
     (license license:expat)))
 
+(define-public json-dto
+  (package
+    (name "json-dto")
+    (version "0.3.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/Stiffstream/json_dto")
+                    (commit (string-append "v." version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0wr1srp08fr2mv4fmnqr626pwiw60svn6wkvy2xg7j080mgwb3ml"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list
+      #:configure-flags #~(list "-DJSON_DTO_INSTALL_SAMPLES=OFF")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'change-directory
+            (lambda _
+              (chdir "dev"))))))
+    (native-inputs (list catch2))
+    (propagated-inputs (list rapidjson))    ;#include'd
+    (home-page "https://github.com/Stiffstream/json_dto")
+    (synopsis "JSON to C++ structures conversion library")
+    (description "@code{json_dto} library is a small header-only helper for
+converting data between JSON representation and C++ structs.  DTO stands for
+data transfer object.")
+    (license license:bsd-3)))
+
 (define-public json-modern-cxx
   (package
     (name "json-modern-cxx")
@@ -656,7 +700,7 @@ tools (containers, algorithms) used by other QuantStack packages.")
 (define-public ccls
   (package
     (name "ccls")
-    (version "0.20210330")
+    (version "0.20220729")
     (source
      (origin
        (method git-fetch)
@@ -664,7 +708,7 @@ tools (containers, algorithms) used by other QuantStack packages.")
              (url "https://github.com/MaskRay/ccls")
              (commit version)))
        (sha256
-        (base32 "0zzdn7c7a244djqwcsd7rvgclcdacyf9d0vkxpfspl83k2554alf"))
+        (base32 "0cp534n7afl0rrr778cc0bnd8w091qmyqdpp5k1jh4wxla9s09br"))
        (file-name (git-file-name name version))))
     (build-system cmake-build-system)
     (arguments
@@ -1023,7 +1067,8 @@ Google's C++ code base.")
 
 (define-public abseil-cpp
   (let ((base abseil-cpp-20200923.3))
-    (package/inherit base
+    (package
+      (inherit base)
       (name "abseil-cpp")
       (version "20220623.1")
       (source (origin
@@ -1041,6 +1086,15 @@ Google's C++ code base.")
           `(cons* "-DABSL_BUILD_TESTING=ON"
                   (delete "-DABSL_RUN_TESTS=ON" ,flags))))))))
 
+(define-public abseil-cpp-cxxstd17
+  (let ((base abseil-cpp))
+    (hidden-package
+     (package/inherit base
+       (arguments
+        (substitute-keyword-arguments (package-arguments base)
+          ((#:configure-flags flags)
+           #~(cons* "-DCMAKE_CXX_STANDARD=17" #$flags))))))))
+
 (define-public pegtl
   (package
     (name "pegtl")
@@ -1062,6 +1116,39 @@ a zero-dependency C++ header-only parser combinator library for creating
 parsers according to a Parsing Expression Grammar (PEG).")
     (license license:expat)))
 
+(define-public psascan
+  (package
+    (name "psascan")
+    (version "0.1.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://www.cs.helsinki.fi/group"
+                                  "/pads/software/pSAscan"
+                                  "/pSAscan-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "1cphk4gf202nzkxz6jdjzls4zy27055gwpm0r8cn99gr6c8548cy"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list
+      #:tests? #false ;there are none
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'chdir (lambda _ (chdir "src")))
+          (delete 'configure)
+          (replace 'install
+            (lambda _
+              (install-file "psascan"
+                            (string-append #$output "/bin")))))))
+    (inputs (list libdivsufsort))
+    (home-page "https://www.cs.helsinki.fi/group/pads/pSAscan.html")
+    (synopsis "Parallel external memory suffix array construction")
+    (description "This package contains an implementation of the parallel
+external-memory suffix array construction algorithm called pSAscan.  The
+algorithm is based on the sequential external-memory suffix array construction
+algorithm called SAscan.")
+    (license license:expat)))
+
 (define-public cxxopts
   (package
     (name "cxxopts")
@@ -1086,7 +1173,7 @@ standard GNU style syntax for options.")
 (define-public folly
   (package
     (name "folly")
-    (version "2022.04.11.00")
+    (version "2022.10.31.00")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -1095,7 +1182,7 @@ standard GNU style syntax for options.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "03c1my66xncn8yvgih4kc7j83ckmjbi2w29hdb28j30ixbn0bsjg"))))
+                "06r9xnj8ilghc0vv6r17k5apl3w19iwd76nr02svnv96c74bz2aa"))))
     (build-system cmake-build-system)
     (arguments
      '(;; Tests must be explicitly enabled
@@ -1856,7 +1943,7 @@ multi-threaded applications and network applications.")
 (define-public gulrak-filesystem
   (package
     (name "gulrak-filesystem")
-    (version "1.5.10")
+    (version "1.5.12")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -1865,7 +1952,7 @@ multi-threaded applications and network applications.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0dx1yvbz5rnisymkqap7z0b06ag9fcs6q6l82vgi8caylhkwsqs7"))))
+                "1qg10akvhp801xirkj4mqcpvcxj90z81ygpyg752xv110zj4914g"))))
     (build-system cmake-build-system)
     (synopsis "Header only C++ std::filesystem compatible library")
     (description "This package provides a header-only single-file
@@ -1907,3 +1994,436 @@ and above.  It is header only and has zero dependencies.  It provides a
 templated string type for compatibility with any STL-like string (std::string,
 std::wstring, etc).")
     (license license:boost1.0)))
+
+(define-public crc32c
+  (package
+    (name "crc32c")
+    (version "1.1.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/google/crc32c")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0966lyy3w5cnrs0c0fkma4hga51k54hns72l4n76944awqssap7j"))
+              (patches (search-patches "crc32c-unbundle-googletest.patch"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list #:configure-flags #~(list "-DBUILD_SHARED_LIBS=ON"
+                                     "-DCRC32C_BUILD_BENCHMARKS=OFF"
+                                     "-DCRC32C_USE_GLOG=OFF"
+                                     (string-append
+                                      "-DCRC32C_BUILD_TESTS="
+                                      ;; TODO: perhaps infer #:tests?
+                                      (if #$(%current-target-system)
+                                          "OFF" "ON")))))
+    (native-inputs (list googletest))
+    (home-page "https://github.com/google/crc32c")
+    (synopsis "Cyclic redundancy check")
+    (description
+     "This package provides architecture-specific implementations of the
+CRC32C algorithm, which is specified in RFC 3720, section 12.1.")
+    (license license:bsd-3)))
+
+(define fast-float-test-files
+  (let ((commit "97a0b2e638feb479387554cf253e346500541e7e"))
+   (origin
+    (method git-fetch)
+    (uri (git-reference
+          (url (string-append "https://github.com/fastfloat"
+                              "/supplemental_test_files.git"))
+          (commit "97a0b2e638feb479387554cf253e346500541e7e")))
+    (file-name (string-append "fast-float-test-files-"
+                              (string-take commit 8)))
+    (sha256
+     (base32
+      "0dxbiyzyh7i847i89ablfzypfc3ckhm7f74w98jsh73v1mppmxlf")))))
+
+(define-public fast-float
+  (package
+    (name "fast-float")
+    (version "3.5.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/fastfloat/fast_float")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0z3rxxd0pwvw70dbnv63rm67biw829vdqf50y16isxm6g3sbrz8g"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list
+      #:configure-flags #~(list "-DFASTFLOAT_TEST=ON"
+                                "-DSYSTEM_DOCTEST=ON")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch-cmake-tests
+            (lambda* (#:key inputs native-inputs #:allow-other-keys)
+              (substitute* "tests/CMakeLists.txt"
+                (("FetchContent_GetProperties\\(supplemental_test_files.*")
+                 "")
+                (("if\\(NOT supplemental_test_files_POPULATED.*")
+                 (string-append
+                  "set(supplemental_test_files_BINARY_DIR "
+                  (search-input-directory (or native-inputs inputs)
+                                          "data")
+                  ")\nif(0)\n"))))))))
+    (native-inputs (list doctest fast-float-test-files))
+    (home-page "https://github.com/fastfloat/fast_float")
+    (synopsis "Floating point number parser for C++")
+    (description "@code{fast_float} is a header-only C++ library for parsing
+floating point numbers from strings.  It implements the C++ from_chars
+functions for the float and double types.")
+    (license (list license:asl2.0 license:expat)))) ; dual licensed
+
+(define-public pocketfft-cpp
+  (let ((commit "daa8bb18327bc5c7d22c69428c25cf5dc64167d3")
+        (revision "0"))
+    (package
+      (name "pocketfft-cpp")
+      (version (git-version "0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/mreineck/pocketfft")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "1dbkkqkmkxgmz1qjpsqzic5ig3qw1pqndbb3dvjc7xq5f2rdzyq1"))
+                (patches (search-patches
+                          "pocketfft-cpp-prefer-preprocessor-if.patch"))))
+      (build-system copy-build-system)
+      (arguments
+       (list
+        #:install-plan #~'(("pocketfft_hdronly.h" "include/"))))
+      (home-page "https://github.com/mreineck/pocketfft")
+      (synopsis "C++11 header-only Fast Fourier Transform library")
+      (description "This package provides a single-header C++11 library for
+computing Fast Fourier transformations.  It supports multidimensional arrays,
+different floating point sizes and complex transformations.")
+      (license license:bsd-3))))
+
+(define-public sajson
+  (let ((commit "ec644013e34f9984a3cc9ba568cab97a391db9cd")
+        (revision "0"))
+    (package
+      (name "sajson")
+      (version (git-version "1.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/chadaustin/sajson")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (patches
+                 (search-patches "sajson-build-with-gcc10.patch"))
+                (sha256
+                 (base32
+                  "0fjag27w7gvkc5pdhq3ad7yc09rabpzahndw1sgsg04ipznidmmq"))
+                (modules '((guix build utils)))
+                (snippet '(delete-file-recursively "third-party"))))
+      (build-system scons-build-system)
+      (arguments
+       (list
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-after 'unpack 'disable-other-builds
+              (lambda _
+                (substitute* "SConstruct"
+                  (("for name, tools in builds:")
+                   "for name, tools in [('opt', [gcc, opt])]:"))))
+            (add-after 'unpack 'use-external-unittest-cpp
+              (lambda _
+                (substitute* "SConscript"
+                  (("unittestpp_env\\.Library") "_dummy = ")
+                  (("test_env = env.Clone\\(tools=\\[unittestpp, sajson\\]\\)")
+                   (string-append
+                    "test_env = env.Clone(tools=[sajson])\n"
+                    "test_env.Append(CPPPATH='"
+                    (search-input-directory %build-inputs "/include/UnitTest++")
+                    "', LIBPATH='"
+                    (string-append #$(this-package-native-input "unittest-cpp")
+                                   "/lib")
+                    "', LIBS=['UnitTest++'])")))))
+            (replace 'build
+              (lambda* (#:key tests? #:allow-other-keys #:rest args)
+                (when tests?
+                  (apply (assoc-ref %standard-phases 'build)
+                         args))))
+            (replace 'check
+              (lambda* (#:key tests? #:allow-other-keys)
+                (when tests?
+                  (invoke "build/opt/test")
+                  (invoke "build/opt/test_unsorted"))))
+            (replace 'install
+              (lambda _
+                (let ((out (string-append #$output "/include")))
+                  (install-file "include/sajson.h" out)
+                  (install-file "include/sajson_ostream.h" out)))))))
+      (native-inputs (list unittest-cpp))
+      (home-page "https://github.com/chadaustin/sajson")
+      (synopsis "C++11 header-only, in-place JSON parser")
+      (description "@code{sajson} is an in-place JSON parser with support for
+parsing with only a single memory allocation.")
+      (license license:expat))))
+
+(define-public sajson-for-gemmi
+  (package/inherit sajson
+    (name "sajson-for-gemmi")
+    (source (origin
+              (inherit (package-source sajson))
+              (patches (cons
+                        (search-patch
+                         "sajson-for-gemmi-numbers-as-strings.patch")
+                        (origin-patches (package-source sajson))))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments sajson)
+       ;; This is a modified version used in gemmi, in which numbers are kept
+       ;; as strings. Building the tests fails with the modification.
+       ((#:tests? _ #f) #f)))
+    (properties '((hidden? . #t)))))
+
+(define-public optionparser
+  (package
+    (name "optionparser")
+    (version "1.7")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append "mirror://sourceforge/optionparser/"
+                              "optionparser-" version ".tar.gz"))
+              (sha256
+               (base32
+                "04gfxrdzwacaynb8scsz6rr7nh64n6yk6w9dh2qdhrxw4caqr0dk"))))
+    (outputs '("out" "doc"))
+    (build-system gnu-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (delete 'configure)
+          (add-before 'build 'chdir
+            (lambda _ (chdir "src")))
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (when tests?
+                (begin
+                  (invoke "./example_arg")
+                  (invoke "./testparse")
+                  (invoke "./testprintusage")
+                  (invoke "./testodr")
+                  (invoke "./example")))))
+          (replace 'install
+            (lambda _
+              (install-file "optionparser.h"
+                            (string-append #$output "/include"))))
+          (add-after 'install 'install-doc
+            (lambda _
+              (copy-recursively
+               "../html"
+               (string-append #$output:doc "/share/doc/optionparser/html")))))))
+    (native-inputs (list doxygen))
+    (home-page "https://optionparser.sourceforge.net/")
+    (synopsis "Header-only C++ library to parse command line options")
+    (description "This package provides a header-only C++ library to parse
+command line options.  It supports the short and long option formats of
+getopt(), getopt_long() and getopt_long_only().")
+    (license license:expat)))
+
+(define-public safeint
+  (package
+    (name "safeint")
+    (version "3.0.27")
+    (home-page "https://github.com/dcleblanc/SafeInt")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url home-page)
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "01d2dpdhyw3lghmamknb6g39w2gg0sv53pgxlrs2la8h694z6x7s"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list #:phases #~(modify-phases %standard-phases
+                        (replace 'install
+                          (lambda _
+                            (let ((include-dir (string-append #$output
+                                                              "/include")))
+                              (with-directory-excursion "../source"
+                                (install-file "SafeInt.hpp" include-dir)
+                                (install-file "safe_math.h" include-dir)
+                                (install-file "safe_math_impl.h" include-dir)))))
+                        (add-after 'install 'install-doc
+                          (lambda _
+                            (let ((doc-dir (string-append #$output
+                                                          "/share/doc/safeint")))
+                              (with-directory-excursion "../source"
+                                (install-file "helpfile.md" doc-dir))))))))
+    (synopsis "C and C++ library for managing integer overflows")
+    (description
+     "SafeInt is a class library for C++ that manages integer overflows.  It
+also includes a C library that checks casting, multiplication, division,
+addition and subtraction for all combinations of signed and unsigned 32-bit and
+64-bit integers.")
+    (license license:expat)))
+
+(define-public wdl
+  ;; No tag is available.
+  (let ((commit "da86a62d11e46e4ecd8b16f9775cb5188340a0e2")
+        (revision "0"))
+    (package
+      (name "wdl")
+      (version (git-version "0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/justinfrankel/WDL")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                ;; This patch fixes error of undefined functions, due to not
+                ;; linking libraries, and invalid object.
+                (patches
+                 (search-patches "wdl-link-libs-and-fix-jnetlib.patch"))
+                (sha256
+                 (base32
+                  "0hdb604szkbrlyffiw94rz8wx4nvmk3zdkycfirqgjs7mh0l6vbq"))
+                (modules '((guix build utils)))
+                ;; Unbundle third party libraries which are not needed.
+                (snippet
+                 '(with-directory-excursion "WDL"
+                    (for-each delete-file-recursively
+                              (list "cmath"
+                                    "libpng"
+                                    "lice/glew"
+                                    "giflib"
+                                    "jpeglib"
+                                    "zlib"))))))
+      (build-system gnu-build-system)
+      (arguments
+       (list
+        #:test-target "test"
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-after 'unpack 'chdir
+              (lambda _ (chdir "WDL/swell")))
+            (delete 'configure)
+            (replace 'build
+              (lambda _
+                (with-directory-excursion ".."
+                  (invoke "make" "-Ceel2")     ;build eel2
+                  (invoke "make" "-Cjnetlib")) ;build jnetlib
+                (invoke "make" "SWELL_SUPPORT_GTK=true")
+                (invoke "make" "libSwell.colortheme")))
+            (replace 'install
+              (lambda _
+                (chdir "..")
+
+                ;; Do not install these directories
+                (delete-file-recursively "lice/test")
+                (delete-file-recursively "swell/sample_project")
+
+                ;; Install headers.
+                (let ((include (string-append #$output "/include/WDL")))
+                  (for-each
+                   (lambda (file)
+                     (install-file file
+                                   (string-append include "/"
+                                                  (dirname file))))
+                   (find-files "." "\\.h$")))
+                (install-file "swell/libSwell.so"
+                              (string-append #$output "/lib"))
+                (install-file "swell/libSwell.colortheme"
+                              (string-append #$output "/share/WDL"))
+                (install-file "eel2/loose_eel"
+                              (string-append #$output "/libexec"))
+                (install-file "jnetlib/jnl.a"
+                              (string-append #$output "/lib")))))))
+      (native-inputs (list pkg-config nasm))
+      (inputs
+       (list cairo
+             fontconfig
+             freetype
+             gdk-pixbuf
+             glib
+             gtk+
+             libxi
+             libx11
+             mesa
+             zlib))
+      (home-page "https://www.cockos.com/wdl/")
+      (synopsis "Modestly reusable C++ libraries")
+      (description
+       "WDL is a modestly reusable C++ library that offers the following:
+@itemize
+@item Inline classes for cleanly managing memory allocations, lists,
+queues, resource pools, strings, etc.
+@item File reading/writing wrappers
+@item Directory scanning API
+@item SHA-1 implementation
+@item Mergesort implementation
+@item Blowfish implementation
+@item Fast FFT implementation (based on DJBFFT)
+@item Audio tools
+@item LICE - Lightweight Image Compositing Engine
+@item WDL Virtual Window system
+@item Plush2 - Portable, lightweight software 3d rendering engine
+@item SWELL - Simple Windows Emulation Layer
+@item And more.
+@end itemize")
+      (license license:zlib))))
+
+(define-public ftxui
+  (package
+    (name "ftxui")
+    (version "3.0.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/ArthurSonzogni/FTXUI")
+                    (commit (string-append "v" version))))
+              (sha256
+               (base32
+                "10a4yw2h29kixxyhll6cvrwyscsvz9asxry857a9l8nqvbhs946s"))
+              (file-name (git-file-name name version))))
+    (build-system cmake-build-system)
+    (native-inputs (list googletest))
+    (arguments
+     (list #:configure-flags
+           #~(list "-DFTXUI_BUILD_TESTS:BOOL=ON"
+                   "-DFTXUI_BUILD_TESTS_FUZZER:BOOL=OFF")
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'patch-cmake-tests
+                 (lambda _
+                   (substitute* "cmake/ftxui_test.cmake"
+                     (("NOT googletest_POPULATED")
+                      "FALSE"))
+                   ;; Disable benchmarks for a while as they require bundled Google
+                   ;; benchmark and when the 'googlebenchmark' is unbundled, there's
+                   ;; a CMake configuration error.
+                   (substitute* "cmake/ftxui_benchmark.cmake"
+                     (("NOT WIN32")
+                      "FALSE")))) )))
+    (home-page "https://github.com/ArthurSonzogni/FTXUI")
+    (synopsis "C++ Functional Terminal User Interface")
+    (description
+     "Functional Terminal (X) User interface (FTXUI) is a simple C++ library for
+terminal based user interfaces.
+
+Main features:
+@itemize
+@item Functional style.
+@item Keyboard & mouse navigation.
+@item Support for UTF8 and fullwidth chars.
+@item Support for animations.
+@item Support for drawing.
+@item No dependencies.
+@end itemize")
+    (license license:expat)))