diff options
Diffstat (limited to 'gnu/packages/array-languages.scm')
| -rw-r--r-- | gnu/packages/array-languages.scm | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/gnu/packages/array-languages.scm b/gnu/packages/array-languages.scm index 3ba2be6b501..cb15e0d4475 100644 --- a/gnu/packages/array-languages.scm +++ b/gnu/packages/array-languages.scm | |||
| @@ -29,6 +29,79 @@ | |||
| 29 | ;;; | 29 | ;;; |
| 30 | ;;; Code: | 30 | ;;; Code: |
| 31 | 31 | ||
| 32 | (define-public goal | ||
| 33 | (package | ||
| 34 | (name "goal") | ||
| 35 | (version "1.5.0") | ||
| 36 | (source | ||
| 37 | (origin | ||
| 38 | (method git-fetch) | ||
| 39 | (uri (git-reference | ||
| 40 | (url "https://codeberg.org/anaseto/goal") | ||
| 41 | (commit (string-append "v" version)))) | ||
| 42 | (file-name (git-file-name name version)) | ||
| 43 | (sha256 | ||
| 44 | (base32 "1ckkjd2hf2v6f8x0ck9brp1ii4q8lcssvvwn7d6l1l5n9kcfjw7n")))) | ||
| 45 | (build-system go-build-system) | ||
| 46 | (inputs (list bash-minimal)) | ||
| 47 | (outputs (list "out" "lib")) | ||
| 48 | (arguments | ||
| 49 | (list | ||
| 50 | #:unpack-path "codeberg.org/anaseto/goal" | ||
| 51 | #:import-path "codeberg.org/anaseto/goal/cmd/goal" | ||
| 52 | #:build-flags | ||
| 53 | #~(list "-tags" "full,nosse4") ;disable SSE4.2 optimizations | ||
| 54 | #:test-flags | ||
| 55 | #~(list "-skip" "TestSources/version.goal" ;git tests require a repo | ||
| 56 | "-tags" "full,nosse4") | ||
| 57 | #:phases | ||
| 58 | #~(modify-phases %standard-phases | ||
| 59 | ;; Goal requires a shell interpreter. | ||
| 60 | (add-after 'unpack 'fix-sh-path | ||
| 61 | (lambda* (#:key unpack-path #:allow-other-keys) | ||
| 62 | (substitute* (string-append "src/" unpack-path "/os/os.go") | ||
| 63 | (("/bin/sh") | ||
| 64 | #$(file-append bash-minimal "/bin/sh"))))) | ||
| 65 | ;; Tests require the goal binary. | ||
| 66 | (add-before 'check 'add-goal-path | ||
| 67 | (lambda _ | ||
| 68 | (setenv "PATH" | ||
| 69 | (string-append (getenv "PATH") ":" #$output "/bin")))) | ||
| 70 | ;; Goal is embeddable, but end users typically don't need the source | ||
| 71 | ;; code. | ||
| 72 | (replace 'install | ||
| 73 | (lambda* (#:key unpack-path #:allow-other-keys #:rest arguments) | ||
| 74 | (apply (assoc-ref %standard-phases 'install) | ||
| 75 | `(,@arguments #:import-path ,unpack-path)) | ||
| 76 | (mkdir-p #$output:lib) | ||
| 77 | (rename-file (string-append #$output "/src") | ||
| 78 | (string-append #$output:lib "/src")))) | ||
| 79 | (add-after 'install 'install-goal-libs-and-documentation | ||
| 80 | (lambda* (#:key unpack-path inputs #:allow-other-keys #:rest | ||
| 81 | arguments) | ||
| 82 | (let ((outdir (string-append #$output "/share/goal/" | ||
| 83 | #$(version-major version) "/lib"))) | ||
| 84 | (mkdir-p outdir) | ||
| 85 | (copy-recursively (string-append "src/" unpack-path "/lib") | ||
| 86 | outdir)) | ||
| 87 | (install-file (string-append "src/" unpack-path "/docs/goal.1") | ||
| 88 | (string-append #$output "/share/man/man1"))))))) | ||
| 89 | (native-search-paths | ||
| 90 | (list (search-path-specification | ||
| 91 | (variable "GOALLIB") | ||
| 92 | (separator #f) | ||
| 93 | (files `(,(string-append "share/goal/" | ||
| 94 | (version-major version) "/lib")))))) | ||
| 95 | (home-page "https://anaseto.codeberg.page/goal-docs/") | ||
| 96 | (synopsis "Embeddable scripting array language") | ||
| 97 | (description | ||
| 98 | "Goal is an embeddable array programming language with a bytecode | ||
| 99 | interpreter, written in Go. The command line intepreter can execute scripts | ||
| 100 | or run in interactive mode. Goal shines the most in common scripting tasks, | ||
| 101 | like handling columnar data or text processing. It is also suitable for | ||
| 102 | exploratory programming.") | ||
| 103 | (license license:isc))) | ||
| 104 | |||
| 32 | ;;; | 105 | ;;; |
| 33 | ;;; Avoid adding new packages to the end of this file. To reduce the chances | 106 | ;;; Avoid adding new packages to the end of this file. To reduce the chances |
| 34 | ;;; of a merge conflict, place them above in alphabetic order. | 107 | ;;; of a merge conflict, place them above in alphabetic order. |
