+
+(define-public sdsl-lite
+ (package
+ (name "sdsl-lite")
+ (version "2.1.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/simongog/sdsl-lite/"
+ "releases/download/v" version "/"
+ "sdsl-lite-" version
+ ".tar.gz.offline.install.gz"))
+ (sha256
+ (base32
+ "1v86ivv3mmdy802i9xkjpxb4cggj3s27wb19ja4sw1klnivjj69g"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ (delete-file-recursively "external") #t))
+ (patches
+ (list (origin
+ (method url-fetch)
+ (uri "https://salsa.debian.org/science-team/libsdsl/raw/debian/2.1.1+dfsg-2/debian/patches/0001-Patch-cmake-files.patch")
+ (file-name "sdsl-lite-dont-use-bundled-libraries.patch")
+ (sha256
+ (base32
+ "0m542xpys54bni29zibgrfpgpd0zgyny4h131virxsanixsbz52z")))))))
+ (build-system cmake-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'install-static-library
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (copy-file "lib/libsdsl_static.a"
+ (string-append out "/lib/libsdsl.a")))
+ #t)))))
+ (native-inputs
+ `(("libdivsufsort" ,libdivsufsort)))
+ (home-page "https://github.com/simongog/sdsl-lite")
+ (synopsis "Succinct data structure library")
+ (description "The Succinct Data Structure Library (SDSL) is a powerful and
+flexible C++11 library implementing succinct data structures. In total, the
+library contains the highlights of 40 research publications. Succinct data
+structures can represent an object (such as a bitvector or a tree) in space
+close to the information-theoretic lower bound of the object while supporting
+operations of the original object efficiently. The theoretical time
+complexity of an operation performed on the classical data structure and the
+equivalent succinct data structure are (most of the time) identical.")
+ (license license:gpl3+)))
+
+(define-public libdivsufsort
+ (package
+ (name "libdivsufsort")
+ (version "2.0.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/y-256/libdivsufsort.git")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0fgdz9fzihlvjjrxy01md1bv9vh12rkgkwbm90b1hj5xpbaqp7z2"))))
+ (build-system cmake-build-system)
+ (arguments
+ '(#:tests? #f ; there are no tests
+ #:configure-flags
+ ;; Needed for rapmap and sailfish.
+ '("-DBUILD_DIVSUFSORT64=ON")))
+ (home-page "https://github.com/y-256/libdivsufsort")
+ (synopsis "Lightweight suffix-sorting library")
+ (description "libdivsufsort is a software library that implements a
+lightweight suffix array construction algorithm. This library provides a
+simple and an efficient C API to construct a suffix array and a
+Burrows-Wheeler transformed string from a given string over a constant-size
+alphabet. The algorithm runs in O(n log n) worst-case time using only 5n+O(1)
+bytes of memory space, where n is the length of the string.")
+ (license license:expat)))