guix.scm 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. ;;; mudsync --- Live hackable MUDs in Guile
  2. ;;; Copyright (C) 2016 Jan Nieuwenhuizen <janneke@gnu.org>
  3. ;;; Copyright (C) 2017 Christopher Allan Webber <cwebber@dustycloud.org>
  4. ;;;
  5. ;;; This program is free software: you can redistribute it and/or modify
  6. ;;; it under the terms of the GNU General Public License as published by
  7. ;;; the Free Software Foundation, either version 3 of the License, or
  8. ;;; (at your option) any later version.
  9. ;;;
  10. ;;; This program is distributed in the hope that it will be useful,
  11. ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ;;; GNU General Public License for more details.
  14. ;;;
  15. ;;; You should have received a copy of the GNU General Public License
  16. ;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. ;;; Commentary:
  18. ;;
  19. ;; GNU Guix development package. To build and install, run:
  20. ;;
  21. ;; guix package -f guix.scm
  22. ;;
  23. ;; To build it, but not install it, run:
  24. ;;
  25. ;; guix build -f guix.scm
  26. ;;
  27. ;; To use as the basis for a development environment, run:
  28. ;;
  29. ;; guix environment -l guix.scm
  30. ;;
  31. ;;; Code:
  32. (use-modules (srfi srfi-1)
  33. (srfi srfi-26)
  34. (ice-9 popen)
  35. (ice-9 match)
  36. (ice-9 rdelim)
  37. (guix download)
  38. (guix packages)
  39. (guix licenses)
  40. (guix gexp)
  41. (guix git-download)
  42. (guix build-system gnu)
  43. ((guix build utils) #:select (with-directory-excursion))
  44. (gnu packages)
  45. (gnu packages autotools)
  46. (gnu packages guile)
  47. (gnu packages pkg-config)
  48. (gnu packages texinfo))
  49. (define %source-dir (dirname (current-filename)))
  50. (define guile-without-select-bug
  51. (package
  52. (inherit guile-next)
  53. (version (package-version guile-next))
  54. (source (origin
  55. (method url-fetch)
  56. (uri (string-append "ftp://alpha.gnu.org/gnu/guile/guile-"
  57. version ".tar.xz"))
  58. (sha256
  59. (base32
  60. "0r9y4hw17dlxahik4zsccfb2f3p2a07wqndfm251bgmam9hln6gi"))
  61. (modules '((guix build utils)))
  62. ;; Remove the pre-built object files. Instead, build everything
  63. ;; from source, at the expense of significantly longer build
  64. ;; times (almost 3 hours on a 4-core Intel i5).
  65. (snippet '(for-each delete-file
  66. (find-files "prebuilt" "\\.go$")))
  67. ;; Here's what we're adding
  68. (patches (list (string-append %source-dir
  69. "/build-aux/patch-guile-fix-live-repl.patch")))))))
  70. (define guile-8sync-latest
  71. (package
  72. (inherit guile-8sync)
  73. (version "git")
  74. (source
  75. (origin
  76. (method git-fetch)
  77. (uri (git-reference
  78. (url "git://git.savannah.gnu.org/8sync.git")
  79. (commit "dfde2119df2a0adb86ec4921f95ef2c15692a593")))
  80. (sha256
  81. (base32
  82. "086smlch92n6z5xng0la9l9g6m145klw1c8222cgj32qhyarbkpk"))))
  83. (arguments
  84. `(#:phases (modify-phases %standard-phases
  85. (add-before 'configure 'bootstrap
  86. (lambda _
  87. (zero? (system* "./bootstrap.sh")))))))))
  88. (package
  89. (name "guile-mudsync")
  90. (version "git")
  91. (source (local-file %source-dir
  92. #:recursive? #t
  93. #:select? (git-predicate %source-dir)))
  94. (build-system gnu-build-system)
  95. (native-inputs `(("autoconf" ,autoconf)
  96. ("automake" ,automake)
  97. ("pkg-config" ,pkg-config)
  98. ("texinfo" ,texinfo)))
  99. (inputs `(("guile" ,guile-without-select-bug)
  100. ("guile-8sync" ,guile-8sync-latest)
  101. ("guile-irregex" ,guile2.2-irregex)))
  102. (arguments
  103. `(#:phases (modify-phases %standard-phases
  104. (add-before 'configure 'bootstrap
  105. (lambda _
  106. (zero? (system* "./bootstrap.sh"))))
  107. (add-before 'configure 'setenv
  108. (lambda _
  109. (setenv "GUILE_AUTO_COMPILE" "0"))))))
  110. (home-page "https://notabug.org/cwebber/mudsync/")
  111. (synopsis "Live hackable MUD system")
  112. (description
  113. "Mudsync is a live hackable MUD system built on top of GNU 8sync.")
  114. (license gpl3+))