aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/packages/admin.scm126
1 files changed, 97 insertions, 29 deletions
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 4b3b946878..f464b7694d 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -137,6 +137,7 @@
#:use-module (gnu packages golang)
#:use-module (gnu packages golang-build)
#:use-module (gnu packages golang-compression)
+ #:use-module (gnu packages golang-xyz)
#:use-module (gnu packages groff)
#:use-module (gnu packages gtk)
#:use-module (gnu packages guile)
@@ -5163,10 +5164,12 @@ disk utilization, priority, username, state, and exit code.")
(license license:gpl2+)))
;; TODO: Pack u-root for: forth, and some tests.
-(define fiano
- (package
- (name "fiano")
- (version "5.0.0")
+(define-public fiano
+ (package
+ (name "fiano")
+ ;; The versioning count has been changed since commit <2021-12-01>
+ ;; 1eb599564549691603589219c2be34f966a32ff1.
+ (version "1.2.0")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -5175,41 +5178,106 @@ disk utilization, priority, username, state, and exit code.")
(file-name (git-file-name name version))
(sha256
(base32
- "03ihdwwhb7g6bihx141cn0924sjs5ps6q3ps58pk1cg0g0srrr9h"))
- (modules '((guix build utils)))
- (snippet
- #~(begin
- ;; Remove all vendored sources.
- (delete-file-recursively "vendor")))))
+ "0s5fx4lhgb68qbx4ql34rcm678qdf0c4xl97bgc8dx9xwwqifza1"))))
(build-system go-build-system)
(arguments
(list
+ #:install-source? #f
#:import-path "github.com/linuxboot/fiano"
- #:unpack-path "github.com/linuxboot/fiano"))
+ #:unpack-path "github.com/linuxboot/fiano"
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; XXX: Replace this part when it's implemented in go-build-system.
+ (replace 'build
+ (lambda* (#:key import-path #:allow-other-keys)
+ (for-each
+ (lambda (cmd)
+ (invoke "go" "build" "-v" "-x" "-ldflags=-s -w" "-trimpath"
+ (string-append import-path "/cmds/" cmd)))
+ (list "cbfs"
+ "create-ffs"
+ ;; TODO: Not packed yet in guix, long jorney:
+ ;; - github.com/tjfoc/gmsm
+ ;;
+ ;; "fittool"
+ "fmap"
+ "fspinfo"
+ "glzma"
+ "guid2english"
+ "microcode"
+ "utk"))))
+ (replace 'check
+ (lambda* (#:key import-path tests? #:allow-other-keys)
+ (when tests?
+ (for-each
+ (lambda (dir)
+ (invoke "go" "test" "-v"
+ (string-append import-path dir "/...")))
+ (list "/pkg/bytes"
+ ;; TODO: Not packed yet in Guix, long jorney:
+ ;; - github.com/jedib0t
+ ;;
+ ;; "/pkg/amd"
+ "/pkg/cbfs"
+ "/pkg/compression"
+ "/pkg/fmap"
+ "/pkg/fsp"
+ "/pkg/guid"
+ "/pkg/guid2english"
+ ;; TODO: Not packed yet in Guix, long jorney:
+ ;; - github.com/tjfoc/gmsm
+ ;;
+ ;; "/pkg/intel"
+ "/pkg/knownguids"
+ "/pkg/log"
+ "/pkg/uefi"
+ "/pkg/unicode"
+ "/pkg/utk"
+ "/pkg/visitors"
+ "/cmds/cbfs"
+ "/cmds/create-ffs"
+ ;; TODO: Not packed yet in Guix, long jorney:
+ ;; - github.com/u-root/u-root
+ ;;
+ ;; "/cmds/fmap"
+ ;; "/cmds/fittool"
+ "/cmds/fspinfo"
+ "/cmds/glzma"
+ "/cmds/guid2english"
+ "/cmds/microcode"
+ "/cmds/utk")))))
+ (replace 'install
+ (lambda _
+ (let ((bindir (string-append #$output "/bin")))
+ (for-each
+ (lambda (cmd)
+ (install-file cmd bindir))
+ (list "cbfs"
+ "create-ffs"
+ ;; "fittool"
+ "fmap"
+ "fspinfo"
+ "glzma"
+ "guid2english"
+ "microcode"
+ "utk"))))))))
(inputs
- (list go-golang-org-x-text go-github-com-ulikunitz-xz))
+ (list go-github-com-dustin-go-humanize
+ go-github-com-hashicorp-errwrap
+ go-github-com-hashicorp-go-multierror
+ go-github-com-jessevdk-go-flags
+ go-github-com-pierrec-lz4
+ go-github-com-spf13-pflag
+ go-github-com-ulikunitz-xz
+ go-golang-org-x-text))
(home-page "https://github.com/linuxboot/fiano")
(synopsis "UEFI image editor")
(description
- "This package provides a command-line UEFI image editor.")
+ "This package provides a command-line UEFI image editor, including cbfs,
+create-ffs, fmap, fspinfo, glzma, guid2english, microcode and utk CLI
+utilities.")
(license license:bsd-3)))
-(define-public fiano-utk
- (package
- (inherit fiano)
- (name "fiano-utk")
- (arguments
- `(#:import-path "github.com/linuxboot/fiano/cmds/utk"
- #:unpack-path "github.com/linuxboot/fiano"))))
-
-(define-public fiano-fmap
- (package
- (inherit fiano)
- (name "fiano-fmap")
- (arguments
- `(#:import-path "github.com/linuxboot/fiano/cmds/fmap"
- #:unpack-path "github.com/linuxboot/fiano"))))
-
(define-public novena-eeprom
(package
(name "novena-eeprom")