From 83bdaf3150ba061739c53e82f68a595bf7b9744b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 5 Mar 2021 09:30:55 +0100 Subject: [PATCH] packages: '%standard-patch-inputs' is not influenced by '%current-target-system'. * guix/packages.scm (%standard-patch-inputs): Parameterize %CURRENT-TARGET-SYSTEM around call to CANONICAL. --- guix/packages.scm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/guix/packages.scm b/guix/packages.scm index 8b40c06000..3d5c7fd64a 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -563,8 +563,12 @@ identifiers. The result is inferred from the file names of patches." (let* ((canonical (module-ref (resolve-interface '(gnu packages base)) 'canonical-package)) (ref (lambda (module var) - (canonical - (module-ref (resolve-interface module) var))))) + ;; Make sure 'canonical-package' is not influenced by + ;; '%current-target-system' since we're going to use the + ;; native package anyway. + (parameterize ((%current-target-system #f)) + (canonical + (module-ref (resolve-interface module) var)))))) `(("tar" ,(ref '(gnu packages base) 'tar)) ("xz" ,(ref '(gnu packages compression) 'xz)) ("bzip2" ,(ref '(gnu packages compression) 'bzip2))