| 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 storage)
|
| 28 | #:use-module ((guix licenses) #:prefix license:)
|
| 29 | #:use-module (gnu packages admin)
|
| 30 | #:use-module (gnu packages assembly)
|
| 31 | #:use-module (gnu packages authentication)
|
| 32 | #:use-module (gnu packages autotools)
|
| 33 | #:use-module (gnu packages backup)
|
| 34 | #:use-module (gnu packages base)
|
| 35 | #:use-module (gnu packages bash)
|
| 36 | #:use-module (gnu packages bdw-gc)
|
| 37 | #:use-module (gnu packages boost)
|
| 38 | #:use-module (gnu packages bootstrap)
|
| 39 | #:use-module (gnu packages check)
|
| 40 | #:use-module (gnu packages commencement)
|
| 41 | #:use-module (gnu packages compression)
|
| 42 | #:use-module (gnu packages compression)
|
| 43 | #:use-module (gnu packages crypto)
|
| 44 | #:use-module (gnu packages cryptsetup)
|
| 45 | #:use-module (gnu packages curl)
|
| 46 | #:use-module (gnu packages databases)
|
| 47 | #:use-module (gnu packages disk)
|
| 48 | #:use-module (gnu packages dpdk)
|
| 49 | #:use-module (gnu packages elf)
|
| 50 | #:use-module (gnu packages elf)
|
| 51 | #:use-module (gnu packages gcc)
|
| 52 | #:use-module (gnu packages gperf)
|
| 53 | #:use-module (gnu packages icu4c)
|
| 54 | #:use-module (gnu packages jemalloc)
|
| 55 | #:use-module (gnu packages libbsd)
|
| 56 | #:use-module (gnu packages linux)
|
| 57 | #:use-module (gnu packages linux)
|
| 58 | #:use-module (gnu packages llvm)
|
| 59 | #:use-module (gnu packages lua)
|
| 60 | #:use-module (gnu packages maths)
|
| 61 | #:use-module (gnu packages ncurses)
|
| 62 | #:use-module (gnu packages networking)
|
| 63 | #:use-module (gnu packages nss)
|
| 64 | #:use-module (gnu packages openldap)
|
| 65 | #:use-module (gnu packages perl)
|
| 66 | #:use-module (gnu packages pkg-config)
|
| 67 | #:use-module (gnu packages pretty-print)
|
| 68 | #:use-module (gnu packages protobuf)
|
| 69 | #:use-module (gnu packages python)
|
| 70 | #:use-module (gnu packages python-build)
|
| 71 | #:use-module (gnu packages python-xyz)
|
| 72 | #:use-module (gnu packages rpc)
|
| 73 | #:use-module (gnu packages sphinx)
|
| 74 | #:use-module (gnu packages sqlite)
|
| 75 | #:use-module (gnu packages textutils)
|
| 76 | #:use-module (gnu packages tls)
|
| 77 | #:use-module (gnu packages version-control)
|
| 78 | #:use-module (gnu packages web)
|
| 79 | #:use-module (gnu packages xml)
|
| 80 | #:use-module (gnu packages)
|
| 81 | #:use-module (guix build-system cargo)
|
| 82 | #:use-module (guix build-system cmake)
|
| 83 | #:use-module (guix build-system gnu)
|
| 84 | #:use-module (guix build-system pyproject)
|
| 85 | #:use-module (guix download)
|
| 86 | #:use-module (guix gexp)
|
| 87 | #:use-module (guix git-download)
|
| 88 | #:use-module (guix packages)
|
| 89 | #:use-module (guix utils))
|
| 90 |
|
| 91 | (define-public ceph
|
| 92 | (package
|
| 93 | (name "ceph")
|
| 94 | (version "21.0.0")
|
| 95 | (source (origin
|
| 96 | (method git-fetch)
|
| 97 | (uri (git-reference
|
| 98 | (url "https://github.com/ceph/ceph")
|
| 99 | (commit (string-append "v" version))
|
| 100 | |
| 101 | |
| 102 | |
| 103 | (recursive? #t)))
|
| 104 | (file-name (git-file-name name version))
|
| 105 | (sha256
|
| 106 | (base32
|
| 107 | "13rv8kz0rjnldxs4ldpxhckqn7pf95rr8wlvg9s6nwcvl31iq9cv"))
|
| 108 | (modules '((guix build utils)))
|
| 109 | (snippet
|
| 110 | |
| 111 | '(for-each delete-file-recursively
|
| 112 | '( |
| 113 | |
| 114 | |
| 115 | "src/BLAKE3"
|
| 116 | "src/arrow"
|
| 117 | "src/c-ares"
|
| 118 | "src/fmt"
|
| 119 | "src/googletest"
|
| 120 | "src/jaegertracing"
|
| 121 | "src/qatlib"
|
| 122 | "src/qatzip"
|
| 123 | "src/spdk"
|
| 124 | "src/rocksdb"
|
| 125 | "src/utf8proc"
|
| 126 | "src/zstd"
|
| 127 | "systemd")))))
|
| 128 | (build-system cmake-build-system)
|
| 129 | (arguments
|
| 130 | (list
|
| 131 | #:configure-flags
|
| 132 | #~(list (string-append "-DCMAKE_INSTALL_RPATH="
|
| 133 | #$output "/lib" ";" #$output "/lib/ceph")
|
| 134 | "-DENABLE_GIT_VERSION=OFF"
|
| 135 | "-DCMAKE_INSTALL_LOCALSTATEDIR=/var"
|
| 136 | "-DBUILD_SHARED_LIBS=ON"
|
| 137 | "-DCEPHADM_BUNDLED_DEPENDENCIES=none"
|
| 138 | "-DWITH_SYSTEM_ARROW=ON"
|
| 139 | "-DWITH_SYSTEM_BOOST=ON"
|
| 140 | "-DWITH_SYSTEM_CATCH2=ON"
|
| 141 | "-DWITH_SYSTEM_FMT=ON"
|
| 142 | #$@(if (target-x86-64?)
|
| 143 | #~("-DWITH_SYSTEM_QATLIB=ON"
|
| 144 | "-DWITH_SYSTEM_QATZIP=ON")
|
| 145 | #~())
|
| 146 | "-DWITH_SYSTEM_LIBURING=ON"
|
| 147 | "-DWITH_SYSTEM_ROCKSDB=ON"
|
| 148 | "-DWITH_SYSTEM_UTF8PROC=ON"
|
| 149 | "-DWITH_SYSTEM_ZSTD=ON"
|
| 150 |
|
| 151 | |
| 152 | "-DWITH_MGR=OFF" |
| 153 | "-DWITH_MGR_DASHBOARD_FRONTEND=OFF" |
| 154 | "-DWITH_BABELTRACE=OFF"
|
| 155 | "-DWITH_BREAKPAD=OFF"
|
| 156 | "-DWITH_JAEGER=OFF" |
| 157 | "-DWITH_LTTNG=OFF"
|
| 158 | "-DWITH_RADOSGW=OFF" |
| 159 | "-DWITH_SPDK=OFF"
|
| 160 | "-DWITH_RADOSGW_AMQP_ENDPOINT=OFF"
|
| 161 |
|
| 162 | |
| 163 | "-DALLOCATOR=jemalloc"
|
| 164 |
|
| 165 | |
| 166 | "-DWITH_SYSTEMD=OFF"
|
| 167 |
|
| 168 | |
| 169 | |
| 170 | "-DWITH_TESTS=OFF")
|
| 171 | |
| 172 | |
| 173 | |
| 174 | #:tests? #f
|
| 175 | #:phases
|
| 176 | #~(modify-phases %standard-phases
|
| 177 | (add-after 'unpack 'unbundle-blake3
|
| 178 | (lambda _
|
| 179 | |
| 180 | (substitute* "src/CMakeLists.txt"
|
| 181 | (("add_subdirectory.*BLAKE3.*") ""))))
|
| 182 | (add-after 'unpack 'relax-fmt-requirement
|
| 183 | (lambda _
|
| 184 | (substitute* "src/CMakeLists.txt"
|
| 185 | (("11.1.4 REQUIRED")
|
| 186 | "<12 REQUIRED"))))
|
| 187 | (add-after 'unpack 'fix-zstd-include
|
| 188 | (lambda _
|
| 189 | |
| 190 | (substitute* "src/compressor/zstd/ZstdCompressor.h"
|
| 191 | (("#include \"zstd/lib/zstd.h\"")
|
| 192 | "#include \"zstd.h\""))))
|
| 193 | (add-after 'unpack 'set-source-file-times-to-1980
|
| 194 | (lambda _
|
| 195 | (let ((circa-1980 (* 10 366 24 60 60)))
|
| 196 | (for-each (lambda (f) (utime f circa-1980 circa-1980))
|
| 197 | (find-files "src")))))
|
| 198 | (add-before 'build 'build-legacy-option-header
|
| 199 | (lambda _
|
| 200 | |
| 201 | |
| 202 | |
| 203 | (invoke "make" "legacy-option-headers")))
|
| 204 | (add-after 'unpack 'patch-source
|
| 205 | (lambda _
|
| 206 | |
| 207 | |
| 208 | |
| 209 | (substitute* (find-files "src/pybind" "setup\\.py")
|
| 210 | (("^( *)libraries=libs \\+ py_libs," all blank)
|
| 211 | (format #f "~aruntime_library_dirs=[~s],~%~a"
|
| 212 | blank (string-append #$output "/lib") all)))
|
| 213 | (substitute* "udev/50-rbd.rules"
|
| 214 | (("/usr/bin/ceph-rbdnamer")
|
| 215 | (string-append #$output "/bin/ceph-rbdnamer")))
|
| 216 | |
| 217 | (substitute* "src/os/memstore/CMakeLists.txt"
|
| 218 | (("add_library\\(memstore" all)
|
| 219 | (string-append all " STATIC")))))
|
| 220 | (add-after 'install 'post-install
|
| 221 | (lambda _
|
| 222 | (let ((lib (string-append #$output "/lib")))
|
| 223 | |
| 224 | |
| 225 | (install-file "../build/lib/libfusestore.so"
|
| 226 | (string-append #$output "/lib"))
|
| 227 | |
| 228 | |
| 229 | |
| 230 | (invoke "patchelf" "--add-rpath" lib
|
| 231 | (string-append #$output "/bin/ceph-osd")))))
|
| 232 | (add-after 'install 'wrap-python-scripts
|
| 233 | (lambda* (#:key inputs #:allow-other-keys)
|
| 234 | (let* ((scripts '("bin/ceph" "bin/cephfs-top" "sbin/ceph-volume"))
|
| 235 | (dependencies (map (lambda (input)
|
| 236 | (assoc-ref inputs input))
|
| 237 | '("python-prettytable" "python-pyyaml")))
|
| 238 | (site (lambda (package)
|
| 239 | (string-append package
|
| 240 | "/lib/python"
|
| 241 | #$(version-major+minor
|
| 242 | (package-version
|
| 243 | (this-package-input "python")))
|
| 244 | "/site-packages")))
|
| 245 | (PYTHONPATH (string-join
|
| 246 | (map site (cons #$output dependencies))
|
| 247 | ":")))
|
| 248 | (for-each (lambda (s)
|
| 249 | (wrap-program (string-append #$output "/" s)
|
| 250 | `("GUIX_PYTHONPATH" prefix (,PYTHONPATH))))
|
| 251 | scripts)))))))
|
| 252 | (native-inputs
|
| 253 | (list catch2
|
| 254 | patchelf
|
| 255 | pkg-config
|
| 256 | python
|
| 257 | python-cython
|
| 258 | python-setuptools
|
| 259 | python-sphinx
|
| 260 | yasm))
|
| 261 | (inputs
|
| 262 | (append
|
| 263 | (if (target-x86-64?)
|
| 264 | (list qatlib qatzip)
|
| 265 | '())
|
| 266 | (list `(,apache-thrift "lib")
|
| 267 | `(,apache-thrift "include")
|
| 268 | `(,apache-arrow "lib")
|
| 269 | `(,util-linux "lib")
|
| 270 | bash-minimal
|
| 271 | boost
|
| 272 | cryptsetup-minimal
|
| 273 | curl
|
| 274 | eudev
|
| 275 | expat
|
| 276 | fcgi
|
| 277 | fmt-11
|
| 278 | fuse
|
| 279 | icu4c
|
| 280 | jemalloc
|
| 281 | keyutils
|
| 282 | leveldb
|
| 283 | libaio
|
| 284 | libatomic-ops
|
| 285 | libcap |
| 286 | libcap-ng
|
| 287 | libblake3
|
| 288 | libnbd
|
| 289 | libnl
|
| 290 | librdkafka
|
| 291 | liburing
|
| 292 | lmdb
|
| 293 | lua
|
| 294 | lz4
|
| 295 | ncurses
|
| 296 | nss
|
| 297 | oath-toolkit
|
| 298 | openldap
|
| 299 | openssl
|
| 300 | python
|
| 301 | python-prettytable |
| 302 | python-pyyaml |
| 303 | rapidjson
|
| 304 | rdma-core
|
| 305 | rocksdb-for-ceph
|
| 306 | snappy
|
| 307 | sqlite
|
| 308 | utf8proc
|
| 309 | util-linux
|
| 310 | xfsprogs
|
| 311 | zlib
|
| 312 | `(,zstd "lib"))))
|
| 313 | (home-page "https://ceph.io/en/")
|
| 314 | (synopsis "Distributed object store and file system")
|
| 315 | (description
|
| 316 | "Ceph is a distributed storage system designed for reliability and
|
| 317 | performance. It provides network-based block devices (RBD), a POSIX
|
| 318 | compliant file system (CephFS), and offers compatibility with various
|
| 319 | storage protocols (S3, NFS, and others) through the RADOS gateway.")
|
| 320 | |
| 321 | |
| 322 | |
| 323 | |
| 324 | |
| 325 | (license (list license:lgpl2.1 license:gpl2 |
| 326 | license:cc-by-sa3.0 |
| 327 | license:bsd-3 |
| 328 | license:expat)))) |
| 329 |
|
| 330 | (define-public libnbd
|
| 331 | (package
|
| 332 | (name "libnbd")
|
| 333 | (version "1.24.0")
|
| 334 | (source (origin
|
| 335 | (method url-fetch)
|
| 336 | (uri (string-append "https://download.libguestfs.org/" name "/"
|
| 337 | (version-major+minor version) "-stable/"
|
| 338 | name "-" version ".tar.gz"))
|
| 339 |
|
| 340 | (sha256
|
| 341 | (base32
|
| 342 | "1vz62w270p23787v1r51rbcfd9lh73b99mcaf7q27pldc7bazggm"))))
|
| 343 | (build-system gnu-build-system)
|
| 344 | (arguments
|
| 345 | |
| 346 | |
| 347 | (list
|
| 348 | #:configure-flags
|
| 349 | #~(list (string-append "--with-python-installdir="
|
| 350 | #$output "/lib/python"
|
| 351 | #$(package-version (this-package-input
|
| 352 | "python-minimal"))
|
| 353 | "/site-packages"))
|
| 354 | #:make-flags #~(list "XFAIL_TESTS=test-fork-safe-execvpe.sh")
|
| 355 | #:phases #~(modify-phases %standard-phases
|
| 356 | (add-after 'unpack 'patch-commands
|
| 357 | (lambda* (#:key inputs #:allow-other-keys)
|
| 358 | (substitute* '("lib/utils.c"
|
| 359 | "sh/nbdsh.in")
|
| 360 | (("/bin/sh")
|
| 361 | (search-input-file inputs "bin/sh"))))))))
|
| 362 | (native-inputs (list pkg-config perl))
|
| 363 | (inputs (list bash-minimal fuse gnutls libxml2
|
| 364 | python-minimal)) |
| 365 | (home-page "https://gitlab.com/nbdkit/libnbd")
|
| 366 | (synopsis "Network Block Device client library in userspace")
|
| 367 | (description "@acronym{NBD, Network Block Device} is a protocol
|
| 368 | for accessing block devices (hard disks and disk-like things) over a network.
|
| 369 | This is the NBD client library in userspace, a simple library for writing NBD
|
| 370 | clients. The key features are:
|
| 371 | @itemize
|
| 372 | @item Synchronous API for ease of use.
|
| 373 | @item Asynchronous API for writing non-blocking, multithreaded clients.
|
| 374 | @item High performance.
|
| 375 | @item Minimal dependencies for the basic library.
|
| 376 | @item Well-documented, stable API.
|
| 377 | @item Bindings in several programming languages.
|
| 378 | @item Shell (nbdsh) for command line and scripting.
|
| 379 | @item Copying tool (nbdcopy) for high performance copying and streaming.
|
| 380 | @item Hexdump tool (nbddump) to print NBD content.
|
| 381 | @item Query tool (nbdinfo) to query NBD servers.
|
| 382 | @item FUSE support (nbdfuse) to mount NBD in the local file system.
|
| 383 | @item Linux ublk support (nbdublk) to create the userspace block device.
|
| 384 | @end itemize")
|
| 385 | (license license:lgpl2.1+)))
|
| 386 |
|
| 387 | (define-public spdk
|
| 388 | (package
|
| 389 | (name "spdk")
|
| 390 | (version "25.09")
|
| 391 | (source
|
| 392 | (origin
|
| 393 | (method git-fetch)
|
| 394 | (uri (git-reference
|
| 395 | (url "https://github.com/spdk/spdk")
|
| 396 | (commit (string-append "v" version))))
|
| 397 | (sha256
|
| 398 | (base32 "1x2nrg4qjilym18shb792593gn1bwihzaq19bxms06mmw40x4s6n"))))
|
| 399 | (build-system gnu-build-system)
|
| 400 | (arguments
|
| 401 | (list
|
| 402 | |
| 403 | |
| 404 | #:tests? #f
|
| 405 | #:imported-modules
|
| 406 | (append %default-gnu-imported-modules
|
| 407 | %pyproject-build-system-modules)
|
| 408 | #:validate-runpath? #f
|
| 409 | #:modules '((guix build gnu-build-system)
|
| 410 | (guix build utils)
|
| 411 | ((guix build pyproject-build-system) #:prefix py:)
|
| 412 | (ice-9 rdelim)
|
| 413 | (ice-9 popen))
|
| 414 | #:configure-flags
|
| 415 | #~(list "--with-shared"
|
| 416 | (string-append "--prefix=" #$output)
|
| 417 | (string-append "--with-dpdk=" #$(this-package-input "dpdk")))
|
| 418 | #:phases
|
| 419 | #~(modify-phases %standard-phases
|
| 420 | (add-after 'unpack 'substitute-git-submodules
|
| 421 | (lambda _
|
| 422 | (rmdir "isa-l")
|
| 423 | (symlink #$(package-source (this-package-input "isa-l")) "isa-l")))
|
| 424 | (add-after 'substitute-git-submodules 'skip-python-make-subdir
|
| 425 | |
| 426 | |
| 427 | |
| 428 | |
| 429 | (lambda _
|
| 430 | (substitute* "Makefile"
|
| 431 | (("DIRS-y \\+= python") ""))))
|
| 432 | (replace 'configure
|
| 433 | (lambda* (#:key configure-flags #:allow-other-keys)
|
| 434 | (substitute* "configure"
|
| 435 | (("#! /bin/sh") (string-append "#!" (which "sh"))))
|
| 436 | (setenv "CC" #$(cc-for-target))
|
| 437 | (setenv "CFLAGS" "-mssse3")
|
| 438 | (setenv "CONFIG_SHELL" (which "bash"))
|
| 439 | (setenv "LDFLAGS" "-lbsd")
|
| 440 | (setenv "SHELL" (which "bash"))
|
| 441 | (apply invoke "./configure" configure-flags)))
|
| 442 | (add-before 'install 'set-install-environment
|
| 443 | |
| 444 | (lambda _
|
| 445 | (let ((py3sitedir
|
| 446 | (string-append #$output "/lib/python"
|
| 447 | #$(version-major+minor
|
| 448 | (package-version python))
|
| 449 | "/site-packages")))
|
| 450 | (setenv "PYTHONPATH" py3sitedir))))
|
| 451 | (add-after 'install 'patchelf
|
| 452 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 453 | (let* ((binaries '("iscsi_tgt" "nvmf_tgt"
|
| 454 | "spdk_dd" "spdk_lspci" "spdk_nvme_discover"
|
| 455 | "spdk_tgt" "spdk_top" "spdk_trace"
|
| 456 | "spdk_nvme_identify" "spdk_nvme_perf"
|
| 457 | "spdk_trace_record" "vhost"))
|
| 458 | (ld-so (search-input-file inputs #$(glibc-dynamic-linker)))
|
| 459 | (libs
|
| 460 | (list
|
| 461 | (string-append #$(this-package-input "libbsd") "/lib")
|
| 462 | (string-append #$(this-package-input "libarchive") "/lib")
|
| 463 | (string-append #$(this-package-input "numactl") "/lib")
|
| 464 | (string-append #$(gexp-input util-linux "lib") "/lib")
|
| 465 | (string-append #$(this-package-input "openssl") "/lib")
|
| 466 | (string-append #$(this-package-input "openlibm") "/lib")
|
| 467 | (string-append #$(this-package-input "libaio") "/lib")
|
| 468 | (string-append #$(this-package-input "dpdk") "/lib")
|
| 469 | (string-append #$(this-package-input "fuse") "/lib")
|
| 470 | (string-append #$(this-package-input "gcc") "/lib")
|
| 471 | (string-append #$(this-package-input "glibc") "/lib")
|
| 472 | (string-append #$(this-package-input "ncurses") "/lib")))
|
| 473 | (rpath* (apply string-append (map (lambda (l) (string-append l ":")) libs))))
|
| 474 | (for-each
|
| 475 | (lambda (b)
|
| 476 | (let ((file (string-append #$output "/bin/" b)))
|
| 477 | (invoke "patchelf" "--set-interpreter" ld-so file)
|
| 478 | (let* ((pipe (open-pipe* OPEN_READ "patchelf" "--print-rpath" file))
|
| 479 | (line (read-line pipe)))
|
| 480 | (and (zero? (close-pipe pipe))
|
| 481 | (invoke "patchelf" "--set-rpath" (string-append rpath* line)
|
| 482 | file)))
|
| 483 | (wrap-program file
|
| 484 | `("LD_LIBRARY_PATH" ":" prefix (,(string-append #$output "/lib"))))))
|
| 485 | binaries))))
|
| 486 | (add-after 'patchelf 'python:wrap
|
| 487 | (assoc-ref py:%standard-phases 'wrap))
|
| 488 | (add-before 'python:wrap 'install-python-package
|
| 489 | |
| 490 | |
| 491 | |
| 492 | |
| 493 | (lambda* (#:key outputs #:allow-other-keys)
|
| 494 | (invoke "python" "-c"
|
| 495 | (string-append
|
| 496 | "v=open('VERSION').read().strip();"
|
| 497 | "p=v.split('.');"
|
| 498 | "ver=p[0]+'.'+p[1]+(('.'+p[2]) if len(p)>2 and p[2]!='0' else '');"
|
| 499 | "open('python/spdk/version.py','w')"
|
| 500 | ".write(\"__version__ = '\"+ver+\"'\\n\")"))
|
| 501 | |
| 502 | |
| 503 | (setenv "SOURCE_DATE_EPOCH" "315532800")
|
| 504 | (with-directory-excursion "python"
|
| 505 | (invoke "python" "-m" "hatchling" "build" "-t" "wheel")
|
| 506 | (let ((wheel (car (find-files "dist" "\\.whl$"))))
|
| 507 | (invoke "python" "-m" "installer"
|
| 508 | "--prefix" #$output wheel)))))
|
| 509 | (add-after 'python:wrap 'wrap-python-scripts
|
| 510 | (lambda* (#:key inputs #:allow-other-keys)
|
| 511 | (let* ((scripts '("bin/spdk-cli" "bin/spdk-rpc"))
|
| 512 | (dependencies (map (lambda (input)
|
| 513 | (assoc-ref inputs input))
|
| 514 | '("python-configshell-fb")))
|
| 515 | (python-version #$(version-major+minor (package-version python)))
|
| 516 | (sitedir (lambda (package)
|
| 517 | (string-append package "/lib/python"
|
| 518 | python-version "/site-packages")))
|
| 519 | (PYTHONPATH (string-join (map sitedir (cons #$output dependencies)) ":")))
|
| 520 | (for-each (lambda (executable)
|
| 521 | (wrap-program (string-append #$output "/" executable)
|
| 522 | `("GUIX_PYTHONPATH" ":" prefix (,PYTHONPATH))))
|
| 523 | scripts)))))))
|
| 524 | (native-inputs
|
| 525 | (list autoconf
|
| 526 | automake
|
| 527 | patchelf
|
| 528 | pkg-config
|
| 529 | python-installer
|
| 530 | python-wrapper))
|
| 531 | (inputs
|
| 532 | (list cunit
|
| 533 | dpdk
|
| 534 | elfutils
|
| 535 | fuse
|
| 536 | (list gcc "lib")
|
| 537 | glibc
|
| 538 | isa-l
|
| 539 | jansson
|
| 540 | libaio
|
| 541 | libarchive
|
| 542 | libbsd
|
| 543 | libnl
|
| 544 | libpcap
|
| 545 | ncurses
|
| 546 | numactl
|
| 547 | openlibm
|
| 548 | openssl
|
| 549 | python-configshell-fb
|
| 550 | python-hatchling |
| 551 | (list util-linux "lib") |
| 552 | zlib
|
| 553 | zstd))
|
| 554 | (home-page "https://spdk.io/")
|
| 555 | (synopsis "Storage Performance Development Kit")
|
| 556 | (description
|
| 557 | "@acronym{Storage Performance Development Kit, SPDK} provides a set of
|
| 558 | tools and libraries for writing high performance,scalable, user-mode storage
|
| 559 | applications.
|
| 560 |
|
| 561 | Note: the @command{spdk-mcp} binary requires the optional @code{mcp[cli]}
|
| 562 | Python dependency, and @command{spdk-sma} requires @code{grpcio} and
|
| 563 | @code{protobuf}. These are not currently packaged in Guix.")
|
| 564 | (license license:bsd-3)))
|
| 565 |
|
| 566 | (define-public swapspace
|
| 567 | (package
|
| 568 | (name "swapspace")
|
| 569 | (version "1.18.1")
|
| 570 | (source (origin
|
| 571 | (method git-fetch)
|
| 572 | (uri (git-reference
|
| 573 | (url "https://github.com/Tookmund/swapspace")
|
| 574 | (commit (string-append "v" version))))
|
| 575 | (file-name (git-file-name name version))
|
| 576 | (sha256
|
| 577 | (base32
|
| 578 | "1cpmrmwfvzkjll82b6gjnyrmpz69hfx98jf6xx463va7bncdvcra"))))
|
| 579 | (build-system gnu-build-system)
|
| 580 | (native-inputs (list autoconf automake))
|
| 581 | (home-page "https://github.com/Tookmund/swapspace")
|
| 582 | (synopsis "Dynamic swap manager for Linux")
|
| 583 | (description "This package provides a dynamic swap manager for Linux.")
|
| 584 | (license license:gpl2+)))
|
| 585 |
|
| 586 | (define-public garage
|
| 587 | (package
|
| 588 | (name "garage")
|
| 589 | (version "2.4.0")
|
| 590 | (source
|
| 591 | (origin
|
| 592 | (method git-fetch)
|
| 593 | (uri (git-reference
|
| 594 | (url "https://git.deuxfleurs.fr/Deuxfleurs/garage.git")
|
| 595 | (commit (string-append "v" version))))
|
| 596 | (file-name (git-file-name name version))
|
| 597 | (sha256
|
| 598 | (base32 "0v93gl1gppr7llwjgv3x6hyhsc5pj3drnlhcc7xhnza1m6lz16fl"))
|
| 599 | (snippet
|
| 600 | #~(begin (use-modules (guix build utils))
|
| 601 | (delete-file-recursively "doc")))))
|
| 602 | (build-system cargo-build-system)
|
| 603 | (arguments
|
| 604 | (list
|
| 605 | |
| 606 | #:cargo-build-flags `(list "--no-default-features")
|
| 607 | |
| 608 | #:cargo-test-flags `(list "--release" "--no-default-features")
|
| 609 | #:cargo-install-paths ''("src/garage")
|
| 610 | #:features '(list "system-libs"
|
| 611 | "k2v"
|
| 612 | "kubernetes-discovery"
|
| 613 | "lmdb"
|
| 614 | "metrics"
|
| 615 | "sqlite"
|
| 616 | "syslog"
|
| 617 | "telemetry-otlp")
|
| 618 | #:install-source? #f
|
| 619 | #:modules
|
| 620 | '((guix build cargo-build-system)
|
| 621 | (guix build utils)
|
| 622 | (ice-9 match))
|
| 623 | #:phases
|
| 624 | #~(modify-phases %standard-phases
|
| 625 | |
| 626 | (replace 'check
|
| 627 | (lambda* (#:key features cargo-test-flags #:allow-other-keys
|
| 628 | #:rest args)
|
| 629 | (apply (assoc-ref %standard-phases 'check)
|
| 630 | (append
|
| 631 | args
|
| 632 | (list #:cargo-test-flags
|
| 633 | (append cargo-test-flags
|
| 634 | (list "--features"
|
| 635 | (string-join features))))))))
|
| 636 | |
| 637 | (replace 'install
|
| 638 | (lambda* (#:key cargo-install-paths features #:allow-other-keys)
|
| 639 | (mkdir-p #$output)
|
| 640 | (setenv "CARGO_TARGET_DIR" "./target")
|
| 641 | (for-each
|
| 642 | (lambda (path)
|
| 643 | (invoke "cargo" "install" "--offline" "--no-track"
|
| 644 | "--path" path "--root" #$output
|
| 645 | "--no-default-features"
|
| 646 | "--features" (string-join features)))
|
| 647 | (if (null? cargo-install-paths)
|
| 648 | '(".")
|
| 649 | cargo-install-paths))))
|
| 650 | (add-after 'install 'install-completions
|
| 651 | (lambda* (#:key native-inputs #:allow-other-keys)
|
| 652 | (for-each
|
| 653 | (match-lambda
|
| 654 | ((shell . path)
|
| 655 | (mkdir-p (in-vicinity #$output (dirname path)))
|
| 656 | (let ((binary
|
| 657 | (if #$(%current-target-system)
|
| 658 | (search-input-file native-inputs "bin/garage")
|
| 659 | (in-vicinity #$output "bin/garage"))))
|
| 660 | (with-output-to-file (in-vicinity #$output path)
|
| 661 | (lambda _
|
| 662 | (invoke binary "completions" shell))))))
|
| 663 | '(("bash" . "share/bash-completion/completions/garage")
|
| 664 | ("elvish" . "share/elvish/lib/garage")
|
| 665 | ("fish" . "share/fish/vendor_completions.d/garage.fish")
|
| 666 | ("zsh" . "share/zsh/site-functions/_garage"))))))))
|
| 667 | (native-inputs
|
| 668 | (append (if (%current-target-system)
|
| 669 | (list this-package)
|
| 670 | '())
|
| 671 | (list nss-certs-for-test
|
| 672 | pkg-config
|
| 673 | protobuf)))
|
| 674 | (inputs
|
| 675 | (cons* libsodium
|
| 676 | lmdb
|
| 677 | openssl
|
| 678 | sqlite
|
| 679 | `(,zstd "lib")
|
| 680 | (cargo-inputs 'garage)))
|
| 681 | (home-page "https://garagehq.deuxfleurs.fr/")
|
| 682 | (synopsis "S3-compatible, distributed object storage designed for self-hosting")
|
| 683 | (description "Garage is a lightweight, geo-distributed data store that
|
| 684 | implements the @url{https://docs.aws.amazon.com/AmazonS3/latest/API/Welcome.html,
|
| 685 | Amazon S3} object storage protocol, with a focus on simplicity and resiliency.")
|
| 686 | (license license:agpl3)))
|