| 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 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 |
|
| 37 | (define-module (gnu packages guile)
|
| 38 | #:use-module ((guix licenses) #:prefix license:)
|
| 39 | #:use-module (gnu packages)
|
| 40 | #:use-module (gnu packages autotools)
|
| 41 | #:use-module (gnu packages base)
|
| 42 | #:use-module (gnu packages bash)
|
| 43 | #:use-module (gnu packages bdw-gc)
|
| 44 | #:use-module (gnu packages compression)
|
| 45 | #:use-module (gnu packages crypto)
|
| 46 | #:use-module (gnu packages dbm)
|
| 47 | #:use-module (gnu packages compiler-tools)
|
| 48 | #:use-module (gnu packages gawk)
|
| 49 | #:use-module (gnu packages gettext)
|
| 50 | #:use-module (gnu packages gperf)
|
| 51 | #:use-module (gnu packages libffi)
|
| 52 | #:use-module (gnu packages libunistring)
|
| 53 | #:use-module (gnu packages linux)
|
| 54 | #:use-module (gnu packages m4)
|
| 55 | #:use-module (gnu packages multiprecision)
|
| 56 | #:use-module (gnu packages pkg-config)
|
| 57 | #:use-module (gnu packages readline)
|
| 58 | #:use-module (gnu packages sqlite)
|
| 59 | #:use-module (gnu packages texinfo)
|
| 60 | #:use-module (gnu packages version-control)
|
| 61 | #:use-module (guix gexp)
|
| 62 | #:use-module (guix packages)
|
| 63 | #:use-module (guix download)
|
| 64 | #:use-module (guix git-download)
|
| 65 | #:use-module (guix build-system gnu)
|
| 66 | #:use-module (guix build-system guile)
|
| 67 | #:use-module (guix deprecation)
|
| 68 | #:use-module (guix utils))
|
| 69 |
|
| 70 | |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 |
|
| 76 | (define-public guile-1.8
|
| 77 | (package
|
| 78 | (name "guile")
|
| 79 | (version "1.8.8")
|
| 80 | (source (origin
|
| 81 | (method url-fetch)
|
| 82 | (uri (string-append "mirror://gnu/guile/guile-" version
|
| 83 | ".tar.gz"))
|
| 84 | (sha256
|
| 85 | (base32
|
| 86 | "0l200a0v7h8bh0cwz6v7hc13ds39cgqsmfrks55b1rbj5vniyiy3"))
|
| 87 | (patches (search-patches "guile-1.8-cpp-4.5.patch"))))
|
| 88 | (build-system gnu-build-system)
|
| 89 | (arguments '(#:configure-flags '("--disable-error-on-warning"
|
| 90 |
|
| 91 | |
| 92 | |
| 93 | |
| 94 | "CFLAGS=-O1 -g -Wall")
|
| 95 |
|
| 96 | |
| 97 | #:phases
|
| 98 | (modify-phases %standard-phases
|
| 99 | (add-before 'configure 'patch-stuff
|
| 100 | (lambda* (#:key outputs #:allow-other-keys)
|
| 101 | |
| 102 | |
| 103 | |
| 104 | (substitute* "libguile/dynl.c"
|
| 105 | (("lt_dlinit.*$" match)
|
| 106 | (format #f
|
| 107 | " ~a~% lt_dladdsearchdir(\"~a/lib\");~%"
|
| 108 | match
|
| 109 | (assoc-ref outputs "out"))))
|
| 110 |
|
| 111 | |
| 112 | (substitute* "ice-9/popen.scm"
|
| 113 | (("/bin/sh") (which "sh")))))
|
| 114 | (add-after 'install 'add-libxcrypt-reference-pkgconfig
|
| 115 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 116 | (define out (assoc-ref outputs "out"))
|
| 117 | (define libxcrypt
|
| 118 | (false-if-exception
|
| 119 | (dirname (search-input-file inputs "lib/libcrypt.so.1"))))
|
| 120 | (when libxcrypt
|
| 121 | (substitute*
|
| 122 | (find-files (string-append out "/lib/pkgconfig")
|
| 123 | ".*\\.pc")
|
| 124 | (("-lcrypt")
|
| 125 | (string-append "-L" libxcrypt " -lcrypt")))))))
|
| 126 |
|
| 127 | |
| 128 | |
| 129 | |
| 130 | |
| 131 | #:tests? #f))
|
| 132 |
|
| 133 | |
| 134 | (native-inputs (if (%current-target-system)
|
| 135 | `(("self" ,this-package))
|
| 136 | '()))
|
| 137 |
|
| 138 | (inputs (list gawk libxcrypt readline))
|
| 139 |
|
| 140 | |
| 141 | |
| 142 | (propagated-inputs (list gmp libltdl))
|
| 143 |
|
| 144 | (native-search-paths
|
| 145 | (list (search-path-specification
|
| 146 | (variable "GUILE_LOAD_PATH")
|
| 147 | (files '("share/guile/site")))))
|
| 148 |
|
| 149 | (synopsis "Scheme implementation intended especially for extensions")
|
| 150 | (description
|
| 151 | "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the
|
| 152 | official extension language of the GNU system. It is an implementation of
|
| 153 | the Scheme language which can be easily embedded in other applications to
|
| 154 | provide a convenient means of extending the functionality of the application
|
| 155 | without requiring the source code to be rewritten.")
|
| 156 | (home-page "https://www.gnu.org/software/guile/")
|
| 157 | (license license:lgpl2.0+)))
|
| 158 |
|
| 159 | (define-public guile-2.0
|
| 160 | (package
|
| 161 | (name "guile")
|
| 162 | (version "2.0.14")
|
| 163 | (source (origin
|
| 164 | (method url-fetch)
|
| 165 | (uri (string-append "mirror://gnu/guile/guile-" version
|
| 166 | ".tar.xz"))
|
| 167 | (sha256
|
| 168 | (base32
|
| 169 | "10lxc6l5alf3lzbs3ihnbfy6dfcrsyf8667wa57f26vf4mk2ai78"))))
|
| 170 | (build-system gnu-build-system)
|
| 171 |
|
| 172 | |
| 173 | (native-inputs
|
| 174 | (append (list pkg-config)
|
| 175 | (if (%current-target-system)
|
| 176 | (list this-package)
|
| 177 | '())))
|
| 178 | (inputs
|
| 179 | (append (list libffi libxcrypt)
|
| 180 | (libiconv-if-needed)
|
| 181 |
|
| 182 | |
| 183 | |
| 184 | |
| 185 | (if (target-mingw?) '() (list bash-minimal))))
|
| 186 | (propagated-inputs
|
| 187 | (list
|
| 188 | |
| 189 | |
| 190 | |
| 191 | |
| 192 | libunistring
|
| 193 |
|
| 194 | |
| 195 | |
| 196 | libltdl
|
| 197 |
|
| 198 | |
| 199 | |
| 200 | libgc
|
| 201 | gmp))
|
| 202 |
|
| 203 | (outputs '("out" "debug"))
|
| 204 |
|
| 205 | (arguments
|
| 206 | `(#:configure-flags
|
| 207 | ,(if (target-x86-32?) |
| 208 | ''("--disable-static" "CFLAGS=-g -O2 -fexcess-precision=standard")
|
| 209 | ''("--disable-static")) |
| 210 |
|
| 211 | |
| 212 | |
| 213 | #:parallel-build? #f
|
| 214 |
|
| 215 | #:phases
|
| 216 | (modify-phases %standard-phases
|
| 217 | ,@(if (system-hurd?)
|
| 218 | '((add-after 'unpack 'disable-tests
|
| 219 | (lambda _
|
| 220 | |
| 221 | (rename-file "test-suite/tests/00-repl-server.test" "00-repl-server.test")
|
| 222 | |
| 223 | (rename-file "test-suite/tests/00-socket.test" "00-socket.test")
|
| 224 | |
| 225 | (rename-file "test-suite/tests/srfi-18.test" "srfi-18.test")
|
| 226 | |
| 227 | (substitute* "test-suite/standalone/Makefile.in"
|
| 228 | (("test-guild-compile ") "")))))
|
| 229 | '())
|
| 230 | ,@(if (system-hurd?)
|
| 231 | '((add-after 'unpack 'disable-threads.tests
|
| 232 | (lambda _
|
| 233 | |
| 234 | (rename-file "test-suite/tests/threads.test" "threads.test"))))
|
| 235 | '())
|
| 236 | (add-before 'configure 'pre-configure
|
| 237 | (lambda* (#:key inputs #:allow-other-keys)
|
| 238 | |
| 239 |
|
| 240 | |
| 241 | |
| 242 | (let ((bash (assoc-ref inputs "bash")))
|
| 243 | (substitute* "module/ice-9/popen.scm"
|
| 244 | |
| 245 | |
| 246 | |
| 247 | (("/bin/sh")
|
| 248 | ,(cond ((target-mingw?)
|
| 249 | "bash")
|
| 250 | ((%current-target-system)
|
| 251 | '(search-input-file inputs "/bin/bash"))
|
| 252 | (else
|
| 253 | '(string-append bash "/bin/bash")))))
|
| 254 | #t)))
|
| 255 | (add-after 'install 'add-libxcrypt-reference-pkgconfig
|
| 256 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 257 | (define out (assoc-ref outputs "out"))
|
| 258 | (define libxcrypt
|
| 259 | (false-if-exception
|
| 260 | (dirname (search-input-file inputs "lib/libcrypt.so.1"))))
|
| 261 | (when libxcrypt
|
| 262 | (substitute*
|
| 263 | (find-files (string-append out "/lib/pkgconfig")
|
| 264 | ".*\\.pc")
|
| 265 | (("-lcrypt")
|
| 266 | (string-append "-L" libxcrypt " -lcrypt")))))))))
|
| 267 |
|
| 268 | (native-search-paths
|
| 269 | (list (search-path-specification
|
| 270 | (variable "GUILE_LOAD_PATH")
|
| 271 | (files '("share/guile/site/2.0")))
|
| 272 | (search-path-specification
|
| 273 | (variable "GUILE_LOAD_COMPILED_PATH")
|
| 274 | (files '("lib/guile/2.0/site-ccache")))))
|
| 275 |
|
| 276 | (synopsis "Scheme implementation intended especially for extensions")
|
| 277 | (description
|
| 278 | "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the
|
| 279 | official extension language of the GNU system. It is an implementation of
|
| 280 | the Scheme language which can be easily embedded in other applications to
|
| 281 | provide a convenient means of extending the functionality of the application
|
| 282 | without requiring the source code to be rewritten.")
|
| 283 | (home-page "https://www.gnu.org/software/guile/")
|
| 284 | (license license:lgpl3+)))
|
| 285 |
|
| 286 | (define-public guile-2.2
|
| 287 | (package
|
| 288 | (inherit guile-2.0)
|
| 289 | (name "guile")
|
| 290 | (version "2.2.7")
|
| 291 | (source (origin
|
| 292 | (method url-fetch)
|
| 293 |
|
| 294 | |
| 295 | |
| 296 | (uri (string-append "mirror://gnu/guile/guile-" version
|
| 297 | ".tar.xz"))
|
| 298 | (sha256
|
| 299 | (base32
|
| 300 | "013mydzhfswqci6xmyc1ajzd59pfbdak15i0b090nhr9bzm7dxyd"))
|
| 301 | (modules '((guix build utils)))
|
| 302 | (patches (search-patches
|
| 303 | "guile-2.2-skip-oom-test.patch"
|
| 304 | "guile-2.2-skip-so-test.patch"))
|
| 305 |
|
| 306 | |
| 307 | |
| 308 | |
| 309 | (snippet '(begin
|
| 310 | (for-each delete-file
|
| 311 | (find-files "prebuilt" "\\.go$"))
|
| 312 | #t))))
|
| 313 | (arguments
|
| 314 | (substitute-keyword-arguments (package-arguments guile-2.0)
|
| 315 | ((#:configure-flags flags ''())
|
| 316 | (if (target-x86-32?) |
| 317 | `(append '("--disable-static")
|
| 318 | '("CFLAGS=-g -O2 -fexcess-precision=standard"))
|
| 319 | flags))
|
| 320 | ((#:phases phases '%standard-phases)
|
| 321 | #~(modify-phases #$phases
|
| 322 | #$@(if (system-hurd?)
|
| 323 | #~((delete 'disable-threads.tests))
|
| 324 | '())))))
|
| 325 |
|
| 326 | (properties '((timeout . 72000) |
| 327 | (max-silent-time . 36000))) |
| 328 | |
| 329 | (native-search-paths
|
| 330 | (list (search-path-specification
|
| 331 | (variable "GUILE_LOAD_PATH")
|
| 332 | (files '("share/guile/site/2.2")))
|
| 333 | (search-path-specification
|
| 334 | (variable "GUILE_LOAD_COMPILED_PATH")
|
| 335 | (files '("lib/guile/2.2/site-ccache")))))))
|
| 336 |
|
| 337 | (define-public guile-2.2.4
|
| 338 | |
| 339 | |
| 340 | (package
|
| 341 | (inherit guile-2.2)
|
| 342 | (version "2.2.4")
|
| 343 | (source
|
| 344 | (origin
|
| 345 | (inherit (package-source guile-2.2))
|
| 346 | (uri (string-append "mirror://gnu/guile/guile-" version ".tar.xz"))
|
| 347 | (sha256
|
| 348 | (base32 "07p3g0v2ba2vlfbfidqzlgbhnzdx46wh2rgc5gszq1mjyx5bks6r"))))
|
| 349 | |
| 350 | |
| 351 | (inputs (modify-inputs (package-inputs guile-2.2)
|
| 352 | (replace "libxcrypt" libxcrypt-without-failure-tokens)))))
|
| 353 |
|
| 354 | (define-public guile-3.0
|
| 355 | |
| 356 | (package
|
| 357 | (inherit guile-2.2)
|
| 358 | (name "guile")
|
| 359 | (version "3.0.9")
|
| 360 | (source (origin
|
| 361 | (inherit (package-source guile-2.2))
|
| 362 | (uri (string-append "mirror://gnu/guile/guile-"
|
| 363 | version ".tar.xz"))
|
| 364 | (sha256
|
| 365 | (base32
|
| 366 | "03bm1mnfc9kkg2ls942a0js7bxrdzmcffgrgg6anwdmjfan2a9hs"))
|
| 367 | (patches '())
|
| 368 | |
| 369 | |
| 370 | (snippet '(for-each delete-file
|
| 371 | (find-files "prebuilt" "\\.go$")))))
|
| 372 |
|
| 373 | |
| 374 | |
| 375 | (propagated-inputs
|
| 376 | (modify-inputs (package-propagated-inputs guile-2.2)
|
| 377 | (delete "gmp" "libltdl")))
|
| 378 | (arguments
|
| 379 | (substitute-keyword-arguments (package-arguments guile-2.0)
|
| 380 | |
| 381 | |
| 382 | |
| 383 | ((#:parallel-build? _ #f)
|
| 384 | (not (%current-target-system)))
|
| 385 | ((#:configure-flags flags #~'())
|
| 386 | |
| 387 | #~(cons* #$@(if (target-hurd?)
|
| 388 | #~("--disable-jit")
|
| 389 | #~())
|
| 390 | |
| 391 | |
| 392 | |
| 393 | |
| 394 | |
| 395 | |
| 396 | #$@(if (target-x86-32?)
|
| 397 | #~("CFLAGS=-g -O2 -fexcess-precision=standard")
|
| 398 | #~())
|
| 399 | #$@(if (target-mingw?)
|
| 400 | #~(#$(string-append
|
| 401 | "CFLAGS=-g -O2"
|
| 402 | " -Wno-error=implicit-function-declaration"
|
| 403 | " -Wno-error=incompatible-pointer-types"))
|
| 404 | #~())
|
| 405 | "--enable-mini-gmp"
|
| 406 | '("--disable-static")))
|
| 407 | ((#:phases phases)
|
| 408 | #~(modify-phases #$phases
|
| 409 | (add-before 'check 'disable-stack-overflow-test
|
| 410 | (lambda _
|
| 411 | |
| 412 | |
| 413 | (substitute* "test-suite/standalone/test-stack-overflow"
|
| 414 | (("!#")
|
| 415 | "!#\n(exit 77)\n"))))
|
| 416 |
|
| 417 | #$@(if (target-hurd?)
|
| 418 | #~((add-before 'build 'patch-posix-spawn-usage
|
| 419 | (lambda _
|
| 420 | |
| 421 | |
| 422 | (define patch
|
| 423 | #$(local-file
|
| 424 | (search-patch "guile-hurd-posix-spawn.patch")))
|
| 425 | (invoke "patch" "--force" "-p1" "-i" patch))))
|
| 426 | #~())
|
| 427 | #$@(if (system-hurd?)
|
| 428 | #~((add-after 'unpack 'disable-popen.test-no-duplicate
|
| 429 | |
| 430 | (lambda _
|
| 431 | (substitute* "test-suite/tests/popen.test"
|
| 432 | (("\\(pass-if \"no duplicate\".*" all)
|
| 433 | (string-append
|
| 434 | all
|
| 435 | (object->string
|
| 436 | '(when (string-ci= "GNU"
|
| 437 | (vector-ref (uname) 0))
|
| 438 | (throw 'unresolved)))))))))
|
| 439 | #~())
|
| 440 | #$@(if (target-ppc32?)
|
| 441 | #~((add-after 'unpack 'adjust-bootstrap-flags
|
| 442 | (lambda _
|
| 443 | |
| 444 | |
| 445 | |
| 446 | (substitute* "stage0/Makefile.in"
|
| 447 | (("^GUILE_OPTIMIZATIONS.*")
|
| 448 | "GUILE_OPTIMIZATIONS = -O1 -Oresolve-primitives -Ocps\n")))))
|
| 449 | #~())
|
| 450 | #$@(if (target-powerpc?)
|
| 451 | #~((add-after 'unpack 'skip-oom-test
|
| 452 | (lambda _
|
| 453 | |
| 454 | |
| 455 | (substitute* "test-suite/standalone/test-out-of-memory"
|
| 456 | (("!#") "!#\n\n(exit 77)\n")))))
|
| 457 | #~())
|
| 458 | #$@(if (or (target-ppc32?)
|
| 459 | (target-riscv64?))
|
| 460 | #~((add-after 'unpack 'skip-failing-fdes-test
|
| 461 | (lambda _
|
| 462 | |
| 463 | (substitute* "test-suite/tests/ports.test"
|
| 464 | (("fdes not closed\"" all) (string-append all "(exit 77)")))
|
| 465 | #t)))
|
| 466 | #~())))))
|
| 467 |
|
| 468 | (native-search-paths
|
| 469 | (list (search-path-specification
|
| 470 | (variable "GUILE_LOAD_PATH")
|
| 471 | (files '("share/guile/site/3.0")))
|
| 472 | (search-path-specification
|
| 473 | (variable "GUILE_LOAD_COMPILED_PATH")
|
| 474 | (files '("lib/guile/3.0/site-ccache"
|
| 475 | "share/guile/site/3.0")))
|
| 476 | (search-path-specification
|
| 477 | (variable "GUILE_EXTENSIONS_PATH")
|
| 478 | (files '("lib/guile/3.0/extensions")))))))
|
| 479 |
|
| 480 | (define-public guile-3.0.11
|
| 481 | (package
|
| 482 | (inherit guile-3.0)
|
| 483 | (name "guile")
|
| 484 | (version "3.0.11")
|
| 485 | (source
|
| 486 | (origin
|
| 487 | (inherit (package-source guile-2.2))
|
| 488 | (uri (string-append "mirror://gnu/guile/guile-" version ".tar.xz"))
|
| 489 | (sha256
|
| 490 | (base32 "0q4laxcraxh3r9s62p6nw3g3n6xlqxy16r5kdylpyyk56v97k341"))
|
| 491 | (patches (search-patches "guile-3.0.11-cross-compilation.patch"
|
| 492 | "guile-3.0.11-fix-riscv64-jit.patch"))
|
| 493 | |
| 494 | |
| 495 | (snippet '(for-each delete-file
|
| 496 | (find-files "prebuilt" "\\.go$")))))
|
| 497 | (arguments
|
| 498 | (substitute-keyword-arguments (package-arguments guile-3.0)
|
| 499 | ((#:phases phases)
|
| 500 | #~(modify-phases #$phases
|
| 501 | #$@(if (target-hurd?)
|
| 502 | #~((delete 'patch-posix-spawn-usage))
|
| 503 | #~())
|
| 504 | #$@(if (system-hurd?)
|
| 505 | #~((replace 'disable-tests
|
| 506 | (lambda _
|
| 507 | (substitute* "test-suite/Makefile.in"
|
| 508 | |
| 509 | (("tests/00-socket.test")
|
| 510 | "")
|
| 511 | |
| 512 | (("tests/srfi-18.test")
|
| 513 | "")
|
| 514 | |
| 515 | (("tests/web-server.test")
|
| 516 | ""))
|
| 517 | |
| 518 | (substitute* "test-suite/standalone/Makefile.in"
|
| 519 | (("test-guild-compile ")
|
| 520 | ""))))
|
| 521 | (delete 'disable-threads.tests))
|
| 522 | #~())))))))
|
| 523 |
|
| 524 | (define-public guile-3.0-latest
|
| 525 | |
| 526 | |
| 527 | guile-3.0.11)
|
| 528 |
|
| 529 | |
| 530 | |
| 531 | (define-deprecated/public-alias guile-3.0/fixed guile-3.0/pinned)
|
| 532 |
|
| 533 | (define-public guile-with-gmp
|
| 534 | (package/inherit guile-3.0-latest
|
| 535 | (name "guile-with-gmp")
|
| 536 | (propagated-inputs
|
| 537 | (modify-inputs propagated-inputs
|
| 538 | (append gmp)))
|
| 539 | (arguments
|
| 540 | (substitute-keyword-arguments arguments
|
| 541 | ((#:configure-flags flags #~'())
|
| 542 | #~(delete "--enable-mini-gmp" #$flags))))))
|
| 543 |
|
| 544 | (define-public guile-3.0/pinned
|
| 545 | |
| 546 | |
| 547 | (package
|
| 548 | (inherit guile-3.0)
|
| 549 | (properties '((hidden? . #t) |
| 550 | (timeout . 72000) |
| 551 | (max-silent-time . 36000))))) |
| 552 | |
| 553 |
|
| 554 | (define-public guile-next
|
| 555 | (let ((version "3.0.11")
|
| 556 | (revision "1")
|
| 557 | (commit "b0f6549889b90186a06a0769a47f43954b6fb889"))
|
| 558 | (package
|
| 559 | (inherit guile-3.0)
|
| 560 | (name "guile-next")
|
| 561 | (version (git-version version revision commit))
|
| 562 | (source (origin
|
| 563 | |
| 564 | (method git-fetch)
|
| 565 | (uri (git-reference
|
| 566 | (url "https://codeberg.org/guile/guile.git")
|
| 567 | (commit commit)))
|
| 568 | (file-name (git-file-name name version))
|
| 569 | (sha256
|
| 570 | (base32
|
| 571 | "1lqlapp7dr1y9ix8dy2amycjyqi4534m7xnb3bw23ikw7hfrakhq"))))
|
| 572 | (arguments
|
| 573 | (substitute-keyword-arguments (package-arguments guile-3.0)
|
| 574 | ((#:phases phases '%standard-phases)
|
| 575 | #~(modify-phases #$phases
|
| 576 | (add-before 'bootstrap 'set-version
|
| 577 | (lambda _
|
| 578 | |
| 579 | |
| 580 | |
| 581 | |
| 582 | |
| 583 | (call-with-output-file ".tarball-version"
|
| 584 | (lambda (port)
|
| 585 | (display #$version port)))))
|
| 586 | #$@(if (target-hurd?)
|
| 587 | #~((delete 'patch-posix-spawn-usage))
|
| 588 | #~())))))
|
| 589 | (native-inputs
|
| 590 | (modify-inputs (package-native-inputs guile-3.0)
|
| 591 | (prepend autoconf
|
| 592 | automake
|
| 593 | libtool
|
| 594 | flex
|
| 595 | gettext-minimal
|
| 596 | texinfo
|
| 597 | gperf)
|
| 598 | (replace "guile" this-package)))
|
| 599 | (synopsis "Development version of GNU Guile"))))
|
| 600 |
|
| 601 | (define* (make-guile-readline guile #:optional (name "guile-readline"))
|
| 602 | (package
|
| 603 | (name name)
|
| 604 | (version (package-version guile))
|
| 605 | (source (package-source guile))
|
| 606 | (build-system gnu-build-system)
|
| 607 | (arguments
|
| 608 | (list #:configure-flags
|
| 609 | #~'("--disable-silent-rules"
|
| 610 | "--enable-mini-gmp") |
| 611 |
|
| 612 | #:phases
|
| 613 | #~(modify-phases %standard-phases
|
| 614 | (add-before 'build 'chdir
|
| 615 | (lambda* (#:key outputs #:allow-other-keys)
|
| 616 | (invoke "make" "-C" "libguile" "scmconfig.h")
|
| 617 | (invoke "make" "-C" "lib")
|
| 618 | (chdir "guile-readline")
|
| 619 |
|
| 620 | (substitute* "Makefile"
|
| 621 | (("../libguile/libguile-[[:graph:]]+\\.la")
|
| 622 | |
| 623 | "")
|
| 624 | (("^READLINE_LIBS = (.*)$" _ libs)
|
| 625 | |
| 626 | (string-append "READLINE_LIBS = "
|
| 627 | "-lguile-$(GUILE_EFFECTIVE_VERSION) "
|
| 628 | libs "\n"))
|
| 629 | (("\\$\\(top_builddir\\)/meta/build-env")
|
| 630 | |
| 631 | |
| 632 | "")
|
| 633 |
|
| 634 | |
| 635 | (("^moddir = .*$")
|
| 636 | "moddir = $(pkgdatadir)/site/$(GUILE_EFFECTIVE_VERSION)\n")
|
| 637 | (("^ccachedir = .*$")
|
| 638 | "ccachedir = $(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/site-ccache\n"))
|
| 639 |
|
| 640 | |
| 641 | (substitute* "ice-9/readline.scm"
|
| 642 | (("load-extension \"guile-readline\"")
|
| 643 | (format #f "load-extension \
|
| 644 | (string-append ~s \"/lib/guile/\" (effective-version) \"/extensions/guile-readline\")"
|
| 645 | (assoc-ref outputs "out"))))
|
| 646 | #t)))))
|
| 647 | (home-page (package-home-page guile))
|
| 648 | (native-inputs (package-native-inputs guile))
|
| 649 | (propagated-inputs (package-propagated-inputs guile))
|
| 650 | (inputs (modify-inputs (package-inputs guile)
|
| 651 | (prepend guile readline)))
|
| 652 | (synopsis "Line editing support for GNU Guile")
|
| 653 | (description
|
| 654 | "This module provides line editing support via the Readline library for
|
| 655 | GNU@tie{}Guile. Use the @code{(ice-9 readline)} module and call its
|
| 656 | @code{activate-readline} procedure to enable it.")
|
| 657 | (license license:gpl3+)))
|
| 658 |
|
| 659 | (define-public guile-readline
|
| 660 | (make-guile-readline guile-3.0))
|
| 661 |
|
| 662 | (define-public guile2.2-readline
|
| 663 | (make-guile-readline guile-2.2 "guile2.2-readline"))
|
| 664 |
|
| 665 | (define (guile-variant-package-name prefix)
|
| 666 | (lambda (name)
|
| 667 | "Return NAME with PREFIX instead of \"guile-\", when applicable."
|
| 668 | (if (and (string-prefix? "guile-" name)
|
| 669 |
|
| 670 | |
| 671 | (not (string=? "guile-bootstrap" name)))
|
| 672 | (string-append prefix "-"
|
| 673 | (string-drop name
|
| 674 | (string-length "guile-")))
|
| 675 | name)))
|
| 676 |
|
| 677 | (define package-for-guile-2.0
|
| 678 | |
| 679 | |
| 680 | (package-input-rewriting `((,guile-3.0 . ,guile-2.0))
|
| 681 | (guile-variant-package-name "guile2.0")
|
| 682 | #:deep? #f))
|
| 683 |
|
| 684 | (define package-for-guile-2.2
|
| 685 | (package-input-rewriting `((,guile-3.0 . ,guile-2.2))
|
| 686 | (guile-variant-package-name "guile2.2")
|
| 687 | #:deep? #f))
|
| 688 |
|
| 689 | (define-public guile-for-guile-emacs
|
| 690 | (let ((commit "e62c0d1b32f625fcbaa733c32a88622846aee905")
|
| 691 | (revision "2"))
|
| 692 | (package/inherit guile-next
|
| 693 | (name "guile-for-guile-emacs")
|
| 694 | (version (git-version "3.0.7-81" revision commit))
|
| 695 | (source (origin
|
| 696 | (method git-fetch)
|
| 697 | (uri (git-reference
|
| 698 | (url "https://codeberg.org/lyrra/guile")
|
| 699 | (commit commit)))
|
| 700 | (file-name (git-file-name name version))
|
| 701 | (sha256
|
| 702 | (base32
|
| 703 | "0xfnd99iws9dwk5va8bmqpysmb8pnb1w91rw7rbfzzklyfvpibh6"))))
|
| 704 | (arguments
|
| 705 | (substitute-keyword-arguments arguments
|
| 706 | ((#:configure-flags flags #~'())
|
| 707 | #~(cons*
|
| 708 | #$(string-append
|
| 709 | "CFLAGS=-g -O2"
|
| 710 | " -Wno-error=implicit-function-declaration")
|
| 711 | #$flags))
|
| 712 | ((#:phases phases '%standard-phases)
|
| 713 | #~(modify-phases #$phases
|
| 714 | (add-before 'check 'skip-failing-tests
|
| 715 | (lambda _
|
| 716 | (delete-file "test-suite/tests/version.test"))))))))))
|
| 717 |
|
| 718 |
|
| 719 | |
| 720 | |
| 721 | |
| 722 |
|
| 723 | (define-public guile-json-1
|
| 724 | (package
|
| 725 | (name "guile-json")
|
| 726 | (version "1.3.2")
|
| 727 | (home-page "https://github.com/aconchillo/guile-json")
|
| 728 | (source (origin
|
| 729 | (method url-fetch)
|
| 730 | (uri (string-append "mirror://savannah/guile-json/guile-json-"
|
| 731 | version ".tar.gz"))
|
| 732 | (sha256
|
| 733 | (base32
|
| 734 | "0m6yzb169r6iz56k3nkncjaiijwi4p0x9ijn1p5ax3s77jklxy9k"))))
|
| 735 | (build-system gnu-build-system)
|
| 736 | (arguments
|
| 737 | `(#:make-flags '("GUILE_AUTO_COMPILE=0"))) |
| 738 | (native-inputs (list pkg-config guile-2.2))
|
| 739 | (inputs (list guile-2.2))
|
| 740 | (synopsis "JSON module for Guile")
|
| 741 | (description
|
| 742 | "Guile-JSON supports parsing and building JSON documents according to the
|
| 743 | specification. These are the main features:
|
| 744 |
|
| 745 | @itemize
|
| 746 | @item Strictly complies to @uref{http://json.org, specification}.
|
| 747 | @item Build JSON documents programmatically via macros.
|
| 748 | @item Unicode support for strings.
|
| 749 | @item Allows JSON pretty printing.
|
| 750 | @end itemize\n")
|
| 751 |
|
| 752 | |
| 753 | (license license:gpl3+)))
|
| 754 |
|
| 755 | (define-public guile2.0-json
|
| 756 | (package-for-guile-2.0 guile-json-1))
|
| 757 |
|
| 758 | (define-public guile-json-3
|
| 759 | |
| 760 | (package
|
| 761 | (inherit guile-json-1)
|
| 762 | (name "guile-json")
|
| 763 | (version "3.5.0")
|
| 764 | (source (origin
|
| 765 | (method url-fetch)
|
| 766 | (uri (string-append "mirror://savannah/guile-json/guile-json-"
|
| 767 | version ".tar.gz"))
|
| 768 | (sha256
|
| 769 | (base32
|
| 770 | "0nj0684qgh6ppkbdyxqfyjwsv2qbyairxpi8fzrhsi3xnc7jn4im"))))
|
| 771 | (native-inputs (list pkg-config guile-3.0))
|
| 772 | (inputs (list guile-3.0))))
|
| 773 |
|
| 774 | (define-public guile-json-4
|
| 775 | (package
|
| 776 | (inherit guile-json-3)
|
| 777 | (name "guile-json")
|
| 778 | (version "4.7.3")
|
| 779 | (source (origin
|
| 780 | (method url-fetch)
|
| 781 | (uri (string-append "mirror://savannah/guile-json/guile-json-"
|
| 782 | version ".tar.gz"))
|
| 783 | (sha256
|
| 784 | (base32
|
| 785 | "127k2xc07w1gnyqs40z4865l8p3ra5xgpcn569dz04lxsa709fiq"))))))
|
| 786 |
|
| 787 | (define-public guile2.2-json
|
| 788 | (package-for-guile-2.2 guile-json-4))
|
| 789 |
|
| 790 | |
| 791 | |
| 792 |
|
| 793 | (define-public guile-gdbm-ffi
|
| 794 | (package
|
| 795 | (name "guile-gdbm-ffi")
|
| 796 | (version "20120209.fa1d5b6")
|
| 797 | (source (origin
|
| 798 | (method git-fetch)
|
| 799 | (uri (git-reference
|
| 800 | (url "https://github.com/ijp/guile-gdbm")
|
| 801 | (commit "fa1d5b6231d0e4d096687b378c025f2148c5f246")))
|
| 802 | (file-name (string-append name "-" version "-checkout"))
|
| 803 | (patches (search-patches
|
| 804 | "guile-gdbm-ffi-support-gdbm-1.14.patch"))
|
| 805 | (sha256
|
| 806 | (base32
|
| 807 | "1j8wrsw7v9w6qkl47xz0rdikg50v16nn6kbs3lgzcymjzpa7babj"))))
|
| 808 | (build-system guile-build-system)
|
| 809 | (arguments
|
| 810 | '(#:phases (modify-phases %standard-phases
|
| 811 | (add-after 'unpack 'move-examples
|
| 812 | (lambda* (#:key outputs #:allow-other-keys)
|
| 813 | |
| 814 | (let* ((out (assoc-ref outputs "out"))
|
| 815 | (doc (string-append out "/share/doc/"
|
| 816 | (strip-store-file-name out)
|
| 817 | "/examples")))
|
| 818 | (copy-recursively "examples" doc)
|
| 819 | (delete-file-recursively "examples")
|
| 820 | #t)))
|
| 821 | (add-after 'unpack 'set-libgdbm-file-name
|
| 822 | (lambda* (#:key inputs #:allow-other-keys)
|
| 823 | (substitute* "gdbm.scm"
|
| 824 | (("\\(dynamic-link \"libgdbm\"\\)")
|
| 825 | (format #f "(dynamic-link \"~a/lib/libgdbm.so\")"
|
| 826 | (assoc-ref inputs "gdbm"))))
|
| 827 | #t)))))
|
| 828 | (native-inputs (list guile-3.0))
|
| 829 | (inputs (list gdbm))
|
| 830 | (home-page "https://github.com/ijp/guile-gdbm")
|
| 831 | (synopsis "Guile bindings to the GDBM library via Guile's FFI")
|
| 832 | (description
|
| 833 | "Guile bindings to the GDBM key-value storage system, using
|
| 834 | Guile's foreign function interface.")
|
| 835 | (license license:gpl3+)))
|
| 836 |
|
| 837 | (define-public guile2.0-gdbm-ffi
|
| 838 | (package-for-guile-2.0 guile-gdbm-ffi))
|
| 839 |
|
| 840 | (define-public guile2.2-gdbm-ffi
|
| 841 | (package-for-guile-2.2 guile-gdbm-ffi))
|
| 842 |
|
| 843 | (define-public guile-sqlite3
|
| 844 | (package
|
| 845 | (name "guile-sqlite3")
|
| 846 | (version "0.1.3")
|
| 847 | (home-page "https://codeberg.org/guile-sqlite3/guile-sqlite3.git")
|
| 848 | (source (origin
|
| 849 | (method git-fetch)
|
| 850 | (uri (git-reference
|
| 851 | (url home-page)
|
| 852 | (commit (string-append "v" version))))
|
| 853 | (sha256
|
| 854 | (base32
|
| 855 | "0qqygvlpz63phdi2p5p8ncp80dci230qfa3pwds8yfxqqaablmhb"))
|
| 856 | (file-name (string-append name "-" version "-checkout"))))
|
| 857 | (build-system gnu-build-system)
|
| 858 | (native-inputs (list autoconf automake guile-3.0 pkg-config))
|
| 859 | (inputs (list guile-3.0 sqlite-next))
|
| 860 | (synopsis "Access SQLite databases from Guile")
|
| 861 | (description
|
| 862 | "This package provides Guile bindings to the SQLite database system.")
|
| 863 | (license license:gpl3+)))
|
| 864 |
|
| 865 | (define-public guile2.0-sqlite3
|
| 866 | (package-for-guile-2.0 guile-sqlite3))
|
| 867 |
|
| 868 | (define-public guile2.2-sqlite3
|
| 869 | (package-for-guile-2.2 guile-sqlite3))
|
| 870 |
|
| 871 | (define-public guile-bytestructures
|
| 872 | (package
|
| 873 | (name "guile-bytestructures")
|
| 874 | (version "2.0.2")
|
| 875 | (home-page "https://github.com/TaylanUB/scheme-bytestructures")
|
| 876 | (source (origin
|
| 877 | (method git-fetch)
|
| 878 | (uri (git-reference
|
| 879 | (url home-page)
|
| 880 | (commit (string-append "v" version))))
|
| 881 | (file-name (git-file-name name version))
|
| 882 | (sha256
|
| 883 | (base32
|
| 884 | "1dyhf39s16q3fvps0mfb65xrlcb8rk8m5kc82ngkwhzmf1svalpc"))))
|
| 885 | (build-system gnu-build-system)
|
| 886 | (arguments
|
| 887 | `(#:make-flags '("GUILE_AUTO_COMPILE=0") |
| 888 |
|
| 889 | #:phases (modify-phases %standard-phases
|
| 890 | (add-after 'install 'install-doc
|
| 891 | (lambda* (#:key outputs #:allow-other-keys)
|
| 892 | (let* ((out (assoc-ref outputs "out"))
|
| 893 | (package ,(package-full-name this-package "-"))
|
| 894 | (doc (string-append out "/share/doc/" package)))
|
| 895 | (install-file "README.md" doc)
|
| 896 | #t))))))
|
| 897 | (native-inputs (list autoconf automake pkg-config guile-3.0))
|
| 898 | (inputs (list guile-3.0))
|
| 899 | (synopsis "Structured access to bytevector contents for Guile")
|
| 900 | (description
|
| 901 | "Guile bytestructures offers a system imitating the type system
|
| 902 | of the C programming language, to be used on bytevectors. C's type
|
| 903 | system works on raw memory, and Guile works on bytevectors which are
|
| 904 | an abstraction over raw memory. It's also more powerful than the C
|
| 905 | type system, elevating types to first-class status.")
|
| 906 | (license license:gpl3+)
|
| 907 | (properties '((upstream-name . "bytestructures")))))
|
| 908 |
|
| 909 | (define-public guile2.0-bytestructures
|
| 910 | (package-for-guile-2.0 guile-bytestructures))
|
| 911 |
|
| 912 | (define-public guile2.2-bytestructures
|
| 913 | (package-for-guile-2.2 guile-bytestructures))
|
| 914 |
|
| 915 | (define-public guile-git
|
| 916 | (package
|
| 917 | (name "guile-git")
|
| 918 | (version "0.12.1")
|
| 919 | (home-page "https://codeberg.org/guile-git/guile-git.git")
|
| 920 | (source (origin
|
| 921 | (method git-fetch)
|
| 922 | (uri (git-reference
|
| 923 | (url home-page)
|
| 924 | (commit (string-append "v" version))))
|
| 925 | (file-name (git-file-name name version))
|
| 926 | (sha256
|
| 927 | (base32
|
| 928 | "102py0bcr5jiayqy1l8dr1f11sv7c600y779jn68c4dsxlfg9has"))))
|
| 929 | (build-system gnu-build-system)
|
| 930 | (arguments
|
| 931 | (if (target-ppc32?)
|
| 932 | (list #:phases
|
| 933 | #~(modify-phases %standard-phases
|
| 934 | (add-after 'unpack 'skip-failing-test
|
| 935 | (lambda _
|
| 936 | |
| 937 | (substitute* "Makefile.am"
|
| 938 | ((".*tests/blob\\.scm.*") ""))))))
|
| 939 | '()))
|
| 940 | (native-inputs
|
| 941 | (list pkg-config autoconf automake texinfo guile-3.0 guile-bytestructures))
|
| 942 | (inputs
|
| 943 | (list guile-3.0 libgit2))
|
| 944 | (propagated-inputs
|
| 945 | (list guile-bytestructures))
|
| 946 | (synopsis "Guile bindings for libgit2")
|
| 947 | (description
|
| 948 | "This package provides Guile bindings to libgit2, a library to
|
| 949 | manipulate repositories of the Git version control system.")
|
| 950 | (license license:gpl3+)))
|
| 951 |
|
| 952 | (define-public guile2.2-git
|
| 953 | (package-for-guile-2.2 guile-git))
|
| 954 |
|
| 955 | (define-public guile-zlib
|
| 956 | (package
|
| 957 | (name "guile-zlib")
|
| 958 | (version "0.2.2")
|
| 959 | (source
|
| 960 | (origin
|
| 961 | |
| 962 | |
| 963 | |
| 964 | (method url-fetch)
|
| 965 | (uri
|
| 966 | (string-append "https://codeberg.org/guile-compression/guile-zlib/archive/v"
|
| 967 | version ".tar.gz"))
|
| 968 | (file-name (string-append name "-" version ".tar.gz"))
|
| 969 | (sha256
|
| 970 | |
| 971 | (base32
|
| 972 | "04p9lb3bq5y0k358s8agpksx9x68vzx330cb8jkn4qp3qj7cmnx2"))))
|
| 973 | (build-system gnu-build-system)
|
| 974 | (native-inputs (list autoconf automake pkg-config guile-3.0))
|
| 975 | (inputs (list guile-3.0 zlib))
|
| 976 | (synopsis "Guile bindings to zlib")
|
| 977 | (description
|
| 978 | "This package provides Guile bindings for zlib, a lossless
|
| 979 | data-compression library. The bindings are written in pure Scheme by using
|
| 980 | Guile's foreign function interface.")
|
| 981 | (home-page "https://codeberg.org/guile-compression/guile-zlib")
|
| 982 | (license license:gpl3+)))
|
| 983 |
|
| 984 | (define-public guile2.2-zlib
|
| 985 | (package-for-guile-2.2 guile-zlib))
|
| 986 |
|
| 987 | (define-public guile-lzlib
|
| 988 | (package
|
| 989 | (name "guile-lzlib")
|
| 990 | (version "0.4.0")
|
| 991 | (home-page "https://codeberg.org/guile-compression/guile-lzlib")
|
| 992 | (source
|
| 993 | (origin
|
| 994 | |
| 995 | |
| 996 | |
| 997 | |
| 998 | (method url-fetch)
|
| 999 | (uri (string-append home-page "/archive/" version ".tar.gz"))
|
| 1000 | |
| 1001 | (file-name (string-append "guile-lzlib-" version ".tar.gz"))
|
| 1002 | (sha256
|
| 1003 | (base32
|
| 1004 | "0ssyhrl6x5cs7wvr3ysmy9gm0viz4rlz06vli0rbs5vwwkh1r9hl"))))
|
| 1005 | (build-system gnu-build-system)
|
| 1006 | (arguments
|
| 1007 | (list
|
| 1008 | #:make-flags #~'("GUILE_AUTO_COMPILE=0"))) |
| 1009 | (native-inputs (list autoconf automake pkg-config guile-3.0))
|
| 1010 | (inputs (list guile-3.0 lzlib))
|
| 1011 | (synopsis "Guile bindings to lzlib")
|
| 1012 | (description
|
| 1013 | "This package provides Guile bindings for lzlib, a C library for
|
| 1014 | in-memory LZMA compression and decompression. The bindings are written in
|
| 1015 | pure Scheme by using Guile's foreign function interface.")
|
| 1016 | (license license:gpl3+)))
|
| 1017 |
|
| 1018 | (define-public guile2.2-lzlib
|
| 1019 | (package-for-guile-2.2 guile-lzlib))
|
| 1020 |
|
| 1021 | (define-public guile-zstd
|
| 1022 | (package
|
| 1023 | (name "guile-zstd")
|
| 1024 | (version "0.1.2")
|
| 1025 | (home-page "https://codeberg.org/guile-compression/guile-zstd")
|
| 1026 | (source (origin
|
| 1027 | (method git-fetch)
|
| 1028 | (uri (git-reference (url home-page)
|
| 1029 | (commit (string-append "v" version))))
|
| 1030 | (file-name (git-file-name name version))
|
| 1031 | (sha256
|
| 1032 | (base32
|
| 1033 | "1rlbjqq0jb3xkrsa0pnk6irgcpyksvf5n3gk89w7arf5yjycm05h"))))
|
| 1034 | (build-system gnu-build-system)
|
| 1035 | (native-inputs (list autoconf automake pkg-config guile-3.0))
|
| 1036 | (inputs (list `(,zstd "lib") guile-3.0))
|
| 1037 | (synopsis "GNU Guile bindings to the zstd compression library")
|
| 1038 | (description
|
| 1039 | "This package provides a GNU Guile interface to the zstd (``zstandard'')
|
| 1040 | compression library.")
|
| 1041 | (license license:gpl3+)))
|
| 1042 |
|
| 1043 | (define-public guile-lzma
|
| 1044 | (package
|
| 1045 | (name "guile-lzma")
|
| 1046 | (version "0.1.1")
|
| 1047 | (source
|
| 1048 | (origin
|
| 1049 | (method url-fetch)
|
| 1050 | (uri (string-append "https://files.ngyro.com/guile-lzma/guile-lzma-"
|
| 1051 | version ".tar.gz"))
|
| 1052 | (sha256
|
| 1053 | (base32 "0pnfzk92p9y5ymjq6rq619b9fy0dflv56jwg00wlvvbjssb6i1ib"))))
|
| 1054 | (build-system gnu-build-system)
|
| 1055 | (native-inputs
|
| 1056 | (list autoconf automake guile-3.0 guile-bytestructures pkg-config))
|
| 1057 | (inputs (list guile-3.0 xz))
|
| 1058 | (propagated-inputs (list guile-bytestructures))
|
| 1059 | (home-page "https://ngyro.com/software/guile-lzma.html")
|
| 1060 | (synopsis "Guile bindings for liblzma (XZ)")
|
| 1061 | (description "Guile-LZMA is a Guile wrapper for the liblzma (XZ)
|
| 1062 | library. It exposes an interface similar to other Guile compression
|
| 1063 | libraries, like Guile-zlib.")
|
| 1064 | (license license:gpl3+)))
|
| 1065 |
|
| 1066 | (define-public guile-bzip2
|
| 1067 | (package
|
| 1068 | (name "guile-bzip2")
|
| 1069 | (version "0.1.0")
|
| 1070 | (source
|
| 1071 | (origin
|
| 1072 | (method url-fetch)
|
| 1073 | (uri (string-append "https://files.ngyro.com/guile-bzip2/guile-bzip2-"
|
| 1074 | version ".tar.gz"))
|
| 1075 | (sha256
|
| 1076 | (base32 "1qnxk5fzg8m9ik1ckhjvi22kkhd810mrg8jzxiizhk920b69wbdh"))))
|
| 1077 | (build-system gnu-build-system)
|
| 1078 | (native-inputs (list guile-3.0 guile-bytestructures pkg-config))
|
| 1079 | (inputs (list guile-3.0 bzip2))
|
| 1080 | (propagated-inputs (list guile-bytestructures))
|
| 1081 | (home-page "https://ngyro.com/software/guile-bzip2.html")
|
| 1082 | (synopsis "Guile bindings for libbzip2")
|
| 1083 | (description "Guile-bzip2 is a Guile wrapper for the libbzip2
|
| 1084 | library. It exposes an interface similar to other Guile compression
|
| 1085 | libraries, like Guile-zlib.")
|
| 1086 | (license license:gpl3+)))
|
| 1087 |
|
| 1088 | |