[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#45773] [PATCH core-updates 0/1] Allow patch-and-repack to work with
From: |
Maxim Cournoyer |
Subject: |
[bug#45773] [PATCH core-updates 0/1] Allow patch-and-repack to work with plain files. |
Date: |
Sun, 10 Jan 2021 17:07:43 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Hello,
Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
> While attempting to reproduce the now closed issue
> <http://issues.guix.gnu.org/30116>, I stumbled upon another annoyance, which
> is that the patch-and-repack procedure used as part of an origin derivation
> didn't support single files, so the following failed, for example:
>
> <#part type="text/plain"
> filename="/home/maxim/src/guix-core-updates/repro.scm" disposition=inline
> description="Script exhibiting problem">
> <#/part>
That didn't work out well :-).
Here's the attachment that I meant to send along the cover letter.
;;; Run script with: ./pre-inst-env guile -e main -s repro.scm
(use-modules (gnu packages base)
(gnu packages bootstrap)
(guix build utils)
(guix derivations)
(guix download)
(guix packages)
(guix store))
(define %test-file-uri
"https://raw.githubusercontent.com/realgud/realgud/master/realgud/common/bp-image-data.el")
(define (main _)
(let ((source (origin
(method url-fetch)
(uri %test-file-uri)
(modules '((guix build utils)))
(patch-inputs `(("tar" ,%bootstrap-coreutils&co)
("xz" ,%bootstrap-coreutils&co)
("locales" ,glibc-utf8-locales)))
(snippet
'(begin
(with-fluids ((%default-port-encoding "ISO-8859-1")
(%default-port-conversion-strategy 'error))
(substitute* "bp-image-data.el"
(("something")
"something else")))))
(sha256
(base32
"1qpn2zhh2qw579bhgjyxvf670r4kibaxls589hkm2yhwfvsjvs68")))))
(with-store store
(build-derivations store
(list (run-with-store store
(origin->derivation source)))))))
Thanks,
Maxim