;;; SPDX-License-Identifier: GPL-3.0-or-later ;;; Copyright © 2025 bdunahu (define-module (tanelorn packages engineering) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system meson) #:use-module (guix git-download) #:use-module (guix gexp) #:use-module (guix packages)) (define-public sdb (package (name "sdb") (version "2.2.4") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/radareorg/sdb.git") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "15pc807s2nmhnr3mspyz9h47rkxkv1r07x959ir17v5b6zs7wxvw")))) (build-system meson-build-system) (arguments (list #:phases #~(modify-phases %standard-phases ;; The meson config offloads the work of running the tests to ;; the Makefile, which 1) assumes the source directory is the parent ;; of the build directory, and 2) the CC environment variable is set. (add-before 'check 'fix-meson-test-declaration (lambda _ (substitute* "../source/meson.build" (("env: \\[(.*)$" _ end) (string-append "env: ['CC=gcc', " end)) (("workdir: join_paths.*$") "workdir: meson.project_source_root(),\n"))))))) (home-page "https://github.com/radareorg/sdb") (synopsis "Simple and fast string based key-value database") (description "SDB is a simple key/value database based on djb's cdb disk storage that supports JSON and array introspection.") (license license:expat)))