From 1eb4642a738d906c687e3bb9a2e7fd3ee0f59a9d Mon Sep 17 00:00:00 2001 From: Hilton Chain Date: Mon, 14 Aug 2023 01:21:31 +0800 Subject: [PATCH] rosenthal: Add grub-efi-luks2. * rosenthal/packages/bootloaders.scm: New file. (grub-runtime-memregion-alloc-patch,grub-luks2-argon2-support-patch) (grub-install-luks2-fix-patch,grub-efi-luks2): New variables. --- rosenthal/packages/bootloaders.scm | 72 ++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 rosenthal/packages/bootloaders.scm diff --git a/rosenthal/packages/bootloaders.scm b/rosenthal/packages/bootloaders.scm new file mode 100644 index 0000000..35572e0 --- /dev/null +++ b/rosenthal/packages/bootloaders.scm @@ -0,0 +1,72 @@ +;; SPDX-FileCopyrightText: 2023 Hilton Chain +;; +;; SPDX-License-Identifier: GPL-3.0-or-later + +(define-module (rosenthal packages bootloaders) + #:use-module (guix download) + #:use-module (guix gexp) + #:use-module (guix packages) + #:use-module (guix utils) + #:use-module (gnu packages autotools) + #:use-module (gnu packages bootloaders) + #:use-module (gnu packages python)) + +;; Patches obtained from: +;; + +(define grub-runtime-memregion-alloc-patch + (origin + (method url-fetch) + (uri (string-append "https://leo3418.github.io/" + "res/collections/gentoo-config-luks2-grub-systemd/" + "4500-grub-2.06-runtime-memregion-alloc.patch")) + (sha256 + (base32 + "1ynlyaabdlw7g4pqr4sc7jdqn9riwms637cqhlqnyi8jp6cs4a6x")))) + +(define grub-luks2-argon2-support-patch + (origin + (method url-fetch) + (uri (string-append "https://leo3418.github.io/" + "res/collections/gentoo-config-luks2-grub-systemd/" + "5000-grub-2.06-luks2-argon2-v4.patch")) + (sha256 + (base32 + "0jfyl2j9bh0225iqq36gy55p2l96zhhhsk5r53aqmlivvxpjlf7g")))) + +(define grub-install-luks2-fix-patch + (origin + (method url-fetch) + (uri (string-append "https://leo3418.github.io/" + "res/collections/gentoo-config-luks2-grub-systemd/" + "9500-grub-AUR-improved-luks2.patch")) + (sha256 + (base32 + "0hn0nkp5cfsyvvyfj3vbw0z4c2swdi6gvxradl401lqvwsvq60p4")))) + +(define-public grub-efi-luks2 + (let ((base grub-efi)) + (package + (inherit base) + (name "grub-efi-luks2") + (source + (let ((base (package-source base))) + (origin + (inherit base) + (patches + (append (origin-patches base) + (list grub-runtime-memregion-alloc-patch + grub-luks2-argon2-support-patch + grub-install-luks2-fix-patch)))))) + (arguments + (substitute-keyword-arguments (package-arguments base) + ((#:configure-flags flags ''()) + #~(append #$flags '("--disable-werror"))) + ((#:phases phases '%standard-phases) + #~(modify-phases #$phases + (add-after 'unpack 'delete-configure-script + (lambda _ + (delete-file "configure"))))))) + (native-inputs + (modify-inputs (package-native-inputs base) + (append autoconf automake python-minimal-wrapper))))))