[bug#34175,4/4] gnu: Add efilinux.

Message ID 20190123000304.11385-4-dannym@scratchpost.org
State Accepted
Commit bb4a8f4851c19a9d0a0ea55bab8aa802f09f6b6d
Headers show
Series Add EFI tools. | expand

Checks

Context Check Description
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied

Commit Message

Danny Milosavljevic Jan. 23, 2019, 12:03 a.m. UTC
* gnu/packages/efi.scm (efilinux): New variable.
---
 gnu/packages/efi.scm | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

Comments

Ricardo Wurmus Jan. 23, 2019, 8:12 a.m. UTC | #1
Danny Milosavljevic <dannym@scratchpost.org> writes:

> * gnu/packages/efi.scm (efilinux): New variable.
[…]
> +    (arguments
> +     `(#:make-flags
> +       (list "CC=gcc"
> +             (string-append "INCDIR=" (assoc-ref %build-inputs "gnu-efi")
> +                            "/include")
> +             (string-append "LIBDIR=" (assoc-ref %build-inputs "gnu-efi")
> +                            "/lib"))

Nitpick: I’d use a let binding for (assoc-ref %build-inputs "gnu-efi").

> +       #:tests? #f ; No tests exist.
> +       #:phases
> +       (modify-phases %standard-phases
> +         (delete 'configure)
> +         (replace 'install
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (install-file "efilinux.efi"
> +                           (string-append (assoc-ref outputs "out")
> +                           "/libexec"))

The indentation of "/libexec" is off.

Otherwise LGTM.

Patch

diff --git a/gnu/packages/efi.scm b/gnu/packages/efi.scm
index cef37b62a..3ef06dd22 100644
--- a/gnu/packages/efi.scm
+++ b/gnu/packages/efi.scm
@@ -177,3 +177,42 @@  and EFI variable management.")
     ;; Compiling/linking/using OpenSSL is permitted.
     (license (list license:gpl2
                    license:lgpl2.1))))
+
+(define-public efilinux
+  (package
+    (name "efilinux")
+    (version "1.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/mfleming/efilinux.git")
+                    (commit (string-append "efilinux-" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0b4nxzr3wl5v4b52r79iw1arfgasz26xb38r2blw9v2qz2s1q9w2"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:make-flags
+       (list "CC=gcc"
+             (string-append "INCDIR=" (assoc-ref %build-inputs "gnu-efi")
+                            "/include")
+             (string-append "LIBDIR=" (assoc-ref %build-inputs "gnu-efi")
+                            "/lib"))
+       #:tests? #f ; No tests exist.
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (install-file "efilinux.efi"
+                           (string-append (assoc-ref outputs "out")
+                           "/libexec"))
+             #t)))))
+    (inputs
+     `(("gnu-efi" ,gnu-efi)))
+    (synopsis "Minimal Linux loader for UEFI")
+    (description "This package provides a minimal Linux loader as an UEFI
+program.")
+    (home-page "https://github.com/mfleming/efilinux")
+    (license license:bsd-2)))