guix.scm 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. ;; Fibers: cooperative, event-driven user-space threads.
  2. ;;;; Copyright (C) 2017 Christopher Allan Webber <cwebber@dustycloud.org>
  3. ;;;;
  4. ;;;; This library is free software; you can redistribute it and/or
  5. ;;;; modify it under the terms of the GNU Lesser General Public
  6. ;;;; License as published by the Free Software Foundation; either
  7. ;;;; version 3 of the License, or (at your option) any later version.
  8. ;;;;
  9. ;;;; This library is distributed in the hope that it will be useful,
  10. ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. ;;;; Lesser General Public License for more details.
  13. ;;;;
  14. ;;;; You should have received a copy of the GNU Lesser General Public
  15. ;;;; License along with this library; if not, write to the Free Software
  16. ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  17. (use-modules (ice-9 popen)
  18. (ice-9 match)
  19. (ice-9 rdelim)
  20. (srfi srfi-1)
  21. (srfi srfi-26)
  22. (guix build-system gnu)
  23. (guix gexp)
  24. (guix git-download)
  25. (guix licenses)
  26. (guix packages)
  27. (gnu packages)
  28. (gnu packages autotools)
  29. (gnu packages gettext)
  30. (gnu packages guile)
  31. (gnu packages pkg-config)
  32. (gnu packages texinfo))
  33. (define %source-dir (dirname (current-filename)))
  34. (define guile-fibers
  35. (package
  36. (name "guile-fibers")
  37. (version "git")
  38. (source (local-file %source-dir
  39. #:recursive? #t
  40. #:select? (git-predicate %source-dir)))
  41. (build-system gnu-build-system)
  42. (native-inputs `(("autoconf" ,autoconf)
  43. ("automake" ,automake)
  44. ("libtool" ,libtool)
  45. ("pkg-config" ,pkg-config)
  46. ("texinfo" ,texinfo)
  47. ("gettext" ,gettext-minimal)))
  48. (inputs
  49. `(("guile" ,guile-2.2)))
  50. (arguments
  51. `(#:phases (modify-phases %standard-phases
  52. (add-before 'configure 'bootstrap
  53. (lambda _
  54. (zero? (system* "./autogen.sh"))))
  55. (add-before 'configure 'setenv
  56. (lambda _
  57. (setenv "GUILE_AUTO_COMPILE" "0"))))))
  58. (synopsis "Lightweight concurrency facility for Guile")
  59. (description
  60. "Fibers is a Guile library that implements a a lightweight concurrency
  61. facility, inspired by systems like Concurrent ML, Go, and Erlang. A fiber is
  62. like a \"goroutine\" from the Go language: a lightweight thread-like
  63. abstraction. Systems built with Fibers can scale up to millions of concurrent
  64. fibers, tens of thousands of concurrent socket connections, and many parallel
  65. cores. The Fibers library also provides Concurrent ML-like channels for
  66. communication between fibers.
  67. Note that Fibers makes use of some Guile 2.1/2.2-specific features and
  68. is not available for Guile 2.0.")
  69. (home-page "https://github.com/wingo/fibers")
  70. (license lgpl3+)))
  71. guile-fibers