summaryrefslogtreecommitdiff
path: root/gnu/packages/admin.scm
diff options
context:
space:
mode:
authorSharlatan Hellseher <sharlatanus@gmail.com>2024-03-31 20:37:05 +0100
committerSharlatan Hellseher <sharlatanus@gmail.com>2024-04-04 17:16:57 +0100
commit9b6ff81352b1f3c3c0f4f7ca0c64c1ece3562472 (patch)
tree7a5374b195d3be8e571dc932c35f57737e5ff348 /gnu/packages/admin.scm
parentdea7816825939f1e6e5c13d23d6d7409ebbab48b (diff)
gnu: fiano: Update to 1.2.0.
The version style has been changed from v7.0.2 starting v1.0.3. This change may cause guix refresh to detect incorrect latest version, see <https://github.com/linuxboot/fiano/tags>. This changes consolidate building all commands directly from the fiano package. * gnu/packages/admin.scm (fiano): Make variable public, update to 1.2.0. [source]: Remove snippet, there is no longer 'vendor' directory in a new release. [arguments] <#:phases>: Add custom 'build, 'check and 'install phases to cover complex package structure and produce all provided commands. [inputs]: Add 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, and go-github-com-spf13-pflag. [description]: Highlight which commands are included in the package. * gnu/packages/admin.scm (fiano-utk, fiano-fmap): Delete variables. Change-Id: I4b7573e20953ba52c9736e7f64c6b6347221fc72
Diffstat (limited to 'gnu/packages/admin.scm')
-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")