| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 |
|
| 27 | (define-module (gnu packages datastructures)
|
| 28 | #:use-module (gnu packages)
|
| 29 | #:use-module (gnu packages autotools)
|
| 30 | #:use-module (gnu packages boost)
|
| 31 | #:use-module (gnu packages check)
|
| 32 | #:use-module (gnu packages gcc)
|
| 33 | #:use-module (gnu packages perl)
|
| 34 | #:use-module (gnu packages pkg-config)
|
| 35 | #:use-module ((guix licenses) #:prefix license:)
|
| 36 | #:use-module (guix packages)
|
| 37 | #:use-module (guix gexp)
|
| 38 | #:use-module (guix utils)
|
| 39 | #:use-module (guix download)
|
| 40 | #:use-module (guix git-download)
|
| 41 | #:use-module (guix build-system cmake)
|
| 42 | #:use-module (guix build-system copy)
|
| 43 | #:use-module (guix build-system gnu)
|
| 44 | #:use-module (guix build-system meson))
|
| 45 |
|
| 46 | (define-public coucal
|
| 47 | (let ((commit "73ada075553b7607d083037a87cb9c73b3683bfc")
|
| 48 | (revision "1"))
|
| 49 | (package
|
| 50 | (name "coucal")
|
| 51 | (version (git-version "0" revision commit))
|
| 52 | (source (origin
|
| 53 | (method git-fetch)
|
| 54 | (uri (git-reference
|
| 55 | (url "https://github.com/xroche/coucal")
|
| 56 | (commit commit)))
|
| 57 | (file-name (git-file-name name version))
|
| 58 | (sha256
|
| 59 | (base32
|
| 60 | "01996vda3wj5ywpwg9yhysaq6cyi44xnkyhihbwwi43hrj1ic2vm"))))
|
| 61 | (build-system gnu-build-system)
|
| 62 | (arguments
|
| 63 | (list
|
| 64 | #:phases
|
| 65 | #~(modify-phases %standard-phases
|
| 66 | (add-after 'unpack 'do-not-run-tests-early
|
| 67 | (lambda _
|
| 68 | (substitute* "Makefile"
|
| 69 | (("(all: ).*" _ lead) (string-append lead "gcc")))))
|
| 70 | (add-after 'unpack 'remove-Werror
|
| 71 | |
| 72 | |
| 73 | (lambda _
|
| 74 | (substitute* "Makefile"
|
| 75 | (("-Werror ") ""))))
|
| 76 | (delete 'configure) |
| 77 | (replace 'install |
| 78 | (lambda _
|
| 79 | (let ((doc (string-append #$output
|
| 80 | "/share/doc/" #$name "-" #$version)))
|
| 81 | (install-file "README.md" doc))
|
| 82 | (for-each (lambda (f) (install-file f #$output))
|
| 83 | (find-files "." "(coucal|murmurhash)"))))
|
| 84 | (replace 'check
|
| 85 | (lambda* (#:key tests? #:allow-other-keys)
|
| 86 | (when tests?
|
| 87 | (invoke "make" "tests" "runtests")))))))
|
| 88 | (home-page "https://github.com/xroche/coucal")
|
| 89 | (synopsis "Cuckoo-hashing-based hashtable with stash area C library")
|
| 90 | (description "Coucal is an implementation of the Cuckoo hashing
|
| 91 | algorithm with a stash area using by default the MurmurHash hash function.")
|
| 92 | |
| 93 | |
| 94 | (license (list license:expat license:public-domain)))))
|
| 95 |
|
| 96 | (define-public gdsl
|
| 97 | (package
|
| 98 | (name "gdsl")
|
| 99 | (version "1.8")
|
| 100 | (source (origin
|
| 101 | (method git-fetch)
|
| 102 | (uri (git-reference
|
| 103 | (url "https://example.org") |
| 104 | (commit "6adb53be8b8f9f2e4bbfc92d357eedeefb4c7430")))
|
| 105 | (file-name (git-file-name name version))
|
| 106 | (sha256
|
| 107 | (base32
|
| 108 | "0a52g12d9sf9hhcyvwfd7xdazj2a9i9jh97cnlqf2ymvwnvjk1g0"))))
|
| 109 | (build-system gnu-build-system)
|
| 110 | (home-page "https://web.archive.org/web/20170502005430/http://home.gna.org/gdsl/")
|
| 111 | (synopsis "Generic data structures library")
|
| 112 | (description "The Generic Data Structures Library (GDSL) is a collection
|
| 113 | of routines for generic data structures manipulation. It is a re-entrant
|
| 114 | library fully written from scratch in pure ANSI C. It is designed to offer
|
| 115 | for C programmers common data structures with powerful algorithms, and hidden
|
| 116 | implementation. Available structures are lists, queues, stacks, hash tables,
|
| 117 | binary trees, binary search trees, red-black trees, 2D arrays, permutations
|
| 118 | and heaps.")
|
| 119 | (license license:gpl2+)))
|
| 120 |
|
| 121 | (define-public marisa
|
| 122 | (package
|
| 123 | (name "marisa")
|
| 124 | (version "0.2.6")
|
| 125 | (source
|
| 126 | (origin
|
| 127 | (method git-fetch)
|
| 128 | (uri (git-reference
|
| 129 | (url "https://github.com/s-yata/marisa-trie")
|
| 130 | (commit (string-append "v" version))))
|
| 131 | (file-name (git-file-name name version))
|
| 132 | (patches (search-patches "marisa-fix-MARISA_WORD_SIZE.patch"))
|
| 133 | (sha256
|
| 134 | (base32 "1hy8hfksizk1af6kg8z3b9waiz6d5ggd73fiqcvmhfgra36dscyq"))))
|
| 135 | (build-system gnu-build-system)
|
| 136 | (native-inputs
|
| 137 | (list autoconf automake libtool))
|
| 138 | (home-page "https://github.com/s-yata/marisa-trie")
|
| 139 | (synopsis "Trie data structure C++ library")
|
| 140 | (description "@acronym{MARISA, Matching Algorithm with Recursively
|
| 141 | Implemented StorAge} is a static and space-efficient trie data structure C++
|
| 142 | library.")
|
| 143 |
|
| 144 | |
| 145 | |
| 146 | (license (list license:bsd-2 license:lgpl2.1+))))
|
| 147 |
|
| 148 | (define-public sparsehash
|
| 149 | (package
|
| 150 | (name "sparsehash")
|
| 151 | (version "2.0.4")
|
| 152 | (source (origin
|
| 153 | (method git-fetch)
|
| 154 | (uri (git-reference
|
| 155 | (url "https://github.com/sparsehash/sparsehash")
|
| 156 | (commit (string-append name "-" version))))
|
| 157 | (file-name (git-file-name name version))
|
| 158 | (sha256
|
| 159 | (base32
|
| 160 | "1pf1cjvcjdmb9cd6gcazz64x0cd2ndpwh6ql2hqpypjv725xwxy7"))))
|
| 161 | (build-system gnu-build-system)
|
| 162 | (synopsis "Memory-efficient hashtable implementations")
|
| 163 | (description
|
| 164 | "This library contains several hash-map implementations, similar in API
|
| 165 | to SGI's @code{hash_map} class, but with different performance
|
| 166 | characteristics. @code{sparse_hash_map} uses very little space overhead, 1-2
|
| 167 | bits per entry. @code{dense_hash_map} is very fast, particularly on lookup.
|
| 168 | @code{sparse_hash_set} and @code{dense_hash_set} are the set versions of these
|
| 169 | routines. All these implementation use a hashtable with internal quadratic
|
| 170 | probing. This method is space-efficient -- there is no pointer overhead --
|
| 171 | and time-efficient for good hash functions.")
|
| 172 | (home-page "https://github.com/sparsehash/sparsehash")
|
| 173 | (license license:bsd-3)))
|
| 174 |
|
| 175 | (define-public parallel-hashmap
|
| 176 | (package
|
| 177 | (name "parallel-hashmap")
|
| 178 | (version "2.0.0")
|
| 179 | (source
|
| 180 | (origin
|
| 181 | (method git-fetch)
|
| 182 | (uri (git-reference
|
| 183 | (url "https://github.com/greg7mdp/parallel-hashmap")
|
| 184 | (commit (string-append "v" version))))
|
| 185 | (file-name (git-file-name name version))
|
| 186 | (sha256
|
| 187 | (base32 "167pvbd3bwyn69i1s4vp3badcr97xy10sga63bbj7jqhj09f2816"))))
|
| 188 | (build-system cmake-build-system)
|
| 189 | (arguments
|
| 190 | (list
|
| 191 | #:configure-flags
|
| 192 | #~(list "-DPHMAP_BUILD_EXAMPLES=OFF")
|
| 193 | #:phases
|
| 194 | #~(modify-phases %standard-phases
|
| 195 | (add-after 'unpack 'respect-tests?
|
| 196 | (lambda* (#:key tests? #:allow-other-keys)
|
| 197 | |
| 198 | (unless tests?
|
| 199 | (substitute* "CMakeLists.txt"
|
| 200 | (("option\\(PHMAP_BUILD_TESTS.+$")
|
| 201 | "set(PHMAP_BUILD_TESTS OFF)\n")))))
|
| 202 | (add-after 'unpack 'disable-gtest-download
|
| 203 | (lambda _
|
| 204 | |
| 205 | (substitute* "CMakeLists.txt"
|
| 206 | (("include\\(cmake/DownloadGTest.cmake\\)")
|
| 207 | (format #f
|
| 208 | "add_subdirectory(~a ./googletest-build EXCLUDE_FROM_ALL)"
|
| 209 | #+(package-source (this-package-native-input "googletest"))))))))))
|
| 210 | |
| 211 | (native-inputs (list googletest))
|
| 212 | (home-page "https://greg7mdp.github.io/parallel-hashmap/")
|
| 213 | (synopsis "C++ implementation of efficient and concurrent hash maps")
|
| 214 | (description
|
| 215 | "parallel-hashmap provides a family of header-only, very fast and
|
| 216 | memory-friendly hashmap and btree containers for C++11 and above.
|
| 217 |
|
| 218 | It has the following characteristics:
|
| 219 |
|
| 220 | @itemize
|
| 221 |
|
| 222 | @item Drop-in replacement for std::unordered_map, std::unordered_set, std::map,
|
| 223 | and std::set with better performance.
|
| 224 |
|
| 225 | @item Requires C++11 compiler support and provides C++14 and C++17 APIs,
|
| 226 | including features like try_emplace.
|
| 227 |
|
| 228 | @item Highly efficent and faster than standard unordered containers,
|
| 229 | Boost implementations, or sparsepp alternatives.
|
| 230 |
|
| 231 | @item Memory-friendly: maintains low memory usage with a slight increase compared
|
| 232 | to sparsepp.
|
| 233 |
|
| 234 | @item Heterogeneous lookup support.
|
| 235 |
|
| 236 | @item Dump/load feature: for flat hash maps storing std::trivially_copyable data,
|
| 237 | the entire table can be dumped to disk and restored as a single array efficiently
|
| 238 | without hash computations. This is about 10 times faster than element-wise
|
| 239 | serialization but uses 10% to 60% extra disk space.
|
| 240 |
|
| 241 | @item Automatic support for boost::hash_value() and default hash functions for
|
| 242 | std::pair and std::tuple.
|
| 243 |
|
| 244 | @end itemize")
|
| 245 | (license license:asl2.0)))
|
| 246 |
|
| 247 | (define-public verstable
|
| 248 | (package
|
| 249 | (name "verstable")
|
| 250 | (version "2.2.1")
|
| 251 | (source (origin
|
| 252 | (method git-fetch)
|
| 253 | (uri (git-reference
|
| 254 | (url "https://github.com/JacksonAllan/Verstable")
|
| 255 | (commit (string-append "v" version))))
|
| 256 | (file-name (git-file-name name version))
|
| 257 | (sha256
|
| 258 | (base32
|
| 259 | "0lwh9kh0jl2vxcijd8606h5xvsjxxa051qaqlx82cl36nh0hkkxp"))))
|
| 260 | (build-system copy-build-system)
|
| 261 | (arguments
|
| 262 | (list #:install-plan
|
| 263 | #~'(("verstable.h" "include/verstable.h"))
|
| 264 | #:phases
|
| 265 | #~(modify-phases %standard-phases
|
| 266 | (add-before 'install 'check
|
| 267 | (lambda* (#:key tests? #:allow-other-keys)
|
| 268 | (when tests?
|
| 269 | (invoke #$(cc-for-target) "tests/unit_tests.c"
|
| 270 | "-o" "unit_tests")
|
| 271 | (invoke "./unit_tests")
|
| 272 | (invoke #$(cxx-for-target) "tests/tests_against_stl.cpp"
|
| 273 | "-o" "tests_against_stl")
|
| 274 | (invoke "./tests_against_stl")))))))
|
| 275 | (home-page "https://github.com/JacksonAllan/Verstable")
|
| 276 | (synopsis "Generic hash table library for C")
|
| 277 | (description "Verstable is a versatile generic hash table intended to
|
| 278 | bring the speed and memory efficiency of state-of-the-art C++ hash tables such
|
| 279 | as Abseil/Swiss, Boost, and Bytell to C.
|
| 280 |
|
| 281 | Its features include:
|
| 282 | @itemize
|
| 283 | @item Type safety
|
| 284 | @item Customizable hash, comparison, and destructor functions
|
| 285 | @item Single header
|
| 286 | @item C99 compatibility
|
| 287 | @item Generic API in C11 and later
|
| 288 | @item High speed mostly impervious to load factor
|
| 289 | @item Only two bytes of overhead per bucket
|
| 290 | @item Tombstone-free deletion
|
| 291 | @end itemize")
|
| 292 | (license license:expat)))
|
| 293 |
|
| 294 | (define-public ssdeep
|
| 295 | (package
|
| 296 | (name "ssdeep")
|
| 297 | (version "2.14.1")
|
| 298 | (source
|
| 299 | (origin
|
| 300 | (method url-fetch)
|
| 301 | (uri (string-append "https://github.com/ssdeep-project/ssdeep/"
|
| 302 | "releases/download/release-" version "/"
|
| 303 | "ssdeep-" version ".tar.gz"))
|
| 304 | (sha256
|
| 305 | (base32 "04qkjc6kksxkv7xbnk32rwmf3a8czdv2vvrdzfs0kw06h73snbpz"))))
|
| 306 | (build-system gnu-build-system)
|
| 307 | (arguments
|
| 308 | `(#:configure-flags
|
| 309 | (list "--disable-static")))
|
| 310 | (home-page "https://ssdeep-project.github.io")
|
| 311 | (synopsis "Context-triggered piecewise hashing algorithm")
|
| 312 | (description "ssdeep computes and matches context triggered piecewise
|
| 313 | hashes (CTPH), also called fuzzy checksums. It can identify similar files
|
| 314 | that have sequences of identical bytes in the same order, even though bytes
|
| 315 | in between these sequences may be different in both content and length.")
|
| 316 | (license license:gpl2+)))
|
| 317 |
|
| 318 | (define-public libcuckoo
|
| 319 | (package
|
| 320 | (name "libcuckoo")
|
| 321 | (version "0.3.1")
|
| 322 | (source (origin
|
| 323 | (method git-fetch)
|
| 324 | (uri (git-reference
|
| 325 | (url "https://github.com/efficient/libcuckoo")
|
| 326 | (commit (string-append "v" version))))
|
| 327 | (file-name (git-file-name name version))
|
| 328 | (sha256
|
| 329 | (base32
|
| 330 | "0h9yhpkhk813dk66y6bs2csybw3pbpfnp3cakr2xism02vjwy19l"))))
|
| 331 | (build-system cmake-build-system)
|
| 332 | (arguments
|
| 333 | (list #:configure-flags #~'("-DBUILD_TESTS=1")))
|
| 334 | (home-page "https://efficient.github.io/libcuckoo/")
|
| 335 | (synopsis "Concurrent hash table")
|
| 336 | (description
|
| 337 | "@code{libcuckoo} provides a high-performance, compact hash table that
|
| 338 | allows multiple concurrent reader and writer threads.")
|
| 339 | (license license:asl2.0)))
|
| 340 |
|
| 341 | (define-public liburcu
|
| 342 | (package
|
| 343 | (name "liburcu")
|
| 344 | (version "0.15.6")
|
| 345 | (source (origin
|
| 346 | (method url-fetch)
|
| 347 | (uri (string-append "https://www.lttng.org/files/urcu/"
|
| 348 | "userspace-rcu-" version ".tar.bz2"))
|
| 349 | (sha256
|
| 350 | (base32
|
| 351 | "0ks1mj5r11ir9ssbxgm13pj9wix7gny9g3qfqzrfn4gbjqh1j2w5"))))
|
| 352 | (build-system gnu-build-system)
|
| 353 | (native-inputs
|
| 354 | (list perl)) |
| 355 | (home-page "https://liburcu.org/")
|
| 356 | (synopsis "User-space RCU data synchronisation library")
|
| 357 | (description "liburcu is a user-space @dfn{Read-Copy-Update} (RCU) data
|
| 358 | synchronisation library. It provides read-side access that scales linearly
|
| 359 | with the number of cores. liburcu-cds provides efficient data structures
|
| 360 | based on RCU and lock-free algorithms. These structures include hash tables,
|
| 361 | queues, stacks, and doubly-linked lists.")
|
| 362 | (license (list license:lgpl2.1 license:expat))))
|
| 363 |
|
| 364 | (define-public uthash
|
| 365 | (package
|
| 366 | (name "uthash")
|
| 367 | (version "2.1.0")
|
| 368 | (source
|
| 369 | (origin
|
| 370 | (method git-fetch)
|
| 371 | (uri (git-reference
|
| 372 | (url "https://github.com/troydhanson/uthash")
|
| 373 | (commit (string-append "v" version))))
|
| 374 | (file-name (git-file-name name version))
|
| 375 | (sha256
|
| 376 | (base32 "0k80bjbb6ss5wpmfmfji6xbyjm990hg9kcshwwnhdnh73vxkcd1m"))))
|
| 377 | (build-system gnu-build-system)
|
| 378 | (native-inputs
|
| 379 | (list perl))
|
| 380 | (arguments
|
| 381 | `(#:make-flags
|
| 382 | (list "CC=gcc")
|
| 383 | #:phases
|
| 384 | (modify-phases %standard-phases
|
| 385 | (delete 'configure) |
| 386 | (delete 'build) |
| 387 | (replace 'check
|
| 388 | (lambda* (#:key make-flags #:allow-other-keys)
|
| 389 | (with-directory-excursion "tests"
|
| 390 | (apply invoke "make" make-flags))))
|
| 391 | (replace 'install
|
| 392 | |
| 393 | (lambda* (#:key outputs #:allow-other-keys)
|
| 394 | (let* ((out (assoc-ref outputs "out"))
|
| 395 | (doc (string-append out "/share/doc/" ,name "-" ,version))
|
| 396 | (include (string-append out "/include")))
|
| 397 | |
| 398 | |
| 399 | (for-each (λ (file) (install-file file doc))
|
| 400 | (find-files "doc" "\\.txt$"))
|
| 401 | (for-each (λ (file) (install-file file include))
|
| 402 | (find-files "src" "\\.h$"))
|
| 403 | #t))))))
|
| 404 | (home-page "https://troydhanson.github.io/uthash/")
|
| 405 | (synopsis
|
| 406 | "Hash tables, lists, and other data structures implemented as C macros")
|
| 407 | (description
|
| 408 | "uthash implements a hash table and a few other basic data structures
|
| 409 | as C preprocessor macros. It aims to be minimalistic and efficient: it's
|
| 410 | around 1,000 lines of code which, being macros, inline automatically.
|
| 411 |
|
| 412 | Unlike function calls with fixed prototypes, macros operate on untyped
|
| 413 | arguments. Thus, they are able to work with any type of structure and key.
|
| 414 | Any C structure can be stored in a hash table by adding @code{UT_hash_handle}
|
| 415 | to the structure and choosing one or more fields to act as the key.")
|
| 416 | (license license:bsd-2)))
|
| 417 |
|
| 418 | (define-public sdsl-lite
|
| 419 | (package
|
| 420 | (name "sdsl-lite")
|
| 421 | (version "2.1.1")
|
| 422 | (source (origin
|
| 423 | (method url-fetch)
|
| 424 | (uri (string-append "https://github.com/simongog/sdsl-lite/"
|
| 425 | "releases/download/v" version "/"
|
| 426 | "sdsl-lite-" version
|
| 427 | ".tar.gz.offline.install.gz"))
|
| 428 | (sha256
|
| 429 | (base32
|
| 430 | "1v86ivv3mmdy802i9xkjpxb4cggj3s27wb19ja4sw1klnivjj69g"))
|
| 431 | (modules '((guix build utils)))
|
| 432 | (snippet
|
| 433 | '(begin
|
| 434 | (delete-file-recursively "external") #t))
|
| 435 | (patches
|
| 436 | (list (origin
|
| 437 | (method url-fetch)
|
| 438 | (uri "https://salsa.debian.org/science-team/libsdsl/raw/debian/2.1.1+dfsg-2/debian/patches/0001-Patch-cmake-files.patch")
|
| 439 | (file-name "sdsl-lite-dont-use-bundled-libraries.patch")
|
| 440 | (sha256
|
| 441 | (base32
|
| 442 | "0m542xpys54bni29zibgrfpgpd0zgyny4h131virxsanixsbz52z")))))))
|
| 443 | (build-system cmake-build-system)
|
| 444 | (arguments
|
| 445 | `(#:tests? #f
|
| 446 | #:phases
|
| 447 | (modify-phases %standard-phases
|
| 448 | (add-after 'install 'install-static-library
|
| 449 | (lambda* (#:key outputs #:allow-other-keys)
|
| 450 | (let ((out (assoc-ref outputs "out")))
|
| 451 | (copy-file "lib/libsdsl_static.a"
|
| 452 | (string-append out "/lib/libsdsl.a")))
|
| 453 | #t))
|
| 454 | (add-after 'install 'install-pkgconfig-file
|
| 455 | (lambda* (#:key outputs #:allow-other-keys)
|
| 456 | (let* ((out (assoc-ref outputs "out"))
|
| 457 | (lib (string-append out "/lib")))
|
| 458 | (mkdir-p (string-append lib "/pkgconfig"))
|
| 459 | (with-output-to-file (string-append lib "/pkgconfig/sdsl-lite.pc")
|
| 460 | (lambda _
|
| 461 | (format #t "prefix=~a~@
|
| 462 | exec_prefix=${prefix}~@
|
| 463 | libdir=${exec_prefix}/lib~@
|
| 464 | includedir=${prefix}/include~@
|
| 465 | ~@
|
| 466 | ~@
|
| 467 | Name: sdsl~@
|
| 468 | Version: ~a~@
|
| 469 | Description: SDSL: Succinct Data Structure Library~@
|
| 470 | Libs: -L${libdir} -lsdsl -ldivsufsort -ldivsufsort64~@
|
| 471 | Cflags: -I${includedir}~%"
|
| 472 | out ,version)))
|
| 473 | #t))))))
|
| 474 | (propagated-inputs
|
| 475 | (list libdivsufsort))
|
| 476 | (home-page "https://github.com/simongog/sdsl-lite")
|
| 477 | (synopsis "Succinct data structure library")
|
| 478 | (description "The Succinct Data Structure Library (SDSL) is a powerful and
|
| 479 | flexible C++11 library implementing succinct data structures. In total, the
|
| 480 | library contains the highlights of 40 research publications. Succinct data
|
| 481 | structures can represent an object (such as a bitvector or a tree) in space
|
| 482 | close to the information-theoretic lower bound of the object while supporting
|
| 483 | operations of the original object efficiently. The theoretical time
|
| 484 | complexity of an operation performed on the classical data structure and the
|
| 485 | equivalent succinct data structure are (most of the time) identical.")
|
| 486 | (license license:gpl3+)))
|
| 487 |
|
| 488 | (define-public tllist
|
| 489 | (package
|
| 490 | (name "tllist")
|
| 491 | (version "1.1.0")
|
| 492 | (home-page "https://codeberg.org/dnkl/tllist")
|
| 493 | (source (origin
|
| 494 | (method git-fetch)
|
| 495 | (uri (git-reference (url home-page) (commit version)))
|
| 496 | (file-name (git-file-name name version))
|
| 497 | (sha256
|
| 498 | (base32
|
| 499 | "03296h1w0rnsj87490cgy007axngyg1v8w3z5nvm6x5gcs6b8rg1"))))
|
| 500 | (build-system meson-build-system)
|
| 501 | (synopsis "Typed link list for C")
|
| 502 | (description
|
| 503 | "@code{tllist} is a @dfn{typed linked list} C header file only library
|
| 504 | implemented using pre-processor macros. It supports primitive data types as
|
| 505 | well as aggregated ones such as structs, enums and unions.")
|
| 506 | (license license:expat)))
|
| 507 |
|
| 508 | (define-public libdivsufsort
|
| 509 | (package
|
| 510 | (name "libdivsufsort")
|
| 511 | (version "2.0.1")
|
| 512 | (source (origin
|
| 513 | (method git-fetch)
|
| 514 | (uri (git-reference
|
| 515 | (url "https://github.com/y-256/libdivsufsort")
|
| 516 | (commit version)))
|
| 517 | (file-name (git-file-name name version))
|
| 518 | (sha256
|
| 519 | (base32
|
| 520 | "0fgdz9fzihlvjjrxy01md1bv9vh12rkgkwbm90b1hj5xpbaqp7z2"))))
|
| 521 | (build-system cmake-build-system)
|
| 522 | (arguments
|
| 523 | '(#:tests? #f |
| 524 | #:configure-flags
|
| 525 | |
| 526 | '("-DBUILD_DIVSUFSORT64=ON")))
|
| 527 | (home-page "https://github.com/y-256/libdivsufsort")
|
| 528 | (synopsis "Lightweight suffix-sorting library")
|
| 529 | (description "libdivsufsort is a software library that implements a
|
| 530 | lightweight suffix array construction algorithm. This library provides a
|
| 531 | simple and an efficient C API to construct a suffix array and a
|
| 532 | Burrows-Wheeler transformed string from a given string over a constant-size
|
| 533 | alphabet. The algorithm runs in O(n log n) worst-case time using only 5n+O(1)
|
| 534 | bytes of memory space, where n is the length of the string.")
|
| 535 | (license license:expat)))
|
| 536 |
|
| 537 | (define-public robin-map
|
| 538 | (package
|
| 539 | (name "robin-map")
|
| 540 | (version "1.4.1")
|
| 541 | (source (origin
|
| 542 | (method git-fetch)
|
| 543 | (uri (git-reference
|
| 544 | (url "https://github.com/Tessil/robin-map")
|
| 545 | (commit (string-append "v" version))))
|
| 546 | (file-name (git-file-name name version))
|
| 547 | (sha256
|
| 548 | (base32
|
| 549 | "1d17psbkp1jpq61rlddshg1ryly3z1qznq6dcyjyk3qhj3130acc"))))
|
| 550 | (build-system cmake-build-system)
|
| 551 | (native-inputs
|
| 552 | (list boost)) |
| 553 | (arguments
|
| 554 | `(#:phases
|
| 555 | (modify-phases %standard-phases
|
| 556 | (replace 'check
|
| 557 | (lambda* (#:key tests? #:allow-other-keys)
|
| 558 | (when tests?
|
| 559 | (mkdir "tests")
|
| 560 | (substitute* "../source/tests/CMakeLists.txt"
|
| 561 | (("set\\(Boost_USE_STATIC_LIBS.*") ""))
|
| 562 | (with-directory-excursion "tests"
|
| 563 | (invoke "cmake" "../../source/tests")
|
| 564 | (invoke "cmake" "--build" ".")
|
| 565 | (invoke "./tsl_robin_map_tests"))))))))
|
| 566 | (home-page "https://github.com/Tessil/robin-map")
|
| 567 | (synopsis "C++ implementation of a fast hash map and hash set")
|
| 568 | (description "The robin-map library is a C++ implementation of a fast hash
|
| 569 | map and hash set using open-addressing and linear robin hood hashing with
|
| 570 | backward shift deletion to resolve collisions.
|
| 571 |
|
| 572 | Four classes are provided: tsl::robin_map, tsl::robin_set, tsl::robin_pg_map
|
| 573 | and tsl::robin_pg_set. The first two are faster and use a power of two growth
|
| 574 | policy, the last two use a prime growth policy instead and are able to cope
|
| 575 | better with a poor hash function.")
|
| 576 | (license license:expat)))
|
| 577 |
|
| 578 | (define-public zix
|
| 579 | (package
|
| 580 | (name "zix")
|
| 581 | (version "0.4.2")
|
| 582 | (source (origin
|
| 583 | (method git-fetch)
|
| 584 | (uri (git-reference
|
| 585 | (url "https://gitlab.com/drobilla/zix.git")
|
| 586 | (commit (string-append "v" version))))
|
| 587 | (file-name (git-file-name name version))
|
| 588 | (sha256
|
| 589 | (base32
|
| 590 | "07pbq4bi64iv39swldfbcp7131b5n4hs64pgd417gqlwv8qvgjcw"))))
|
| 591 | (build-system meson-build-system)
|
| 592 | (arguments
|
| 593 | (list #:configure-flags #~(list "-Ddocs=disabled"))) |
| 594 | (native-inputs (list pkg-config))
|
| 595 | (home-page "https://gitlab.com/drobilla/zix")
|
| 596 | (synopsis "C library of portability wrappers and data structures")
|
| 597 | (description
|
| 598 | "Zix is a C library of portability wrappers and data structures. It
|
| 599 | provides the following components:
|
| 600 | @table @code
|
| 601 | @item ZixAllocator A customizable allocator.
|
| 602 | @item ZixBumpAllocator A simple realtime-safe bump-pointer allocator.
|
| 603 | @item ZixBTree A page-allocated B-tree.
|
| 604 | @item ZixHash An open-addressing hash table.
|
| 605 | @item ZixRing A lock-free realtime-safe ring buffer.
|
| 606 | @item ZixSem A portable semaphore wrapper.
|
| 607 | @item ZixThread A portable thread wrapper.
|
| 608 | @item ZixTree A binary search tree.
|
| 609 | @item zixgest.h Digest functions suitable for hashing arbitrary data.
|
| 610 | zix/filesystem.h Functions for working with filesystems.
|
| 611 | @item zix/path.h Functions for working with filesystem paths lexically.
|
| 612 | @end table")
|
| 613 | (license license:isc)))
|