download: Use correct system and guile in 'url-fetch/tarbomb' and 'url-fetch/zipbomb'.
authorDiego Nicola Barbato <dnbarbato@posteo.de>
Mon, 16 Mar 2020 17:43:20 +0000 (18:43 +0100)
committerLudovic Courtès <ludo@gnu.org>
Wed, 8 Apr 2020 17:35:34 +0000 (19:35 +0200)
commitc1d81df93d4b67671fc4a8e0a80c0f02c5821663
treebd5e48696e3b97fa0aefd5f556b242a7a02993aa
parent198571b264547f800803e554c8f21a9c95be959c
download: Use correct system and guile in 'url-fetch/tarbomb' and 'url-fetch/zipbomb'.

Fixes <https://bugs.gnu.org/40115>.

Previously the result of `guix build -s $system $package' would depend on the
system Guix was built for if $package or one of its dependencies used
'url-fetch/tarbomb' or 'url-fetch/zipbomb' as the origin method of its
source (e.g. `guix build -s i686-linux ffmpeg' on i686-linux would build a
different derivation than on x86_64-linux).

This patch fixes this by explicitly passing the correct system and guile to
'gexp->derivation'.

* guix/download.scm (url-fetch/tarbomb): Pass #:system system and
  #:guile-for-build guile to 'gexp->derivation', where guile is the derivation
  of guile for system.
  (url-fetch/zipbomb): Likewise.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
guix/download.scm