diff options
| author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-04-07 10:13:52 +0100 |
|---|---|---|
| committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-04-07 10:50:13 +0100 |
| commit | 12f02c9bb87b8ea756e5c09806522e6df8b7e1ca (patch) | |
| tree | 05ac1b1d3d046606fb211a379fd05ff9cb0fe182 /gnu/packages/code.scm | |
| parent | 08de1612748c58ace7b77deb5859ac9bb89dd2b2 (diff) | |
gnu: automatic-component-toolkit: Swap to go-build-system.
* gnu/packages/code.scm (automatic-component-toolkit):
[build-system]: Swap to go-build-system to make the package more
maintainable and build predictable.
[arguments] <#:phases>: Swap to default 'build and 'install phases,
revert 'configure phase. Add 'pretend-cmd-act phase to satisfy
go-build-system.
[native-inputs]: Remove go.
Change-Id: Iba7bd4c87bdbbb91381f81a77c7811cb9f1f4943
Diffstat (limited to 'gnu/packages/code.scm')
| -rw-r--r-- | gnu/packages/code.scm | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm index 1f0d72a5441..62b6bea7d8e 100644 --- a/gnu/packages/code.scm +++ b/gnu/packages/code.scm | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | ;;; Copyright © 2022 Michael Rohleder <mike@rohleder.de> | 19 | ;;; Copyright © 2022 Michael Rohleder <mike@rohleder.de> |
| 20 | ;;; Copyright © 2023 Fries <fries1234@protonmail.com> | 20 | ;;; Copyright © 2023 Fries <fries1234@protonmail.com> |
| 21 | ;;; Copyright © 2023 Zheng Junjie <873216071@qq.com> | 21 | ;;; Copyright © 2023 Zheng Junjie <873216071@qq.com> |
| 22 | ;;; Copyright © 2024 Sharlatan Hellseher <sharlatanus@gmail.com> | ||
| 22 | ;;; | 23 | ;;; |
| 23 | ;;; This file is part of GNU Guix. | 24 | ;;; This file is part of GNU Guix. |
| 24 | ;;; | 25 | ;;; |
| @@ -61,7 +62,6 @@ | |||
| 61 | #:use-module (gnu packages emacs) | 62 | #:use-module (gnu packages emacs) |
| 62 | #:use-module (gnu packages flex) | 63 | #:use-module (gnu packages flex) |
| 63 | #:use-module (gnu packages gcc) | 64 | #:use-module (gnu packages gcc) |
| 64 | #:use-module (gnu packages golang) ; for automatic-component-toolkit | ||
| 65 | #:use-module (gnu packages golang-build) | 65 | #:use-module (gnu packages golang-build) |
| 66 | #:use-module (gnu packages golang-crypto) | 66 | #:use-module (gnu packages golang-crypto) |
| 67 | #:use-module (gnu packages golang-web) | 67 | #:use-module (gnu packages golang-web) |
| @@ -101,23 +101,24 @@ | |||
| 101 | (sha256 | 101 | (sha256 |
| 102 | (base32 | 102 | (base32 |
| 103 | "1r0sbw82cf9dbcj3vgnbd4sc1lklzvijic2z5wgkvs21azcm0yzh")))) | 103 | "1r0sbw82cf9dbcj3vgnbd4sc1lklzvijic2z5wgkvs21azcm0yzh")))) |
| 104 | (build-system gnu-build-system) | 104 | (build-system go-build-system) |
| 105 | (arguments | 105 | (arguments |
| 106 | (list #:tests? #false ;no tests | 106 | (list |
| 107 | #:phases | 107 | #:tests? #f ;no tests |
| 108 | #~(modify-phases %standard-phases | 108 | #:install-source? #f |
| 109 | (delete 'configure) | 109 | #:import-path "github.com/Autodesk/AutomaticComponentToolkit/cmd/act" |
| 110 | (replace 'build | 110 | #:unpack-path "github.com/Autodesk/AutomaticComponentToolkit/" |
| 111 | (lambda _ | 111 | #:phases |
| 112 | (setenv "HOME" "/tmp") | 112 | #~(modify-phases %standard-phases |
| 113 | (invoke "bash" "Build/build.sh"))) | 113 | ;; Golang produces the final binary based on the current directory |
| 114 | (replace 'install | 114 | ;; name if -o options is not provided, utilize this assumption to |
| 115 | (lambda _ | 115 | ;; completely relay on go-build-system. |
| 116 | (let ((bin (string-append #$output "/bin"))) | 116 | (add-before 'build 'pretend-cmd-act |
| 117 | (mkdir-p bin) | 117 | (lambda* (#:key unpack-path #:allow-other-keys) |
| 118 | (copy-file "act.linux" | 118 | (let ((act (string-append "src/" unpack-path "/cmd/act")) |
| 119 | (string-append #$output "/bin/act")))))))) | 119 | (source (string-append "src/" unpack-path "/Source"))) |
| 120 | (native-inputs (list go)) | 120 | (mkdir-p act) |
| 121 | (copy-recursively source act))))))) | ||
| 121 | (synopsis "Automatically generate software components") | 122 | (synopsis "Automatically generate software components") |
| 122 | (description | 123 | (description |
| 123 | "The Automatic Component Toolkit (@dfn{ACT}) is a code generator that | 124 | "The Automatic Component Toolkit (@dfn{ACT}) is a code generator that |
