gnu: Add cl-ana.statistical-learning.
[jackhill/guix/guix.git] / gnu / packages / efi.scm
index 8c24fa3..b6e93dd 100644 (file)
@@ -1,5 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2019 Danny Milosavljevic <dannym@scratchpost.org>
+;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix packages)
-  #:use-module (guix utils))
+  #:use-module (guix utils)
+  #:use-module (ice-9 match))
 
 (define-public gnu-efi
   (package
     (name "gnu-efi")
-    (version "3.0.9")
+    (version "3.0.11")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://sourceforge/gnu-efi/"
-                           name "-" version ".tar.bz2"))
+                           "gnu-efi-" version ".tar.bz2"))
        (sha256
-        (base32
-         "1w3p4aqlc5j93q44la7dc8cr3hky20zvsd0h0k2lyzhwmrzfl5b7"))))
+        (base32 "1ffnc4xbzfggs37ymrgfx76j56kk2644c081ivhr2bjkla9ag3gj"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:tests? #f ; None exist.
+     `(#:tests? #f                      ; none exist
        #:make-flags
        (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
        #:phases
@@ -177,3 +179,48 @@ 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"
+             ,@(match (%current-system)
+                 ("aarch64-linux"
+                  '("ARCH=aarch64"))
+                 ("armhf-linux"
+                  '("ARCH=arm"))
+                 (_ '()))
+             (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)))