| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 |
|
| 21 | (define-module (gnu packages ragel)
|
| 22 | #:use-module ((guix licenses) #:prefix license:)
|
| 23 | #:use-module (guix packages)
|
| 24 | #:use-module (guix download)
|
| 25 | #:use-module (guix build-system gnu)
|
| 26 | #:use-module (guix utils)
|
| 27 | #:use-module (gnu packages)
|
| 28 | #:use-module (gnu packages base))
|
| 29 |
|
| 30 | (define-public ragel
|
| 31 | (package
|
| 32 | (name "ragel")
|
| 33 | (version "6.10")
|
| 34 | (source (origin
|
| 35 | (method url-fetch)
|
| 36 | (uri (string-append "https://www.colm.net/files/ragel/ragel-"
|
| 37 | version ".tar.gz"))
|
| 38 | (sha256
|
| 39 | (base32
|
| 40 | "0gvcsl62gh6sg73nwaxav4a5ja23zcnyxncdcdnqa2yjcpdnw5az"))))
|
| 41 | (build-system gnu-build-system)
|
| 42 | (arguments
|
| 43 | (if (target-aarch64?)
|
| 44 | '(#:phases
|
| 45 | (modify-phases %standard-phases
|
| 46 | (add-after 'unpack 'apply-char-signedness-fix
|
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | (lambda _
|
| 54 | (let ((patch
|
| 55 | (search-input-file %build-inputs "/bin/patch"))
|
| 56 | (char-signedness-patch
|
| 57 | (assoc-ref %build-inputs "char-signedness-patch")))
|
| 58 | (invoke patch "-p1" "-i" char-signedness-patch))))))
|
| 59 | '()))
|
| 60 | (native-inputs
|
| 61 | (if (target-aarch64?)
|
| 62 | `(("char-signedness-patch"
|
| 63 | ,(search-patch "ragel-char-signedness.patch"))
|
| 64 | ("patch" ,patch))
|
| 65 | '()))
|
| 66 | (home-page "https://www.colm.net/open-source/ragel/")
|
| 67 | (synopsis "State machine compiler")
|
| 68 | (description
|
| 69 | "Ragel compiles executable finite state machines from regular languages.
|
| 70 | Ragel targets C, C++, Obj-C, C#, D, Java, Go and Ruby. Ragel state machines
|
| 71 | can not only recognize byte sequences as regular expression machines do, but
|
| 72 | can also execute code at arbitrary points in the recognition of a regular
|
| 73 | language. Code embedding is done using inline operators that do not disrupt
|
| 74 | the regular language syntax.")
|
| 75 | |
| 76 | (license license:gpl2+)))
|
| 77 |
|