| 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 | (define-module (gnu packages ruby)
|
| 37 | #:use-module ((guix licenses) #:prefix license:)
|
| 38 | #:use-module (gnu packages)
|
| 39 | #:use-module (gnu packages base)
|
| 40 | #:use-module (gnu packages bison)
|
| 41 | #:use-module (gnu packages c)
|
| 42 | #:use-module (gnu packages check)
|
| 43 | #:use-module (gnu packages compression)
|
| 44 | #:use-module (gnu packages crypto)
|
| 45 | #:use-module (gnu packages curl)
|
| 46 | #:use-module (gnu packages databases)
|
| 47 | #:use-module (gnu packages dbm)
|
| 48 | #:use-module (gnu packages freedesktop)
|
| 49 | #:use-module (gnu packages rails)
|
| 50 | #:use-module (gnu packages readline)
|
| 51 | #:use-module (gnu packages autotools)
|
| 52 | #:use-module (gnu packages graphviz)
|
| 53 | #:use-module (gnu packages haskell-xyz)
|
| 54 | #:use-module (gnu packages java)
|
| 55 | #:use-module (gnu packages libffi)
|
| 56 | #:use-module (gnu packages libidn)
|
| 57 | #:use-module (gnu packages linux)
|
| 58 | #:use-module (gnu packages lsof)
|
| 59 | #:use-module (gnu packages man)
|
| 60 | #:use-module (gnu packages maths)
|
| 61 | #:use-module (gnu packages ncurses)
|
| 62 | #:use-module (gnu packages networking)
|
| 63 | #:use-module (gnu packages node)
|
| 64 | #:use-module (gnu packages perl)
|
| 65 | #:use-module (gnu packages pkg-config)
|
| 66 | #:use-module (gnu packages protobuf)
|
| 67 | #:use-module (gnu packages python)
|
| 68 | #:use-module (gnu packages python-xyz)
|
| 69 | #:use-module (gnu packages ragel)
|
| 70 | #:use-module (gnu packages rsync)
|
| 71 | #:use-module (gnu packages sqlite)
|
| 72 | #:use-module (gnu packages tls)
|
| 73 | #:use-module (gnu packages valgrind)
|
| 74 | #:use-module (gnu packages version-control)
|
| 75 | #:use-module (gnu packages virtualization)
|
| 76 | #:use-module (gnu packages web-browsers)
|
| 77 | #:use-module (gnu packages serialization)
|
| 78 | #:use-module (guix packages)
|
| 79 | #:use-module (guix download)
|
| 80 | #:use-module (guix git-download)
|
| 81 | #:use-module (guix gexp)
|
| 82 | #:use-module (guix modules)
|
| 83 | #:use-module (guix utils)
|
| 84 | #:use-module (guix build-system gnu)
|
| 85 | #:use-module (gnu packages xml)
|
| 86 | #:use-module (gnu packages web)
|
| 87 | #:use-module (guix build-system ruby))
|
| 88 |
|
| 89 | (define-public ruby-3.4
|
| 90 | (package
|
| 91 | (name "ruby")
|
| 92 | (version "3.4.7")
|
| 93 | (source
|
| 94 | (origin
|
| 95 | (method url-fetch)
|
| 96 | (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
|
| 97 | (version-major+minor version)
|
| 98 | "/ruby-" version ".tar.xz"))
|
| 99 | (sha256
|
| 100 | (base32
|
| 101 | "1irh0l7g75p0arnah58ismzixa80qxn99x3qfnalcxg0ys35lhnv"))))
|
| 102 | (build-system gnu-build-system)
|
| 103 | (arguments
|
| 104 | `(#:test-target "test"
|
| 105 | #:configure-flags
|
| 106 | ,(if (%current-target-system)
|
| 107 | '(list (string-append
|
| 108 | "LDFLAGS=-Wl,-rpath="
|
| 109 | (assoc-ref %outputs "out") "/lib")
|
| 110 | "--enable-shared")
|
| 111 | ''("--enable-shared")) |
| 112 | #:phases
|
| 113 | (modify-phases %standard-phases
|
| 114 | (add-before 'configure 'replace-bin-sh-and-remove-libffi
|
| 115 | (lambda _
|
| 116 | (substitute* '("configure.ac"
|
| 117 | "template/Makefile.in"
|
| 118 | "lib/rubygems/installer.rb"
|
| 119 | "ext/pty/pty.c"
|
| 120 | "io.c"
|
| 121 | "lib/mkmf.rb"
|
| 122 | "process.c"
|
| 123 | "test/rubygems/test_gem_ext_configure_builder.rb"
|
| 124 | "test/rdoc/rdoc_parser_test.rb"
|
| 125 | "test/ruby/test_rubyoptions.rb"
|
| 126 | "test/ruby/test_process.rb"
|
| 127 | "test/ruby/test_system.rb"
|
| 128 | "tool/rbinstall.rb")
|
| 129 | (("/bin/sh") (which "sh"))))))))
|
| 130 | (native-inputs
|
| 131 | (append (if (%current-target-system)
|
| 132 | (list this-package)
|
| 133 | '())
|
| 134 | (list autoconf libyaml)))
|
| 135 | (inputs
|
| 136 | (list readline openssl-1.1 libffi gdbm))
|
| 137 | (propagated-inputs
|
| 138 | (list zlib))
|
| 139 | (native-search-paths
|
| 140 | (list (search-path-specification
|
| 141 | (variable "GEM_PATH")
|
| 142 | (files (list (string-append "lib/ruby/vendor_ruby"))))))
|
| 143 | (synopsis "Programming language interpreter")
|
| 144 | (description "Ruby is a dynamic object-oriented programming language with
|
| 145 | a focus on simplicity and productivity.")
|
| 146 | (home-page "https://www.ruby-lang.org")
|
| 147 | (license license:ruby)))
|
| 148 |
|
| 149 | (define-public ruby-3.3
|
| 150 | (package
|
| 151 | (name "ruby")
|
| 152 | (version "3.3.9")
|
| 153 | (source
|
| 154 | (origin
|
| 155 | (method url-fetch)
|
| 156 | (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
|
| 157 | (version-major+minor version)
|
| 158 | "/ruby-" version ".tar.xz"))
|
| 159 | (sha256
|
| 160 | (base32
|
| 161 | "1fvng8x44x90pn8nl4sxa5nzb34jwq0is6l5k7066zrg18ca491b"))))
|
| 162 | (build-system gnu-build-system)
|
| 163 | (arguments
|
| 164 | `(#:test-target "test"
|
| 165 | #:configure-flags
|
| 166 | ,(if (%current-target-system)
|
| 167 | '(list (string-append
|
| 168 | "LDFLAGS=-Wl,-rpath="
|
| 169 | (assoc-ref %outputs "out") "/lib")
|
| 170 | "--enable-shared")
|
| 171 | ''("--enable-shared")) |
| 172 | #:phases
|
| 173 | (modify-phases %standard-phases
|
| 174 | (add-before 'configure 'replace-bin-sh-and-remove-libffi
|
| 175 | (lambda _
|
| 176 | (substitute* '("configure.ac"
|
| 177 | "template/Makefile.in"
|
| 178 | "lib/rubygems/installer.rb"
|
| 179 | "ext/pty/pty.c"
|
| 180 | "io.c"
|
| 181 | "lib/mkmf.rb"
|
| 182 | "process.c"
|
| 183 | "test/rubygems/test_gem_ext_configure_builder.rb"
|
| 184 | "test/rdoc/test_rdoc_parser.rb"
|
| 185 | "test/ruby/test_rubyoptions.rb"
|
| 186 | "test/ruby/test_process.rb"
|
| 187 | "test/ruby/test_system.rb"
|
| 188 | "tool/rbinstall.rb")
|
| 189 | (("/bin/sh") (which "sh"))))))))
|
| 190 | (native-inputs
|
| 191 | (append (if (%current-target-system)
|
| 192 | (list this-package)
|
| 193 | '())
|
| 194 | (list autoconf libyaml)))
|
| 195 | (inputs
|
| 196 | (list readline openssl-1.1 libffi gdbm))
|
| 197 | (propagated-inputs
|
| 198 | (list zlib))
|
| 199 | (native-search-paths
|
| 200 | (list (search-path-specification
|
| 201 | (variable "GEM_PATH")
|
| 202 | (files (list (string-append "lib/ruby/vendor_ruby"))))))
|
| 203 | (synopsis "Programming language interpreter")
|
| 204 | (description "Ruby is a dynamic object-oriented programming language with
|
| 205 | a focus on simplicity and productivity.")
|
| 206 | (home-page "https://www.ruby-lang.org")
|
| 207 | (license license:ruby)))
|
| 208 |
|
| 209 | (define-public ruby-2.7
|
| 210 | (package
|
| 211 | (name "ruby")
|
| 212 | (version "2.7.8")
|
| 213 | (source
|
| 214 | (origin
|
| 215 | (method url-fetch)
|
| 216 | (uri (string-append "https://cache.ruby-lang.org/pub/ruby/"
|
| 217 | (version-major+minor version)
|
| 218 | "/ruby-" version ".tar.gz"))
|
| 219 | (sha256
|
| 220 | (base32
|
| 221 | "182vni66djmiqagwzfsd0za7x9k3zag43b88c590aalgphybdnn2"))
|
| 222 | (modules '((guix build utils)))
|
| 223 | (snippet `(begin
|
| 224 | |
| 225 | (delete-file-recursively "ext/fiddle/libffi-3.2.1")
|
| 226 | #t))))
|
| 227 | (build-system gnu-build-system)
|
| 228 | (arguments
|
| 229 | `(#:test-target "test"
|
| 230 | #:configure-flags
|
| 231 | ,(if (%current-target-system)
|
| 232 | '(list (string-append
|
| 233 | "LDFLAGS=-Wl,-rpath="
|
| 234 | (assoc-ref %outputs "out") "/lib")
|
| 235 | "--enable-shared")
|
| 236 | ''("--enable-shared")) |
| 237 | #:phases
|
| 238 | (modify-phases %standard-phases
|
| 239 | (add-before 'configure 'replace-bin-sh-and-remove-libffi
|
| 240 | (lambda _
|
| 241 | (substitute* '("configure.ac"
|
| 242 | "template/Makefile.in"
|
| 243 | "lib/rubygems/installer.rb"
|
| 244 | "ext/pty/pty.c"
|
| 245 | "io.c"
|
| 246 | "lib/mkmf.rb"
|
| 247 | "process.c"
|
| 248 | "test/rubygems/test_gem_ext_configure_builder.rb"
|
| 249 | "test/rdoc/test_rdoc_parser.rb"
|
| 250 | "test/ruby/test_rubyoptions.rb"
|
| 251 | "test/ruby/test_process.rb"
|
| 252 | "test/ruby/test_system.rb"
|
| 253 | "tool/rbinstall.rb")
|
| 254 | (("/bin/sh") (which "sh")))
|
| 255 | #t))
|
| 256 | ,@(if (system-hurd?)
|
| 257 | '((add-after 'unpack 'skip-tests
|
| 258 | (lambda _
|
| 259 | (delete-file "bootstraptest/test_io.rb")
|
| 260 | (delete-file "test/ruby/test_io.rb"))))
|
| 261 | '()))))
|
| 262 | (native-inputs
|
| 263 | (append (if (%current-target-system)
|
| 264 | (list this-package)
|
| 265 | '())
|
| 266 | (list autoconf)))
|
| 267 | (inputs
|
| 268 | (list readline openssl-1.1 libffi gdbm))
|
| 269 | (propagated-inputs
|
| 270 | (list zlib))
|
| 271 | (native-search-paths
|
| 272 | (list (search-path-specification
|
| 273 | (variable "GEM_PATH")
|
| 274 | (files (list (string-append "lib/ruby/vendor_ruby"))))))
|
| 275 | (synopsis "Programming language interpreter")
|
| 276 | (description "Ruby is a dynamic object-oriented programming language with
|
| 277 | a focus on simplicity and productivity.")
|
| 278 | (home-page "https://www.ruby-lang.org")
|
| 279 | (license license:ruby)))
|
| 280 |
|
| 281 | (define-public ruby ruby-3.3)
|
| 282 |
|
| 283 | (define-public mruby
|
| 284 | (package
|
| 285 | (name "mruby")
|
| 286 | (version "3.3.0")
|
| 287 | (source
|
| 288 | (origin
|
| 289 | (method git-fetch)
|
| 290 | (uri (git-reference
|
| 291 | (url "https://github.com/mruby/mruby")
|
| 292 | (commit version)))
|
| 293 | (file-name (git-file-name name version))
|
| 294 | (sha256
|
| 295 | (base32
|
| 296 | "0zynr6dk0zxdip53il0qr0rhyzmjicpkxs63l77acpx8b05h8amc"))))
|
| 297 | (build-system gnu-build-system)
|
| 298 | (arguments
|
| 299 | `(#:test-target "test"
|
| 300 | #:phases
|
| 301 | (modify-phases %standard-phases
|
| 302 | (delete 'configure)
|
| 303 | (add-after 'unpack 'enable-verbose-tests
|
| 304 | (lambda _
|
| 305 | (substitute* "Makefile"
|
| 306 | (("ruby ./minirake" m)
|
| 307 | (string-append m " --verbose")))))
|
| 308 | (add-after 'unpack 'disable-broken-tests
|
| 309 | (lambda _
|
| 310 | (substitute* "mrbgems/mruby-io/test/io.rb"
|
| 311 | (("assert\\('IO.popen.+$" m)
|
| 312 | (string-append m "skip \"Hangs in the Guix build environment\"\n"))
|
| 313 | |
| 314 | (("assert\\('`cmd`.*" m)
|
| 315 | (string-append m "skip \"Disable for Guix\"\n")))))
|
| 316 | |
| 317 | (replace 'install
|
| 318 | (lambda* (#:key outputs #:allow-other-keys)
|
| 319 | (let* ((out (assoc-ref outputs "out"))
|
| 320 | (bin (string-append out "/bin"))
|
| 321 | (lib (string-append out "/lib"))
|
| 322 | (inc (string-append out "/include")))
|
| 323 | (mkdir-p bin)
|
| 324 | (copy-recursively "build/host/bin" bin)
|
| 325 | (mkdir-p lib)
|
| 326 | (copy-recursively "build/host/lib" lib)
|
| 327 | (mkdir-p inc)
|
| 328 | (copy-recursively "include" inc)))))))
|
| 329 | (native-inputs
|
| 330 | (list ruby bison))
|
| 331 | (home-page "https://github.com/mruby/mruby")
|
| 332 | (synopsis "Lightweight Ruby")
|
| 333 | (description "mruby is the lightweight implementation of the Ruby
|
| 334 | language. Its syntax is Ruby 3.x compatible except for pattern
|
| 335 | matching. mruby can be linked and embedded within your application.")
|
| 336 | (license license:expat)))
|
| 337 |
|
| 338 | |
| 339 | |
| 340 | |
| 341 | |
| 342 | |