From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id WOnuHyUV6WL9VQEAbAwnHQ (envelope-from ) for ; Tue, 02 Aug 2022 14:14:29 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id OJbaHyUV6WKx+wAAauVa8A (envelope-from ) for ; Tue, 02 Aug 2022 14:14:29 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 0629316845 for ; Tue, 2 Aug 2022 14:14:29 +0200 (CEST) Received: from localhost ([::1]:50576 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIqn6-0002QR-6y for larch@yhetil.org; Tue, 02 Aug 2022 08:14:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39560) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIqmh-0001XN-Fz for guix-patches@gnu.org; Tue, 02 Aug 2022 08:14:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53004) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oIqmg-0000A6-6t for guix-patches@gnu.org; Tue, 02 Aug 2022 08:14:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oIqmg-0008J6-27 for guix-patches@gnu.org; Tue, 02 Aug 2022 08:14:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56882] [PATCH 3/4] perl-file-mimeinfo: Fix cross-compilation. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 02 Aug 2022 12:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56882 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56882@debbugs.gnu.org Cc: Maxime Devos Received: via spool by 56882-submit@debbugs.gnu.org id=B56882.165944241931866 (code B ref 56882); Tue, 02 Aug 2022 12:14:02 +0000 Received: (at 56882) by debbugs.gnu.org; 2 Aug 2022 12:13:39 +0000 Received: from localhost ([127.0.0.1]:42748 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIqmI-0008Ho-T4 for submit@debbugs.gnu.org; Tue, 02 Aug 2022 08:13:39 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:54772) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIqmC-0008HK-Ug for 56882@debbugs.gnu.org; Tue, 02 Aug 2022 08:13:38 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:5dba:d409:33f7:a16]) by andre.telenet-ops.be with bizsmtp id 2cDX2800520ykKC01cDXHe; Tue, 02 Aug 2022 14:13:31 +0200 From: Maxime Devos Date: Tue, 2 Aug 2022 14:13:28 +0200 Message-Id: <20220802121329.22276-3-maximedevos@telenet.be> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220802121329.22276-1-maximedevos@telenet.be> References: <20220802121329.22276-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1659442411; bh=92QJnfqbxMRww2MZ94XAC9Q9D6pk36roTud9rtSamnM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=BiJAxzOzE1LeDdIylEk50jo2ifHv/L1IW7EHjetXbsJd8331xXwEgpyVMOBHc2az6 n5lpCUTUKIQT3IXkVBiqjIpfyC8TvbUzF8WvCBu8nIxozNun8f250w8s6USROZxst2 /voKhwMp9m2+UY1+MMo+ssZT6ICoHqwf0xWcc3p6rBulSrqLpzvBPMUKs8ypQC7oE6 qBNAl/zyB4xWzjjvM0cAdNiPGO9GCp3UdJ2O0O3Wgc3e20xZNjabfzy2Zujb4L+dVP Q1Gtmq8yKeqV0VPSBYNbObdkpua++YVhREpI7V6CkP2zFhuQJcDtg1VeHAeYfsKvTs RPM6NZMuUcbvQ== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1659442469; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=92QJnfqbxMRww2MZ94XAC9Q9D6pk36roTud9rtSamnM=; b=TUzk8U41G2sZw/mDD6pfHgm/JLOUQJN+YEnF1tUktmaBl7k4Xi2HnXaPLg0A8yi3JUiF0X +ktBoh6TBP4JPKrr29qx0NuOO3Hx39o17XGofY3ppDjBEVfW7D6g2OsJq/GffPXuImI0YI Bq3c/H64DThYc2QYeUYDZXDDTvmbiAT8FmX/p38Nym3mgLMN5CBeUoTIboJ8EI7GSPFmJ2 6tLfgIMdPUA7HfqyNImgV5E8R2NAc+qgEyLVZIKjSxc5GNM7avv7CV4A16QNUpG44M0ktx 8llpVRFveQuwuB8mlgZZ+hc3U0Frn13BzIZ718Co4HbZsC2AxoGFyO8F1URtiQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1659442469; a=rsa-sha256; cv=none; b=e7Sw7LgaWe6nqVDGpraGlrk0Hl6ilST2mlC84xS7AKSebhcDCvpbqV6cl03/dItuooJPxr baxhzu+aRBJ8Y0YbLuoMZ0FzeDtSW3oIeITZiWG7bb+0+ey44Kcf5bz8FumTtGRAEmkdoE EYPtskOpKt3ALNGAPrDqkmSW6me8oci8SeXnvXmdOpTxnizlmDjzu7+yPpmSphP1GvYlVk qRXflWPxSKHemfzU0ztq5SWuKZZThp4ColOdN2MHFI/3CH8flAD/ENe6maM1nZNRw9uLDr DlZePkCH4Yd98lnLLUPgVxcGYOctP69yz2fkBd2S7PuypxoifYDMdwfKPWz/Bw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=BiJAxzOz; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 7.48 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=BiJAxzOz; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 0629316845 X-Spam-Score: 7.48 X-Migadu-Scanner: scn1.migadu.com X-TUID: tamTucPeN51c The result of "guix style" was ignored, as it put #~(modify-phases ...) on the same line as #:phases, causing it to go beyond to 80 columns limit. * gnu/packages/freedesktop.scm (perl-file-mimeinfo)[arguments]<#:phases>: Make it a G-exp to avoid messy nested quasiquotation. {wrap-programs}: When cross-compiling, don't use the PELRL5LIB environment variable, instead use 'search-path-as-list'. --- gnu/packages/freedesktop.scm | 37 +++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm index 577b354f66..2d12567a42 100644 --- a/gnu/packages/freedesktop.scm +++ b/gnu/packages/freedesktop.scm @@ -1946,19 +1946,30 @@ (define-public perl-file-mimeinfo (arguments ;; Some tests fail due to requiring the mimetype of perl files to be ;; text/plain when they are actually application/x-perl. - `(#:tests? #f - #:phases - (modify-phases %standard-phases - (add-after 'install 'wrap-programs - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (for-each (lambda (prog) - (wrap-program (string-append out "/bin/" prog) - `("PERL5LIB" ":" prefix - (,(string-append (getenv "PERL5LIB") ":" out - "/lib/perl5/site_perl"))))) - '("mimeopen" "mimetype"))) - #t))))) + (list #:tests? #f + #:phases + #~(modify-phases %standard-phases + (add-after 'install 'wrap-programs + ;; TODO(staging): Make unconditional. + (lambda* (#:key #$@(if (%current-target-system) + #~(inputs) + #~()) outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (for-each + (lambda (prog) + (wrap-program (string-append out "/bin/" prog) + `("PERL5LIB" ":" prefix + ;; PERL5LIB looks in 'native-inputs', not 'inputs', + ;; whereas the latter is required for + ;; cross-compilation. + #$(if (%current-target-system) + #~,(search-path-as-list + '("lib/perl5/site_perl") + (map cdr (append inputs outputs))) + #~(,(string-append (getenv "PERL5LIB") ":" out + "/lib/perl5/site_perl")))))) + '("mimeopen" "mimetype"))) + #t))))) (home-page "https://metacpan.org/release/File-MimeInfo") (synopsis "Determine file type from the file name") (description -- 2.37.0