94 lines
2.5 KiB
Scheme
94 lines
2.5 KiB
Scheme
|
;; Copyright (C) 2021 muradm <mail@muradm.net>
|
||
|
;; Copyright (C) 2022 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
||
|
;;
|
||
|
;; This program is free software: you can redistribute it and/or modify
|
||
|
;; it under the terms of the GNU General Public License as published by
|
||
|
;; the Free Software Foundation, either version 3 of the License, or
|
||
|
;; (at your option) any later version.
|
||
|
;;
|
||
|
;; This program is distributed in the hope that it will be useful,
|
||
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
;; GNU General Public License for more details.
|
||
|
;;
|
||
|
;; You should have received a copy of the GNU General Public License
|
||
|
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||
|
|
||
|
(define-module (gnuboot-utils)
|
||
|
#:use-module (gnu packages gnupg)
|
||
|
#:use-module (guix build-system gnu)
|
||
|
#:use-module (guix build-system trivial)
|
||
|
#:use-module (guix download)
|
||
|
#:use-module (guix gexp)
|
||
|
#:use-module ((guix licenses) #:prefix license:)
|
||
|
#:use-module (guix packages)
|
||
|
#:use-module (guix utils))
|
||
|
|
||
|
(define-public gnuboot-version "0.1-rc1")
|
||
|
(define-public gnuboot-source
|
||
|
(origin
|
||
|
(method url-fetch)
|
||
|
(uri (string-append "mirror://gnu/gnuboot/gnuboot-" gnuboot-version
|
||
|
"_src.tar.xz"))
|
||
|
(sha256
|
||
|
(base32
|
||
|
"0h3cdc7manb46zs7marqg63h8fjmg503n5x4wxyi9q638fp10csj"))))
|
||
|
|
||
|
(define-public
|
||
|
(make-gnuboot-utils-package
|
||
|
name
|
||
|
source
|
||
|
version
|
||
|
synopsis
|
||
|
description)
|
||
|
(package
|
||
|
(name name)
|
||
|
(version version)
|
||
|
(source source)
|
||
|
(build-system gnu-build-system)
|
||
|
(arguments
|
||
|
(list
|
||
|
#:tests? #f
|
||
|
#:make-flags
|
||
|
#~(list
|
||
|
(string-append "CC=" #$(cc-for-target))
|
||
|
(string-append "DESTDIR=" #$output)
|
||
|
"INSTALL=install"
|
||
|
"PREFIX=/")
|
||
|
#:phases
|
||
|
#~(modify-phases
|
||
|
%standard-phases
|
||
|
(delete 'configure)
|
||
|
(add-after
|
||
|
'unpack 'enter-source
|
||
|
(lambda _
|
||
|
(chdir (string-append "coreboot/default/util/" #$name)))))))
|
||
|
(synopsis synopsis)
|
||
|
(description description)
|
||
|
(home-page "https://www.gnu.org/software/gnuboot")
|
||
|
(license license:gpl2)))
|
||
|
|
||
|
(define-public cbfstool
|
||
|
(make-gnuboot-utils-package
|
||
|
"cbfstool"
|
||
|
gnuboot-source
|
||
|
gnuboot-version
|
||
|
"Tool to manipulate Coreboot image files."
|
||
|
""))
|
||
|
|
||
|
(define-public ifdtool
|
||
|
(make-gnuboot-utils-package
|
||
|
"ifdtool"
|
||
|
gnuboot-source
|
||
|
gnuboot-version
|
||
|
""
|
||
|
""))
|
||
|
|
||
|
(define-public nvramtool
|
||
|
(make-gnuboot-utils-package
|
||
|
"nvramtool"
|
||
|
gnuboot-source
|
||
|
gnuboot-version
|
||
|
""
|
||
|
""))
|