all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Josselin Poiret <dev@jpoiret.xyz>
To: David Arroyo <david@aqwari.net>,
	Pjotr Prins <pjotr.public12@thebird.nl>,
	Ryan Prior <rprior@protonmail.com>
Cc: Guix Devel <guix-devel@gnu.org>
Subject: Re: Building a software toolchain that works
Date: Wed, 16 Mar 2022 15:02:07 +0100	[thread overview]
Message-ID: <87tubyc7xc.fsf@jpoiret.xyz> (raw)
In-Reply-To: <26d5e14e-97cf-4346-a434-9e73658495b7@www.fastmail.com>

Hello everyone,

Let me chime in on a specific point.

"David Arroyo" <david@aqwari.net> writes:
> I recently used guix to make a one-line change to the dovecot-pigeonhole
> package. Initially I tried to do this without guix, and had difficulties
> using autoconf/automake. So instead, I made my changes, captured them with
> `git diff`, and then used the `--with-patch` option of `guix install` to
> build and install the modified version. It wasn't too hard, but it could
> have been easier. It may have not been worth the effort in this case for
> someone new to guix, but the nice thing is I could take the same steps
> to modify any piece of free software for which a guix package exists,
> regardless of the build system in use.

I recently did the same to produce my LUKS2 patches for GRUB [1]!
What I did was hack on the code to add what I needed, produce some
patches with `git format-patch` then define

--8<---------------cut here---------------start------------->8---
(define grub-efi-luks2
  (package/inherit grub-efi
    (source
     (origin
       (inherit (package-source grub-efi))
       (patches (cons* "0001-devmapper-getroot-Have-devmapper-recognize-LUKS2.patch"
                       "0002-devmapper-getroot-Set-up-cheated-LUKS2-cryptodisk-mo.patch"
                       (origin-patches (package-source grub-efi))))))))
--8<---------------cut here---------------end--------------->8---

With this, I could test build failures, but then I also ended up testing
the resulting GRUB in a VM by installing guix with a config.scm that had
the following:

--8<---------------cut here---------------start------------->8---
(operating-system
  (bootloader (bootloader-configuration
                (bootloader
		 (bootloader
                  (inherit grub-efi-bootloader)
                  (package grub-efi-luks2)))
                (target "/boot/efi")
                (keyboard-layout keyboard-layout)))
  ...)
--8<---------------cut here---------------end--------------->8---

This made it extremely easy to test my changes!  I don't think I
would've written these patches without Guix's help.

[1] https://lists.gnu.org/archive/html/grub-devel/2021-12/msg00076.html

Best,
-- 
Josselin Poiret


  parent reply	other threads:[~2022-03-16 14:19 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-14 19:05 Building a software toolchain that works Ryan Prior
2022-03-14 20:26 ` Pjotr Prins
2022-03-14 21:40   ` David Arroyo
2022-03-15  8:19     ` Ludovic Courtès
2022-03-17  9:20       ` zimoun
2022-03-16 14:02     ` Josselin Poiret [this message]
2022-03-16 15:28       ` Ryan Prior
2022-03-16 20:13         ` Yasuaki Kudo
2022-03-17 15:35     ` Maxime Devos
2022-03-17 16:56       ` David Arroyo
2022-03-14 23:57   ` Olivier Dion via Development of GNU Guix and the GNU System distribution.
2022-03-15  8:23     ` Ludovic Courtès
2022-03-15  8:42       ` Pjotr Prins
2022-03-15 12:32       ` Yasuaki Kudo
2022-03-17 12:56     ` zimoun
2022-03-18 21:13       ` david larsson
2022-03-18 23:59         ` Yasuaki Kudo
2022-03-19 13:02         ` Windows Subsystem for Linux zimoun
2022-03-24 21:14           ` Ludovic Courtès
2022-03-25  3:43             ` Maxim Cournoyer
2022-03-25  9:04               ` Phil
2022-03-25 10:14                 ` Oliver Propst
2022-03-17 20:04   ` Building a software toolchain that works Katherine Cox-Buday
2022-03-18  6:27     ` Pjotr Prins
2022-03-18  9:10       ` Oliver Propst
  -- strict thread matches above, loose matches on Subject: below --
2022-03-17 12:06 zimoun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tubyc7xc.fsf@jpoiret.xyz \
    --to=dev@jpoiret.xyz \
    --cc=david@aqwari.net \
    --cc=guix-devel@gnu.org \
    --cc=pjotr.public12@thebird.nl \
    --cc=rprior@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.