Patchwork [4/6] gnu: Add efivar.

login
register
mail settings
Submitter Marius Bakke
Date Nov. 5, 2016, 12:55 p.m.
Message ID <20161105125511.29383-5-mbakke@fastmail.com>
Download mbox | patch
Permalink /patch/17225/
State New
Headers show

Comments

Marius Bakke - Nov. 5, 2016, 12:55 p.m.
* gnu/packages/linux.scm (efivar): New variable.
---
 gnu/packages/linux.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
Ludovic Courtès - Nov. 6, 2016, 9:51 p.m.
Marius Bakke <mbakke@fastmail.com> skribis:

> * gnu/packages/linux.scm (efivar): New variable.

> +    (synopsis "Tool and library to manipulate EFI variables")
> +    (description "This package provides a library and a command line
> +interface to the UEFI variable facility.")

Maybe “… to the variable facility of UEFI boot firmware.” to give a
little bit of extra context.

> +    (license
> +     (list license:lgpl2.1+
> +           (license:non-copyleft "file://src/crc32.c"
> +                                 "See src/crc32.c in the distribution.")))))

The second one can be omitted since the combination is LGPL anyway.

Thank you!

Ludo’.

Patch

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 3fdce5d..86e9ff5 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -15,6 +15,7 @@ 
 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016 David Craven <david@craven.ch>
 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
+;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -62,6 +63,7 @@ 
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pciutils)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages popt)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python)
   #:use-module (gnu packages readline)
@@ -3118,3 +3120,38 @@  activity of the GPU as a whole, which is also accurate during OpenCL
 computations, as well as separate component statistics that are only meaningful
 under OpenGL graphics workloads.")
     (license license:gpl3)))
+
+(define-public efivar
+  (package
+    (name "efivar")
+    (version "30")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/rhinstaller/" name
+                                  "/releases/download/" version "/" name
+                                  "-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "12qjnm44yi55ffqxjpgrxy82s89yjziy84w2rfjjknsd8flj0mqz"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(;; Tests require a UEFI system and is not detected in the chroot.
+       #:tests? #f
+       #:make-flags (list (string-append "prefix=" %output)
+                          (string-append "libdir=" %output "/lib")
+                          (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("popt" ,popt)))
+    (home-page "https://github.com/rhinstaller/efivar")
+    (synopsis "Tool and library to manipulate EFI variables")
+    (description "This package provides a library and a command line
+interface to the UEFI variable facility.")
+    (license
+     (list license:lgpl2.1+
+           (license:non-copyleft "file://src/crc32.c"
+                                 "See src/crc32.c in the distribution.")))))