| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 |
|
| 24 | (define-module (gnu packages racket)
|
| 25 | #:use-module (guix packages)
|
| 26 | #:use-module (guix download)
|
| 27 | #:use-module (guix git-download)
|
| 28 | #:use-module (guix utils)
|
| 29 | #:use-module (guix gexp)
|
| 30 | #:use-module (guix build-system gnu)
|
| 31 | #:use-module (guix diagnostics)
|
| 32 | #:use-module (guix i18n)
|
| 33 | #:use-module ((guix search-paths) #:select ($SSL_CERT_DIR $SSL_CERT_FILE))
|
| 34 | #:use-module (srfi srfi-1)
|
| 35 | #:use-module (srfi srfi-26)
|
| 36 | #:use-module (srfi srfi-34)
|
| 37 | #:use-module (ice-9 match)
|
| 38 | #:use-module (gnu packages)
|
| 39 | #:use-module (gnu packages autotools)
|
| 40 | #:use-module (gnu packages chez)
|
| 41 | #:use-module (gnu packages compression)
|
| 42 | #:use-module (gnu packages databases)
|
| 43 | #:use-module (gnu packages fontutils)
|
| 44 | #:use-module (gnu packages gl)
|
| 45 | #:use-module (gnu packages glib)
|
| 46 | #:use-module (gnu packages gtk)
|
| 47 | #:use-module (gnu packages image)
|
| 48 | #:use-module (gnu packages libedit)
|
| 49 | #:use-module (gnu packages libffi)
|
| 50 | #:use-module (gnu packages multiprecision)
|
| 51 | #:use-module (gnu packages ncurses)
|
| 52 | #:use-module (gnu packages sqlite)
|
| 53 | #:use-module (gnu packages tls)
|
| 54 | #:use-module (gnu packages xorg)
|
| 55 | #:use-module ((guix licenses) #:prefix license:))
|
| 56 |
|
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | |
| 69 | |
| 70 | |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | |
| 79 | |
| 80 | |
| 81 | |
| 82 | |
| 83 | |
| 84 | |
| 85 | |
| 86 | |
| 87 | |
| 88 | |
| 89 | |
| 90 | |
| 91 | |
| 92 | |
| 93 | |
| 94 | |
| 95 | |
| 96 | |
| 97 | |
| 98 | |
| 99 | |
| 100 | |
| 101 | |
| 102 | |
| 103 | |
| 104 | |
| 105 | |
| 106 | |
| 107 | |
| 108 | |
| 109 | |
| 110 | |
| 111 | |
| 112 | |
| 113 | |
| 114 | |
| 115 | |
| 116 | |
| 117 | |
| 118 | |
| 119 | |
| 120 | |
| 121 | |
| 122 | |
| 123 | |
| 124 | |
| 125 | |
| 126 | |
| 127 | |
| 128 | |
| 129 | |
| 130 | |
| 131 | |
| 132 | |
| 133 | |
| 134 | |
| 135 | |
| 136 | |
| 137 | |
| 138 | |
| 139 | |
| 140 | |
| 141 | |
| 142 | |
| 143 | |
| 144 | |
| 145 | |
| 146 | |
| 147 | |
| 148 | |
| 149 | |
| 150 | |
| 151 | |
| 152 | |
| 153 | |
| 154 | |
| 155 | |
| 156 | |
| 157 | |
| 158 | |
| 159 | |
| 160 | |
| 161 | |
| 162 | |
| 163 | |
| 164 | |
| 165 | |
| 166 | |
| 167 | |
| 168 | |
| 169 | |
| 170 | |
| 171 | |
| 172 | |
| 173 | |
| 174 | |
| 175 | |
| 176 | |
| 177 | |
| 178 | |
| 179 | |
| 180 | |
| 181 | |
| 182 | |
| 183 | |
| 184 | |
| 185 | |
| 186 | |
| 187 | |
| 188 | |
| 189 | |
| 190 | |
| 191 | |
| 192 | |
| 193 | |
| 194 | |
| 195 | |
| 196 | |
| 197 | |
| 198 | |
| 199 | |
| 200 | |
| 201 | |
| 202 | |
| 203 | |
| 204 |
|
| 205 | (define %racket-version "9.3") |
| 206 | (define %racket-commit
|
| 207 | (string-append "v" %racket-version))
|
| 208 | (define %racket-origin
|
| 209 | (origin
|
| 210 | (method git-fetch)
|
| 211 | (uri (git-reference
|
| 212 | (url "https://github.com/racket/racket")
|
| 213 | (commit %racket-commit)))
|
| 214 | (sha256
|
| 215 | (base32 "1q2pj20rsd739acb02dc825dw35wlrfn722c1nc5lyp91fmjcnrk"))
|
| 216 | (file-name (git-file-name "racket" %racket-version))
|
| 217 | (patches (search-patches "racket-chez-scheme-bin-sh.patch"
|
| 218 | "racket-launcher-config-dir.patch"
|
| 219 | "racket-rktio-bin-sh.patch"))
|
| 220 | (modules '((guix build utils)))
|
| 221 | (snippet
|
| 222 | #~(begin
|
| 223 | (use-modules (guix build utils))
|
| 224 | |
| 225 | (with-directory-excursion "racket/src/ChezScheme"
|
| 226 | |
| 227 | |
| 228 | |
| 229 | (for-each (lambda (dir)
|
| 230 | (when (directory-exists? dir)
|
| 231 | (delete-file-recursively dir)))
|
| 232 | '("boot"
|
| 233 | "lz4"
|
| 234 | "nanopass"
|
| 235 | "stex"
|
| 236 | "zlib"
|
| 237 | "zuo")))
|
| 238 | |
| 239 | (delete-file-recursively "racket/src/zuo")
|
| 240 | |
| 241 | (delete-file-recursively "racket/src/bc/foreign/libffi")))))
|
| 242 |
|
| 243 |
|
| 244 | (define-public zuo
|
| 245 | (package
|
| 246 | (name "zuo")
|
| 247 | (version "1.12") |
| 248 | #;(displayln (~a (hash-ref (runtime-env) 'version) "."
|
| 249 | (hash-ref (runtime-env) 'minor-version)))
|
| 250 | (source (origin
|
| 251 | (method git-fetch)
|
| 252 | (uri (git-reference
|
| 253 | (url "https://github.com/racket/zuo")
|
| 254 | (commit (string-append "v" version))))
|
| 255 | (sha256
|
| 256 | (base32 "053zn230v4bgfrf7clrqcp5d614fh4sv00hr5qw3vdvnl006shh5"))
|
| 257 | (file-name (git-file-name name version))
|
| 258 | (patches (search-patches "zuo-bin-sh.patch"))))
|
| 259 | (outputs '("out" "debug"))
|
| 260 | (build-system gnu-build-system)
|
| 261 | (arguments
|
| 262 | (list
|
| 263 | #:out-of-source? #t))
|
| 264 | (home-page "https://github.com/racket/zuo")
|
| 265 | (synopsis "Tiny Racket for build scripts")
|
| 266 | (description "Zuo is a tiny Racket with primitives for dealing
|
| 267 | with files and running processes. It comes with a @command{make}-like
|
| 268 | embedded DSL, which is used to build Racket itself.
|
| 269 |
|
| 270 | Zuo is a Racket variant in the sense that program files start with
|
| 271 | @code{#lang}, and the module path after @code{#lang} determines the parsing
|
| 272 | and expansion of the file content. That's how the @command{make}-like DSL is
|
| 273 | defined, and even the base Zuo language is defined by layers of @code{#lang}s.
|
| 274 | One of the early layers implements macros.")
|
| 275 | (license (list license:asl2.0 license:expat))))
|
| 276 |
|
| 277 |
|
| 278 | (define racket-vm-common-configure-flags
|
| 279 | #~`(,@(cond
|
| 280 | ((false-if-exception
|
| 281 | (search-input-file %build-inputs "/bin/libtool"))
|
| 282 | => (lambda (libtool)
|
| 283 | (list (string-append "--enable-lt=" libtool))))
|
| 284 | (else
|
| 285 | '()))
|
| 286 | ,@(cond
|
| 287 | ((false-if-exception
|
| 288 | (search-input-file %build-inputs "/opt/racket-vm/bin/racket"))
|
| 289 | => (lambda (racket)
|
| 290 | (list (string-append "--enable-racket=" racket))))
|
| 291 | (else
|
| 292 | '()))
|
| 293 | "CFLAGS=-g -O2 -Wno-error=implicit-function-declaration"
|
| 294 | "--disable-strip"
|
| 295 | |
| 296 | |
| 297 | |
| 298 | |
| 299 | "--enable-origtree"
|
| 300 | ,(string-append "--prefix=" #$output "/opt/racket-vm")))
|
| 301 |
|
| 302 | (define-public racket-vm-cgc
|
| 303 | |
| 304 | |
| 305 | (hidden-package
|
| 306 | (package
|
| 307 | (name "racket-vm-cgc")
|
| 308 | (version %racket-version)
|
| 309 | (source %racket-origin)
|
| 310 | (inputs (list ncurses |
| 311 | libffi)) |
| 312 | (native-inputs (cons* zuo |
| 313 | libtool |
| 314 | (if (%current-target-system)
|
| 315 | (list this-package)
|
| 316 | '())))
|
| 317 | (outputs '("out" "debug"))
|
| 318 | (build-system gnu-build-system)
|
| 319 | (arguments
|
| 320 | (list
|
| 321 | #:configure-flags
|
| 322 | #~(cons "--enable-cgcdefault"
|
| 323 | #$racket-vm-common-configure-flags)
|
| 324 | #:make-flags
|
| 325 | #~(list (string-append "ZUO="
|
| 326 | #+(this-package-native-input "zuo")
|
| 327 | "/bin/zuo"))
|
| 328 | |
| 329 | |
| 330 | |
| 331 | #:tests? #f
|
| 332 | |
| 333 | |
| 334 | #:out-of-source? #t
|
| 335 | #:modules '((ice-9 match)
|
| 336 | (ice-9 regex)
|
| 337 | (guix build gnu-build-system)
|
| 338 | (guix build utils))
|
| 339 | #:strip-directories #~'("opt/racket-vm/bin"
|
| 340 | "opt/racket-vm/lib")
|
| 341 | #:phases
|
| 342 | #~(modify-phases %standard-phases
|
| 343 | (add-before 'configure 'initialize-config.rktd
|
| 344 | (lambda* (#:key inputs #:allow-other-keys)
|
| 345 | (define (write-racket-hash alist)
|
| 346 | |
| 347 | (display "#hash(")
|
| 348 | (for-each (match-lambda
|
| 349 | ((k . v)
|
| 350 | (format #t "(~s . ~s)" k v)))
|
| 351 | alist)
|
| 352 | (display ")\n"))
|
| 353 | (define maybe-release-catalog
|
| 354 | (let ((v #$(package-version this-package)))
|
| 355 | (if (string-match "^[0-9]+\\.[0-9]+($|\\.[0-8][0-9]*$)"
|
| 356 | v)
|
| 357 | `(,(string-append
|
| 358 | "https://download.racket-lang.org/releases/"
|
| 359 | v
|
| 360 | "/catalog/"))
|
| 361 | '())))
|
| 362 | (mkdir-p "racket/etc")
|
| 363 | (with-output-to-file "racket/etc/config.rktd"
|
| 364 | (lambda ()
|
| 365 | (write-racket-hash
|
| 366 | `((build-stamp . "")
|
| 367 | (catalogs ,@maybe-release-catalog
|
| 368 | #f)))))))
|
| 369 | (add-before 'configure 'chdir
|
| 370 | (lambda _
|
| 371 | (chdir "racket/src")))
|
| 372 | (replace 'install-license-files
|
| 373 | |
| 374 | |
| 375 | (let ((install-license-files
|
| 376 | (assoc-ref %standard-phases 'install-license-files)))
|
| 377 | (lambda args
|
| 378 | (with-directory-excursion "../src"
|
| 379 | (apply install-license-files
|
| 380 | `(,@args
|
| 381 | |
| 382 | #:out-of-source? #f)))))))))
|
| 383 | (home-page "https://racket-lang.org")
|
| 384 | (synopsis "Old Racket implementation used for bootstrapping")
|
| 385 | (description "This variant of the Racket BC (``before Chez'' or
|
| 386 | ``bytecode'') implementation is not recommended for general use. It uses
|
| 387 | CGC (a ``Conservative Garbage Collector''), which was succeeded as default in
|
| 388 | PLT Scheme version 370 (which translates to 3.7 in the current versioning
|
| 389 | scheme) by the 3M variant, which in turn was succeeded in version 8.0 by the
|
| 390 | Racket CS implementation.
|
| 391 |
|
| 392 | Racket CGC is primarily used for bootstrapping Racket BC [3M]. It may
|
| 393 | also be used for embedding applications without the annotations needed in C
|
| 394 | code to use the 3M garbage collector.")
|
| 395 | |
| 396 | |
| 397 | (license (list license:lgpl3+ license:asl2.0 license:expat)))))
|
| 398 |
|
| 399 | (define-public racket-vm-bc
|
| 400 | (package
|
| 401 | (inherit racket-vm-cgc)
|
| 402 | (name "racket-vm-bc")
|
| 403 | (native-inputs
|
| 404 | (if (%current-target-system)
|
| 405 | (package-native-inputs racket-vm-cgc)
|
| 406 | (modify-inputs native-inputs
|
| 407 | (prepend racket-vm-cgc))))
|
| 408 | (arguments
|
| 409 | (substitute-keyword-arguments arguments
|
| 410 | ((#:configure-flags _ '())
|
| 411 | #~(cons "--enable-bconly"
|
| 412 | #$(cond
|
| 413 | ((target-ppc64le?)
|
| 414 | |
| 415 | |
| 416 | |
| 417 | #~(map
|
| 418 | (lambda (flag)
|
| 419 | (if (string-prefix? "CPPFLAGS=" flag)
|
| 420 | (string-append flag
|
| 421 | " -DSTACK_SAFETY_MARGIN=2000000")
|
| 422 | flag))
|
| 423 | #$racket-vm-common-configure-flags))
|
| 424 | (else
|
| 425 | racket-vm-common-configure-flags))))))
|
| 426 | (synopsis "Racket BC [3M] implementation")
|
| 427 | (description "The Racket BC (``before Chez'' or ``bytecode'')
|
| 428 | implementation was the default before Racket 8.0. It uses a compiler written
|
| 429 | in C targeting architecture-independent bytecode, plus a JIT compiler on most
|
| 430 | platforms. Racket BC has a different C API than the current default runtime
|
| 431 | system, Racket CS (based on ``Chez Scheme'').
|
| 432 |
|
| 433 | This package is the normal implementation of Racket BC with a precise garbage
|
| 434 | collector, 3M (``Moving Memory Manager'').")
|
| 435 | |
| 436 | |
| 437 | (license (list license:lgpl3+ license:asl2.0 license:expat))))
|
| 438 |
|
| 439 | (define-public racket-vm-cs
|
| 440 | (package
|
| 441 | (inherit racket-vm-bc)
|
| 442 | (name "racket-vm-cs")
|
| 443 | (inputs
|
| 444 | (let ((inputs (modify-inputs inputs
|
| 445 | (prepend zlib lz4))))
|
| 446 | (if (nix-system->native-chez-machine-type)
|
| 447 | (modify-inputs inputs
|
| 448 | (delete "libffi"))
|
| 449 | inputs)))
|
| 450 | (native-inputs
|
| 451 | (let ((native-inputs (package-native-inputs racket-vm-cgc)))
|
| 452 | (modify-inputs (if (%current-target-system)
|
| 453 | (modify-inputs native-inputs
|
| 454 | (prepend this-package)
|
| 455 | (delete "racket-vm-cgc"))
|
| 456 | native-inputs)
|
| 457 | (delete "libtool")
|
| 458 | (prepend chez-scheme-for-racket
|
| 459 | chez-nanopass-bootstrap))))
|
| 460 | (arguments
|
| 461 | (substitute-keyword-arguments arguments
|
| 462 | ((#:phases those-phases #~%standard-phases)
|
| 463 | #~(modify-phases #$those-phases
|
| 464 | (add-after 'unpack 'unpack-nanopass
|
| 465 | #$unpack-nanopass)))
|
| 466 | ((#:configure-flags _ '())
|
| 467 | #~(cons* "--enable-csonly"
|
| 468 | "--enable-libz"
|
| 469 | "--enable-lz4"
|
| 470 | (string-append "--enable-scheme="
|
| 471 | #+(this-package-native-input
|
| 472 | "chez-scheme-for-racket")
|
| 473 | "/bin/scheme")
|
| 474 | #$@(if (nix-system->native-chez-machine-type)
|
| 475 | #~()
|
| 476 | #~(#$(string-append "--enable-mach="
|
| 477 | (nix-system->pbarch-machine-type))
|
| 478 | "--enable-pb"))
|
| 479 | #$racket-vm-common-configure-flags))))
|
| 480 | (synopsis "Racket CS implementation")
|
| 481 | (description "The Racket CS implementation, which uses ``Chez Scheme'' as
|
| 482 | its core compiler and runtime system, has been the default Racket VM
|
| 483 | implementation since Racket 8.0. It performs better than the Racket BC
|
| 484 | implementation for most programs. On systems for which Racket CS cannot
|
| 485 | generate machine code, this package uses a variant of its ``portable
|
| 486 | bytecode'' backend specialized for word size and endianness.
|
| 487 |
|
| 488 | Using the Racket VM packages directly is not recommended: instead, install the
|
| 489 | @code{racket-minimal} or @code{racket} packages.")
|
| 490 | |
| 491 | |
| 492 | (license (list license:asl2.0 license:expat))))
|
| 493 |
|
| 494 | (define (racket-packages-origin name origin specs)
|
| 495 | "Extract from ORIGIN the sources for the Racket packages specified by SPECS,
|
| 496 | a non-empty list of package specifications. In the resulting file-like
|
| 497 | object, each package's source will be in the directory
|
| 498 | \"/share/racket/pkgs/PKG/\", where PKG is the Racket name for the package.
|
| 499 | The NAME will be used in the store file name for the resulting file-like
|
| 500 | object.
|
| 501 |
|
| 502 | A package specification is a list of the form:
|
| 503 |
|
| 504 | (PKG PATH)
|
| 505 |
|
| 506 | where PATH is the path to the package source relative to ORIGIN---possibly
|
| 507 | \".\". As a special case, a package specification may also be a string, which
|
| 508 | is equivalent to:
|
| 509 |
|
| 510 | (PKG PKG)
|
| 511 |
|
| 512 | Examples:
|
| 513 |
|
| 514 | - \"expeditor\"
|
| 515 | - (\"main-distribution\" \".\")
|
| 516 | - (\"racket-lib\" \"pkgs/racket-lib\")"
|
| 517 | (computed-file
|
| 518 | (string-append "racket-pkg-" name "-sources")
|
| 519 | (with-imported-modules `((guix build utils))
|
| 520 | #~(begin
|
| 521 | (use-modules (guix build utils))
|
| 522 | (mkdir-p (string-append #$output "/share/racket/pkgs"))
|
| 523 | (chdir (string-append #$output "/share/racket/pkgs"))
|
| 524 | #$@(map (match-lambda
|
| 525 | ((? string? name)
|
| 526 | #~(copy-recursively #$(file-append origin (string-append "/" name))
|
| 527 | #$name))
|
| 528 | ((name ".")
|
| 529 | #~(copy-recursively #$origin #$name))
|
| 530 | ((name path)
|
| 531 | #~(copy-recursively #$(file-append origin (string-append "/" path))
|
| 532 | #$name)))
|
| 533 | specs)))))
|
| 534 |
|
| 535 | (define (simple-racket-origin repo hash specs)
|
| 536 | "Like 'racket-packages-origin', but specialized for packages hosted at
|
| 537 | \"https://github.com/racket/REPO\" with sha256 checksum HASH. REPO is also
|
| 538 | used to build the name of the resulting store item."
|
| 539 | (racket-packages-origin
|
| 540 | repo
|
| 541 | (origin
|
| 542 | (method git-fetch)
|
| 543 | (uri (git-reference
|
| 544 | (url (format #f "https://github.com/racket/~a" repo))
|
| 545 | (commit %racket-commit)))
|
| 546 | (sha256 hash)
|
| 547 | (file-name (git-file-name (string-append "racket-" repo)
|
| 548 | %racket-version)))
|
| 549 | specs))
|
| 550 |
|
| 551 | (define-public racket-minimal
|
| 552 | (package
|
| 553 | (name "racket-minimal")
|
| 554 | (version %racket-version)
|
| 555 | (source #f)
|
| 556 | |
| 557 | |
| 558 | |
| 559 | (inputs
|
| 560 | (list openssl
|
| 561 | sqlite
|
| 562 | racket-vm-cs
|
| 563 | (racket-packages-origin
|
| 564 | "base" %racket-origin
|
| 565 | '(("base" "pkgs/base")
|
| 566 | ("racket-lib" "pkgs/racket-lib")))))
|
| 567 | (native-search-paths (list $SSL_CERT_DIR $SSL_CERT_FILE))
|
| 568 | (build-system gnu-build-system)
|
| 569 | (arguments
|
| 570 | |
| 571 | |
| 572 | |
| 573 | (list
|
| 574 | #:configure-flags
|
| 575 | #~`("--tethered"
|
| 576 | "--extra-foreign-lib-search-dirs"
|
| 577 | ,(format
|
| 578 | #f "~s"
|
| 579 | (list #$(file-append (this-package-input "openssl") "/lib")
|
| 580 | #$(file-append (this-package-input "sqlite") "/lib"))))
|
| 581 | #:make-flags #~`("racket-lib")
|
| 582 | #:tests? #f |
| 583 | #:modules '((guix build gnu-build-system)
|
| 584 | (guix build utils)
|
| 585 | (guix build union)
|
| 586 | (ice-9 match))
|
| 587 | #:imported-modules `((guix build union)
|
| 588 | ,@%default-gnu-imported-modules)
|
| 589 | #:phases
|
| 590 | #~(modify-phases %standard-phases
|
| 591 | (delete 'unpack)
|
| 592 | (replace 'configure
|
| 593 | (lambda* (#:key inputs configure-flags #:allow-other-keys)
|
| 594 | (let* ((vm-dir (search-input-directory inputs "opt/racket-vm"))
|
| 595 | (racket (string-append vm-dir "/bin/racket")))
|
| 596 | (apply invoke
|
| 597 | racket
|
| 598 | #$configure-layer.rkt
|
| 599 | `(,@(cond
|
| 600 | ((false-if-exception
|
| 601 | (search-input-file
|
| 602 | inputs "etc/racket/config.rktd"))
|
| 603 | => (lambda (file)
|
| 604 | `("--parent"
|
| 605 | ,(dirname (dirname (dirname file))))))
|
| 606 | (else
|
| 607 | '()))
|
| 608 | ,@configure-flags
|
| 609 | ,vm-dir
|
| 610 | ,#$output))
|
| 611 | (invoke racket
|
| 612 | "--config" (string-append #$output "/etc/racket")
|
| 613 | "-l" "raco" "setup"
|
| 614 | "--no-user"))))
|
| 615 | (replace 'build
|
| 616 | (lambda* (#:key inputs #:allow-other-keys)
|
| 617 | |
| 618 | |
| 619 | (union-build (string-append #$output "/lib/racket/pkgs")
|
| 620 | (search-path-as-list '("share/racket/pkgs")
|
| 621 | (map cdr inputs))
|
| 622 | #:create-all-directories? #t)))
|
| 623 | (replace 'install
|
| 624 | (lambda* (#:key inputs make-flags #:allow-other-keys)
|
| 625 | (let ((racket
|
| 626 | (search-input-file inputs "/opt/racket-vm/bin/racket")))
|
| 627 | (unless (null? make-flags)
|
| 628 | (invoke racket
|
| 629 | "-l-"
|
| 630 | "pkg/dirs-catalog"
|
| 631 | "--link"
|
| 632 | "local-catalog"
|
| 633 | (string-append #$output "/lib/racket/pkgs"))
|
| 634 | (apply invoke
|
| 635 | racket
|
| 636 | "--config" (string-append #$output "/etc/racket")
|
| 637 | "-l" "raco"
|
| 638 | "pkg" "install"
|
| 639 | "--installation"
|
| 640 | "--auto"
|
| 641 | "--catalog" "local-catalog"
|
| 642 | make-flags))))))))
|
| 643 | (home-page "https://racket-lang.org")
|
| 644 | (synopsis "Racket without bundled packages such as DrRacket")
|
| 645 | (description
|
| 646 | "Racket is a general-purpose programming language in the Scheme family,
|
| 647 | with a large set of libraries and a compiler based on Chez Scheme. Racket is
|
| 648 | also a platform for language-oriented programming, from small domain-specific
|
| 649 | languages to complete language implementations.
|
| 650 |
|
| 651 | The ``minimal Racket'' distribution includes just enough of Racket for you to
|
| 652 | use @command{raco pkg} to install more. Bundled packages, such as the
|
| 653 | DrRacket IDE, are not included.")
|
| 654 | |
| 655 | |
| 656 | (license (list license:asl2.0 license:expat))))
|
| 657 |
|
| 658 | (define-public racket
|
| 659 | (package
|
| 660 | (inherit racket-minimal)
|
| 661 | (name "racket")
|
| 662 | (source #f)
|
| 663 | (native-inputs (list racket-minimal)) |
| 664 | (inputs
|
| 665 | (list
|
| 666 | cairo
|
| 667 | fontconfig
|
| 668 | glib
|
| 669 | glu
|
| 670 | gmp
|
| 671 | gtk+ |
| 672 | libjpeg-turbo
|
| 673 | libpng
|
| 674 | libx11 |
| 675 | mesa
|
| 676 | mpfr
|
| 677 | pango
|
| 678 | unixodbc
|
| 679 | libedit |
| 680 | racket-minimal |
| 681 | racket-vm-cs
|
| 682 | (simple-racket-origin
|
| 683 | "2d" (base32 "0fb5v6058ls08xw3zbmqyr2ym0psm119gl9ffgmhm9w8rs9i4dq7")
|
| 684 | '("2d" "2d-doc" "2d-lib"))
|
| 685 | (simple-racket-origin
|
| 686 | "algol60" (base32 "03akd7xhn4l7y66qgaimvdbn6gq7ay6j03dc11mz80n06z21dfb6")
|
| 687 | '(("algol60" ".")))
|
| 688 | (racket-packages-origin
|
| 689 | "racket" %racket-origin
|
| 690 | '(("at-exp-lib" "pkgs/at-exp-lib")
|
| 691 | ("compiler" "pkgs/compiler")
|
| 692 | ("compiler-lib" "pkgs/compiler-lib")
|
| 693 | ("net" "pkgs/net")
|
| 694 | ("net-doc" "pkgs/net-doc")
|
| 695 | ("net-lib" "pkgs/net-lib")
|
| 696 | ("racket-doc" "pkgs/racket-doc")
|
| 697 | ("racket-index" "pkgs/racket-index")
|
| 698 | ("racket-index-exe" "pkgs/racket-index-exe")
|
| 699 | ("scheme-doc" "pkgs/scheme-doc")
|
| 700 | ("sandbox-lib" "pkgs/sandbox-lib")
|
| 701 | ("sequence-tools-lib" "pkgs/sequence-tools-lib")
|
| 702 | ("zo-lib" "pkgs/zo-lib")))
|
| 703 | (simple-racket-origin
|
| 704 | "cext-lib" (base32 "0xhl7k2xns08lwfs7241g8994py3rh9p6ks2q1jbhrmbfq8j9v2v")
|
| 705 | '("cext-lib" "dynext-lib"))
|
| 706 | (simple-racket-origin
|
| 707 | "class-iop" (base32 "08z57q83cr7wnh6g8ah3hdhmsmf9zp1jfs7yvxv188l3hzvygy5l")
|
| 708 | '("class-iop-lib"))
|
| 709 | (simple-racket-origin
|
| 710 | "compatibility" (base32 "14jvklchabd2hfp1ffmwghl4va1xill86s7qixqnzxqqhpi895n2")
|
| 711 | '("compatibility" "compatibility-doc" "compatibility-lib"))
|
| 712 | (simple-racket-origin
|
| 713 | "contract-profile" (base32 "068z8flwcznqg0bjk227i2qapqbciyrckgqf8mvk57gxmr6zh3d3")
|
| 714 | '(("contract-profile" ".")))
|
| 715 | (simple-racket-origin
|
| 716 | "data" (base32 "1lx9lq1wrfcdws60q88gkkx8bxy7igla9p4fjhyij75mk80qm6wh")
|
| 717 | '("data" "data-doc" "data-enumerate-lib" "data-lib"))
|
| 718 | (simple-racket-origin
|
| 719 | "datalog" (base32 "0nf6cy4djpyhfvgpa6yn72apbz9s83gp0qg95pzjd0az4v6qwq1s")
|
| 720 | '(("datalog" ".")))
|
| 721 | (simple-racket-origin
|
| 722 | "db" (base32 "09f2wysqmgs46nbzmwrhbn6jqnkpj6bsabm6s6kw8qmp6azca9q2")
|
| 723 | '("db" "db-doc" "db-lib"))
|
| 724 | (simple-racket-origin
|
| 725 | "deinprogramm" (base32 "0j7867c8nshgz0mcl9l7w5adwi51lxf6s2x4cv24674xgbh71xkn")
|
| 726 | '("deinprogramm"
|
| 727 | "deinprogramm-doc"
|
| 728 | "deinprogramm-lib"
|
| 729 | "deinprogramm-signature"
|
| 730 | "deinprogramm-tool"))
|
| 731 | (simple-racket-origin
|
| 732 | "distributed-places" (base32 "1dajpkj9balqcpv6cdk9hwjz592h1vq8rrx5vncariiac4vbdpa0")
|
| 733 | '("distributed-places" "distributed-places-doc" "distributed-places-lib"))
|
| 734 | (simple-racket-origin
|
| 735 | "draw" (base32 "0j2xzirchwjrynqf10w69ji3qrmqh3p4zrfqsxalvf6h0cqpfrf8")
|
| 736 | '("draw" "draw-doc" "draw-lib"))
|
| 737 | (simple-racket-origin
|
| 738 | "drracket" (base32 "1hrz4brh4zfzr7mnkdxyalgnziyzvk2ggr03hnamkfir1cy1szbq")
|
| 739 | '("drracket"
|
| 740 | "drracket-core"
|
| 741 | "drracket-core-lib"
|
| 742 | "drracket-plugin-lib"
|
| 743 | "drracket-tool"
|
| 744 | "drracket-tool-doc"
|
| 745 | "drracket-tool-lib"
|
| 746 | "drracket-tool-text-lib"))
|
| 747 | (simple-racket-origin
|
| 748 | "ds-store" (base32 "0lv8dy891k8gllhiqpag6x34jwgs57ihvqwp72plcgyi51qfpz5x")
|
| 749 | '("ds-store" "ds-store-doc" "ds-store-lib"))
|
| 750 | (simple-racket-origin
|
| 751 | "eli-tester" (base32 "0icx6wn14gjm8kdmq1jppqgq87sxkras4qb5xmdr6wigxafhjqyk")
|
| 752 | '(("eli-tester" ".")))
|
| 753 | (simple-racket-origin
|
| 754 | "eopl" (base32 "0qihajdpwf2q7hbs6fsw6mmmzy57kgzgry3vyp9z8w7ay8df3w15")
|
| 755 | '(("eopl" ".")))
|
| 756 | (simple-racket-origin
|
| 757 | "errortrace" (base32 "1xlyfjls2nwajr178sz6liqp9hql6yj519jcqbhyp31yzv7d781l")
|
| 758 | '("errortrace" "errortrace-doc" "errortrace-lib"))
|
| 759 | (simple-racket-origin
|
| 760 | "expeditor" (base32 "1nk88jq0blzcw45fr8nwp024cysplayi3paaay4z824lkn1smzaa")
|
| 761 | '("expeditor" "expeditor-doc" "expeditor-lib"))
|
| 762 | (simple-racket-origin
|
| 763 | "frtime" (base32 "0ydz2yn8vvv6z7brwlswcyx0f31a6y6d443i89rysfvd2xkhpfd5")
|
| 764 | '(("frtime" ".")))
|
| 765 | (simple-racket-origin
|
| 766 | "future-visualizer" (base32 "0yzfs4ls5h9224wnssm21mm6dig40r9k6zh66sbi1vrlwyswpym0")
|
| 767 | '("future-visualizer"
|
| 768 | "future-visualizer-pict"
|
| 769 | "future-visualizer-typed"))
|
| 770 | (simple-racket-origin
|
| 771 | "games" (base32 "13z7fnbr48s98lmfxc0nbfhbqkd4hphymy2r63hqm783xzn6ylzi")
|
| 772 | '(("games" ".")))
|
| 773 | (simple-racket-origin
|
| 774 | "gui" (base32 "199k6ii97f1ys6m65xb7q1f5g6cx8f3ipxkxsp98mjyxy44gg3ip")
|
| 775 | '("gui" "gui-doc" "gui-lib" "tex-table"))
|
| 776 | (simple-racket-origin
|
| 777 | "gui-pkg-manager" (base32 "1f0ssg37kdk3xn9js616ns345565q39j9h51wzd99753iqd45m92")
|
| 778 | '("gui-pkg-manager-lib"))
|
| 779 | (simple-racket-origin
|
| 780 | "htdp" (base32 "0brylvba54bm4d5g1z5zz07yl0qazvj3pqvrrliy5h8r0c3qi8fq")
|
| 781 | '("htdp" "htdp-doc" "htdp-lib"))
|
| 782 | (simple-racket-origin
|
| 783 | "html" (base32 "18n1jnjgzfknc8nv8dppi85nb8q08gqdwkg6hfjk08x0p00anx2x")
|
| 784 | '("html" "html-doc" "html-lib"))
|
| 785 | (simple-racket-origin
|
| 786 | "icons" (base32 "1s5a6j11fg3fdr6b7vm2q7q178d7q8b8igy73bs211r27qrd1gg7")
|
| 787 | '(("icons" ".")))
|
| 788 | (simple-racket-origin
|
| 789 | "images" (base32 "0ckg53nzq4zdv8qc4f5nim9wsgsnif56w1wmji5w2czfm0j7frln")
|
| 790 | '("images" "images-doc" "images-gui-lib" "images-lib"))
|
| 791 | (simple-racket-origin
|
| 792 | "lazy" (base32 "0rn8kd0ih7aw6fj1g7jdvi5978a6q4hyd6gbh89nb6j5ijvlgn43")
|
| 793 | '(("lazy" ".")))
|
| 794 | (simple-racket-origin
|
| 795 | "macro-debugger" (base32 "0x3dy0dksz95pqgllwkv6i2jxvkbcnv9h9zpkjfq8dl304z1bkhp")
|
| 796 | '("macro-debugger" "macro-debugger-text-lib"))
|
| 797 | (simple-racket-origin
|
| 798 | "main-distribution" (base32 "0gk7wrwy0r1yllk827h8awfswngl1lhlq765d6s42y841v33jn0i")
|
| 799 | '(("main-distribution" ".")))
|
| 800 | (simple-racket-origin
|
| 801 | "make" (base32 "10852fj30bz5r46c3d99s37fkgy5yh44gb01j29sf3kxnhi0g2sa")
|
| 802 | '(("make" ".")))
|
| 803 | (simple-racket-origin
|
| 804 | "math" (base32 "0rspnhdlgsnmr8i5nvp4lfqd9dvsvkj90f7xsic4imd23ja2zxkw")
|
| 805 | '("math" "math-doc" "math-lib"))
|
| 806 | (simple-racket-origin
|
| 807 | "mysterx" (base32 "11p9jzrafw0hizhl0cs4sxx7rv281185q8hryic2rpk0kzjdyr48")
|
| 808 | '(("mysterx" ".")))
|
| 809 | (simple-racket-origin
|
| 810 | "mzcom" (base32 "0rc9pfj7gwm5azghqvcibz6si1x5s2v8mr2yngk7ssq9gzfbi6a4")
|
| 811 | '(("mzcom" ".")))
|
| 812 | (simple-racket-origin
|
| 813 | "mzscheme" (base32 "0p7bp8rmzw7k12sjxdqlxf31d8ama4wv9qz6ryvnmjn2qyhrr3d1")
|
| 814 | '("mzscheme" "mzscheme-doc" "mzscheme-lib"))
|
| 815 | (racket-packages-origin
|
| 816 | "net-cookies" (origin
|
| 817 | (method git-fetch)
|
| 818 | (uri (git-reference
|
| 819 | (url "https://github.com/RenaissanceBug/racket-cookies")
|
| 820 | (commit %racket-commit)))
|
| 821 | (sha256 (base32
|
| 822 | "1220vskrvaqibazxzkzg0icg211ddlb7y20rb7v6d2zqfm16jin8"))
|
| 823 | (file-name
|
| 824 | (git-file-name "RenaissanceBug-racket-cookies" %racket-version)))
|
| 825 | '("net-cookies" "net-cookies-doc" "net-cookies-lib"))
|
| 826 | (racket-packages-origin
|
| 827 | "optimization-coach"
|
| 828 | (origin
|
| 829 | (method git-fetch)
|
| 830 | (uri (git-reference
|
| 831 | (url "https://github.com/stamourv/optimization-coach")
|
| 832 | (commit %racket-commit)))
|
| 833 | (sha256 (base32
|
| 834 | "0b27sw48d7rhz0hin88c7rbr9vpg1c23sn82nd4jkmq54h6gasr1"))
|
| 835 | (file-name
|
| 836 | (git-file-name "stamourv-optimization-coach" %racket-version)))
|
| 837 | '(("optimization-coach" ".")))
|
| 838 | (simple-racket-origin
|
| 839 | "option-contract" (base32 "1914dcxy6qzpg3cpnzdm9lj0kwyw8xdb85mwiamqfkbg0xlyyhpa")
|
| 840 | '("option-contract" "option-contract-doc" "option-contract-lib"))
|
| 841 | (simple-racket-origin
|
| 842 | "parser-tools" (base32 "0dp99d1a47kqyg2iqdijm5781qnd571iwvg85dvrjc76ab4pccgd")
|
| 843 | '("parser-tools" "parser-tools-doc" "parser-tools-lib"))
|
| 844 | (simple-racket-origin
|
| 845 | "pconvert" (base32 "0xw9f9692v2qp16fwmwmwmrb118kpz259vmx8cq6s9vsw0112zpq")
|
| 846 | '("pconvert-lib" "pconvert-doc"))
|
| 847 | (simple-racket-origin
|
| 848 | "pict" (base32 "1xs1k98nr052p5v30abn7kl8pm1rdwj8xqvrghw8b62bvhhb072a")
|
| 849 | '("pict" "pict-doc" "pict-lib"))
|
| 850 | (simple-racket-origin
|
| 851 | "pict-snip" (base32 "1qrqbigw6arhccqgqzblfqqcpsdy15dwb0y22axwxgpw1ax0ki6f")
|
| 852 | '("pict-snip" "pict-snip-doc" "pict-snip-lib"))
|
| 853 | (simple-racket-origin
|
| 854 | "picturing-programs" (base32 "1a3d6nw9n827b4711nvgrnw7w47k4fxvk8c2a8br6a1l748kxkwy")
|
| 855 | '(("picturing-programs" ".")))
|
| 856 | (simple-racket-origin
|
| 857 | "plai" (base32 "1vcplmrzk2wr0n0m4fa0nq9ir986d5nk3dvcd7h1rv2jvhkcqdaq")
|
| 858 | '("plai" "plai-doc" "plai-lib"))
|
| 859 | (simple-racket-origin
|
| 860 | "planet" (base32 "0r2yqrzrmdjjyr14k6hhlzc5kzrcx3583m1s02mhrcmpfw0s85w9")
|
| 861 | '("planet" "planet-doc" "planet-lib"))
|
| 862 | (simple-racket-origin
|
| 863 | "plot" (base32 "0skmir4njxmh3yx3ng23dvwkal79dd3fd23ijk6lyk8b013w1kj2")
|
| 864 | '("plot" "plot-compat" "plot-doc" "plot-gui-lib" "plot-lib"))
|
| 865 | (simple-racket-origin
|
| 866 | "preprocessor" (base32 "1p5aid58ifnjy4xl0ysh85cq39k25661v975jrpk182z3k5621mg")
|
| 867 | '(("preprocessor" ".")))
|
| 868 | (simple-racket-origin
|
| 869 | "profile" (base32 "1n6jlhkq0zs2sd132k92nvw08qscadjz3d6p2r5pjlcdawkmkik0")
|
| 870 | '("profile" "profile-doc" "profile-lib"))
|
| 871 | (racket-packages-origin
|
| 872 | "quickscript" (origin
|
| 873 | (method git-fetch)
|
| 874 | (uri (git-reference
|
| 875 | (url "https://github.com/Metaxal/quickscript")
|
| 876 | (commit %racket-commit)))
|
| 877 | (sha256 (base32
|
| 878 | "1r7i4g39hfkn0wb34dylzcp43ys1zl7ra9wmbzly07an7891xmns"))
|
| 879 | (file-name (git-file-name "Metaxal-quickscript" %racket-version)))
|
| 880 | '(("quickscript" ".")))
|
| 881 | (simple-racket-origin
|
| 882 | "r5rs" (base32 "06rw7aihq4wdr27nan42mfg13fs9lh8d0hf7m9g8m5vmnkd3h2pn")
|
| 883 | '("r5rs" "r5rs-doc" "r5rs-lib"))
|
| 884 | (simple-racket-origin
|
| 885 | "r6rs" (base32 "19pfv07lgkhjqxvy6k5s7wn26rkibrr0lnnfg9b0qybhxscbgjny")
|
| 886 | '("r6rs" "r6rs-doc" "r6rs-lib"))
|
| 887 | (racket-packages-origin
|
| 888 | "racket-cheat" (origin
|
| 889 | (method git-fetch)
|
| 890 | (uri (git-reference
|
| 891 | (url "https://github.com/jeapostrophe/racket-cheat")
|
| 892 | (commit %racket-commit)))
|
| 893 | (sha256 (base32
|
| 894 | "1q0da3hm64fj64f713yxdlg7x1hp162fnn3mc7al2hzk098w242w"))
|
| 895 | (file-name
|
| 896 | (git-file-name "jeapostrophe-racket-cheat" %racket-version)))
|
| 897 | '(("racket-cheat" ".")))
|
| 898 | (simple-racket-origin
|
| 899 | "racklog" (base32 "0i2jnghb5vqmk2f0cppgggyp73zy1q0dlhpvxrzdxw39skmhmgkc")
|
| 900 | '(("racklog" ".")))
|
| 901 | (simple-racket-origin
|
| 902 | "rackunit" (base32 "1p3mlhjfwr3522ajr4w76j1hrgsjraz4w02jr6jhfw4slbdrcf6b")
|
| 903 | '("rackunit"
|
| 904 | "rackunit-doc"
|
| 905 | "rackunit-gui"
|
| 906 | "rackunit-lib"
|
| 907 | "rackunit-plugin-lib"
|
| 908 | "rackunit-typed"
|
| 909 | "schemeunit"
|
| 910 | "testing-util-lib"))
|
| 911 | (simple-racket-origin
|
| 912 | "readline" (base32 "13kbcn2wchv82d709mw3r8n37bk8iwq0y4kpvm9dbzx0w2pxkfwn")
|
| 913 | '("readline" "readline-doc" "readline-lib"))
|
| 914 | (simple-racket-origin
|
| 915 | "realm" (base32 "0rlvwyd6rpyl0zda4a5p8dp346fvqzc8555dgfnrhliymkxb6x4g")
|
| 916 | '(("realm" ".")))
|
| 917 | (simple-racket-origin
|
| 918 | "redex" (base32 "0mh88bz681rsvfadsnlbjmbf4vwa8bxn7kkxpq408dri0rdd3wb4")
|
| 919 | '("redex"
|
| 920 | "redex-benchmark"
|
| 921 | "redex-doc"
|
| 922 | "redex-examples"
|
| 923 | "redex-gui-lib"
|
| 924 | "redex-lib"
|
| 925 | "redex-pict-lib"))
|
| 926 | (simple-racket-origin
|
| 927 | "sasl" (base32 "1l74rkp8m2jfb82678k3lhd2y5k9l8csazwshf9m969i67gzbjh8")
|
| 928 | '("sasl" "sasl-doc" "sasl-lib"))
|
| 929 | (simple-racket-origin
|
| 930 | "scheme-lib" (base32 "0pcf0y8rp4qyjhaz5ww5sr5diq0wpcdfrrnask7zapyklzx1jx8x")
|
| 931 | '(("scheme-lib" ".")))
|
| 932 | (simple-racket-origin
|
| 933 | "scribble" (base32 "0jj045dqc42jga9lxj6frafdh5x2ygw2a9an5d0dfwqjclgzcv9m")
|
| 934 | '("scribble"
|
| 935 | "scribble-doc"
|
| 936 | "scribble-html-lib"
|
| 937 | "scribble-lib"
|
| 938 | "scribble-text-lib"))
|
| 939 | (simple-racket-origin
|
| 940 | "serialize-cstruct-lib"
|
| 941 | (base32 "1rq3n1fa7ldjwx3lrh9ybhig7jlsw1crpzyklbzp3xqdw6jymfnz")
|
| 942 | '(("serialize-cstruct-lib" ".")))
|
| 943 | (simple-racket-origin
|
| 944 | "sgl" (base32 "0nkymhdyjrwi5h199j4w5zh7y3x3ai42gsiwxzh0hy7yqrqqg9zv")
|
| 945 | '(("sgl" ".")))
|
| 946 | (simple-racket-origin
|
| 947 | "shell-completion" (base32 "04m144gy2mp4fiq6rcbf12wjr8mws8k9scfhg9lc38vqppp4lxsj")
|
| 948 | '(("shell-completion" ".")))
|
| 949 | (simple-racket-origin
|
| 950 | "simple-tree-text-markup"
|
| 951 | (base32 "0fyd9gfz6bnv0m1901wv5mnhc05rm8hw9i6ddrqx33hs6qsg2zqr")
|
| 952 | '("simple-tree-text-markup"
|
| 953 | "simple-tree-text-markup-doc"
|
| 954 | "simple-tree-text-markup-lib"))
|
| 955 | (simple-racket-origin
|
| 956 | "slatex" (base32 "0pkm2isbbdk63slrbsxcql7rr0wdrw5kapw1xq4ps5k8dhlzv8x0")
|
| 957 | '(("slatex" ".")))
|
| 958 | (simple-racket-origin
|
| 959 | "slideshow" (base32 "1aprcapyj0362lfh2pbcyxf4r2k01zmp6yy9ppag0xbz0jw437im")
|
| 960 | '("slideshow" "slideshow-doc" "slideshow-exe" "slideshow-lib" "slideshow-plugin"))
|
| 961 | (simple-racket-origin
|
| 962 | "snip" (base32 "10727bi2ybn2ahlkpikdknwfzfsppaw5wkvjmzd380jp1fw91q67")
|
| 963 | '("snip" "snip-lib"))
|
| 964 | (simple-racket-origin
|
| 965 | "typed-racket" (base32 "06wi17w371vhfvjdhn61dfwrwsgpivpznzpng0ihkfp40kai1c7k")
|
| 966 | '("source-syntax"
|
| 967 | "typed-racket"
|
| 968 | "typed-racket-compatibility"
|
| 969 | "typed-racket-doc"
|
| 970 | "typed-racket-lib"
|
| 971 | "typed-racket-more"))
|
| 972 | (simple-racket-origin
|
| 973 | "srfi" (base32 "1m35kfwlm7wy16ncvx3ylhd77pj5p1gp7gkkva6b4df2bzzd00fs")
|
| 974 | '("srfi" "srfi-doc" "srfi-lib" "srfi-lite-lib"))
|
| 975 | (simple-racket-origin
|
| 976 | "string-constants" (base32 "1nyc56wp3iwfizv0458rv95vncykgrc7y2wg0mh4j55g3pcprw3s")
|
| 977 | '("string-constants" "string-constants-doc" "string-constants-lib"))
|
| 978 | (simple-racket-origin
|
| 979 | "swindle" (base32 "1q8vdxpzczzwdw2mys2caab45yvadmqkixsr29k8pl03n8dsg8j9")
|
| 980 | '(("swindle" ".")))
|
| 981 | (simple-racket-origin
|
| 982 | "syntax-color" (base32 "0rsl8352fad94b3gc9dwmm6r300idfkm0ysj8kr1kaqhikznba80")
|
| 983 | '("syntax-color" "syntax-color-doc" "syntax-color-lib"))
|
| 984 | (simple-racket-origin
|
| 985 | "trace" (base32 "1zx0kfbacidg5rllbvx842x949ra22n004irs3vm1hqmwmixy3is")
|
| 986 | '(("trace" ".")))
|
| 987 | (simple-racket-origin
|
| 988 | "unix-socket" (base32 "039r2aqc6xc4b3x95ggjg4ab1pfiff6pavi4d40662zgwbi61pwk")
|
| 989 | '("unix-socket" "unix-socket-doc" "unix-socket-lib"))
|
| 990 | (simple-racket-origin
|
| 991 | "web-server" (base32 "0v66z9dklf02lc0g357h4rnfq5pnk87d1qz59sfrlzz24phxg9g6")
|
| 992 | '("web-server" "web-server-doc" "web-server-lib"))
|
| 993 | (simple-racket-origin
|
| 994 | "wxme" (base32 "1qp5gr9gqsakiq3alw6m4yyv5vw4i3hp4y4nhq8vl2nkjmirvn0b")
|
| 995 | '("wxme" "wxme-lib"))
|
| 996 | (simple-racket-origin
|
| 997 | "xrepl" (base32 "1kkcm68qyck2d6mp56h1j5fnfbx938a15dnyn1cf5yqpj9cc637m")
|
| 998 | '("xrepl" "xrepl-doc" "xrepl-lib"))))
|
| 999 | (build-system gnu-build-system)
|
| 1000 | (arguments
|
| 1001 | (substitute-keyword-arguments arguments
|
| 1002 | ((#:make-flags _ '())
|
| 1003 | #~`("main-distribution"))
|
| 1004 | ((#:configure-flags _ '())
|
| 1005 | #~`("--tethered"
|
| 1006 | "--extra-foreign-lib-search-dirs"
|
| 1007 | ,(format #f "~s"
|
| 1008 | '(#$@(map (lambda (name)
|
| 1009 | (cond
|
| 1010 | ((this-package-input name)
|
| 1011 | => (cut file-append <> "/lib"))
|
| 1012 | (else
|
| 1013 | (raise
|
| 1014 | (formatted-message
|
| 1015 | (G_ "missing input '~a' to the 'racket' package")
|
| 1016 | name)))))
|
| 1017 | '("cairo"
|
| 1018 | "fontconfig-minimal" |
| 1019 | "glib"
|
| 1020 | "glu"
|
| 1021 | "gmp"
|
| 1022 | "gtk+"
|
| 1023 | "libjpeg-turbo"
|
| 1024 | "libpng"
|
| 1025 | "libx11"
|
| 1026 | "mesa"
|
| 1027 | "mpfr"
|
| 1028 | "pango"
|
| 1029 | "unixodbc"
|
| 1030 | "libedit"))))))))
|
| 1031 | (synopsis "Programmable programming language in the Scheme family")
|
| 1032 | (description
|
| 1033 | "Racket is a general-purpose programming language in the Scheme family,
|
| 1034 | with a large set of libraries and a compiler based on Chez Scheme. Racket is
|
| 1035 | also a platform for language-oriented programming, from small domain-specific
|
| 1036 | languages to complete language implementations.
|
| 1037 |
|
| 1038 | The main Racket distribution comes with many bundled packages, including the
|
| 1039 | DrRacket IDE, libraries for GUI and web programming, and implementations of
|
| 1040 | languages such as Typed Racket, R5RS and R6RS Scheme, Algol 60, and Datalog.")))
|
| 1041 |
|
| 1042 | (define configure-layer.rkt
|
| 1043 | (scheme-file
|
| 1044 | "configure-layer.rkt"
|
| 1045 | `(module
|
| 1046 | configure-layer racket/base
|
| 1047 | (require racket/cmdline
|
| 1048 | racket/match
|
| 1049 | racket/file
|
| 1050 | racket/port
|
| 1051 | racket/list
|
| 1052 | racket/pretty)
|
| 1053 | (define (build-path-string . args)
|
| 1054 | (path->string (apply build-path args)))
|
| 1055 | (define rx:racket
|
| 1056 | |
| 1057 | (regexp "racket"))
|
| 1058 | (define tethered? #f)
|
| 1059 | (define parent #f)
|
| 1060 | (define extra-foreign-lib-search-dirs '())
|
| 1061 | (define-values [vm-dir prefix]
|
| 1062 | (command-line
|
| 1063 | #:once-each
|
| 1064 | [("--tethered") "create a tethered layer"
|
| 1065 | (set! tethered? #t)]
|
| 1066 | [("--parent") dir "path of parent layer, if any"
|
| 1067 | (set! parent dir)]
|
| 1068 | [("--extra-foreign-lib-search-dirs") dir-list
|
| 1069 | "foreign library directories, as a list of strings in `read` syntax"
|
| 1070 | (set! extra-foreign-lib-search-dirs
|
| 1071 | (call-with-input-string dir-list read))]
|
| 1072 | #:args (vm-dir prefix)
|
| 1073 | (values vm-dir prefix)))
|
| 1074 | (let* ([config
|
| 1075 | (for/fold
|
| 1076 | ([config (file->value
|
| 1077 | (if parent
|
| 1078 | (build-path parent "etc/racket/config.rktd")
|
| 1079 | (build-path vm-dir "etc/config.rktd")))])
|
| 1080 | ([spec
|
| 1081 | (in-list
|
| 1082 | '((lib-dir lib-search-dirs "lib/racket" "lib")
|
| 1083 | (share-dir share-search-dirs "share/racket" "share")
|
| 1084 | (links-file links-search-files
|
| 1085 | "lib/racket/links.rktd"
|
| 1086 | "share/links.rktd")
|
| 1087 | (pkgs-dir pkgs-search-dirs "lib/racket/pkgs" "share/pkgs")
|
| 1088 | |
| 1089 | |
| 1090 | #;(bin-dir bin-search-dirs "bin" "bin")
|
| 1091 | (bin-dir bin-search-dirs
|
| 1092 | "lib/racket/bogus-untethered-bin"
|
| 1093 | "bin")
|
| 1094 | (man-dir man-search-dirs "share/man" "share/man")
|
| 1095 | (doc-dir doc-search-dirs "share/doc/racket" "doc")
|
| 1096 | (include-dir include-search-dirs
|
| 1097 | "include/racket"
|
| 1098 | "include")))])
|
| 1099 | (match-define (list main-key search-key pth vm-pth) spec)
|
| 1100 | (hash-set*
|
| 1101 | config
|
| 1102 | main-key
|
| 1103 | (build-path-string prefix pth)
|
| 1104 | search-key
|
| 1105 | (list* #f
|
| 1106 | (hash-ref config
|
| 1107 | main-key
|
| 1108 | (lambda ()
|
| 1109 | (if parent
|
| 1110 | (build-path-string parent pth)
|
| 1111 | (build-path-string vm-dir vm-pth))))
|
| 1112 | (filter values (hash-ref config search-key null)))))]
|
| 1113 | [config
|
| 1114 | (hash-update config
|
| 1115 | 'lib-search-dirs
|
| 1116 | (lambda (dirs)
|
| 1117 | |
| 1118 | |
| 1119 | (define-values [rkt old-foreign-dirs]
|
| 1120 | (partition (lambda (pth)
|
| 1121 | (or (not pth)
|
| 1122 | (regexp-match? rx:racket pth)))
|
| 1123 | dirs))
|
| 1124 | (append rkt
|
| 1125 | extra-foreign-lib-search-dirs
|
| 1126 | old-foreign-dirs)))]
|
| 1127 | [config
|
| 1128 | (hash-set* config
|
| 1129 | 'apps-dir
|
| 1130 | (build-path-string prefix "share/applications")
|
| 1131 | 'absolute-installation? #t
|
| 1132 | |
| 1133 | |
| 1134 | |
| 1135 | |
| 1136 | |
| 1137 | 'installation-name
|
| 1138 | (string-append (version)
|
| 1139 | "-guix"
|
| 1140 | (match (system-type 'gc)
|
| 1141 | ['cgc "-cgc"]
|
| 1142 | |
| 1143 | ['|3m| "-bc"]
|
| 1144 | [_ ""])))]
|
| 1145 | [config
|
| 1146 | (cond
|
| 1147 | [tethered?
|
| 1148 | |
| 1149 | |
| 1150 | #;(define bin-dir (hash-ref config 'bin-dir))
|
| 1151 | (define bin-dir (build-path-string prefix "bin"))
|
| 1152 | (hash-set* config
|
| 1153 | 'config-tethered-apps-dir (hash-ref config 'apps-dir)
|
| 1154 | 'config-tethered-console-bin-dir bin-dir
|
| 1155 | 'config-tethered-gui-bin-dir bin-dir)]
|
| 1156 | [else
|
| 1157 | config])])
|
| 1158 | (define new-config-pth
|
| 1159 | (build-path prefix "etc/racket/config.rktd"))
|
| 1160 | (make-parent-directory* new-config-pth)
|
| 1161 | (call-with-output-file*
|
| 1162 | new-config-pth
|
| 1163 | (lambda (out)
|
| 1164 | (pretty-write config out)))))))
|