From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id KNYwNWPgN2XurAAAauVa8A:P1 (envelope-from ) for ; Tue, 24 Oct 2023 17:18:59 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id KNYwNWPgN2XurAAAauVa8A (envelope-from ) for ; Tue, 24 Oct 2023 17:18:59 +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 BEC3A45818 for ; Tue, 24 Oct 2023 17:18:59 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=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"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1698160739; 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; bh=WxMbG4DObAT+r4xkMJtIqES0EOAWCVA+phu9gBaDgac=; b=aTOTpj/Nk9vTSVReQQZxWh1QqIlvgmNtLDJeDcyjS5bDbJ87PkaZC65iE1cNLBgo+Sl+Sp HlsX2kV4yAhdGyHXWF7ZPQ1uVy38taCp6M5x9X65R0E8PLsRGcZ7xDPMrE00haT8iQb0FI kK3RemASKo1VyEFFkFDqO8q99mr/ZnmKaj5Tz02uAXUBKyEoaZeMYSgknL0oJAzyFOvKeY YRUsIvQwro/Ds7BQ7Vhs6nK3aPqcWGy9zNNUFHSQmbf5s2gEbGokM+NG4HXjwth4G2tRKR rhkPEfHLLzIRJiP06OnB4zqg8csW80lJEqlaNyJ2ghbRNXmwzv96yul0lL1qIg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1698160739; a=rsa-sha256; cv=none; b=DZYnU24yRcLdpEGCP1WFAQ/H0dgzvsY3/29sv7mzylmJAiiPyUtmuuRyHjNRuPPReYiZxO 5eTnW3WAJGZOlhBtWrt6KeCbernunZ+Cdt1p78EDU6m3wQw+suji/ihluh5Kr16mSriqkV +ZzNvyJJh3TBywkbC+sB3UXES/Fps/mYGgtMnyZ5Pw2FQKQbVe7AIC4yBK3/zpXrVW6quN Z8EiL8ZqCFJfbt6EaMT3TAjtEF/ac+57B9Mk5LwFLslP5nB2iocEvbGy+MkBln4i0w8mGw D+9r4iTnQRRwZIiopJkqXq0c7wBEWW+vE6MIMYiRph+3TeHMAaXZTBJPlXc5rQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qvJAd-0007mc-R7; Tue, 24 Oct 2023 11:18:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qvJA2-0007Pr-Ef for guix-patches@gnu.org; Tue, 24 Oct 2023 11:17:39 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qvJA2-00027P-5S for guix-patches@gnu.org; Tue, 24 Oct 2023 11:17:38 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qvJAV-0003Lr-PT for guix-patches@gnu.org; Tue, 24 Oct 2023 11:18:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64486] [PATCH v2 22/22] gnu: licensecheck: Use G-Expressions. Refactor phases. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 24 Oct 2023 15:18:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64486 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64486@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 64486-submit@debbugs.gnu.org id=B64486.169816064012656 (code B ref 64486); Tue, 24 Oct 2023 15:18:07 +0000 Received: (at 64486) by debbugs.gnu.org; 24 Oct 2023 15:17:20 +0000 Received: from localhost ([127.0.0.1]:56219 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qvJ9k-0003Hy-5J for submit@debbugs.gnu.org; Tue, 24 Oct 2023 11:17:20 -0400 Received: from smtpmciv3.myservices.hosting ([185.26.107.239]:38720) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qvJ9f-0003Gg-4d for 64486@debbugs.gnu.org; Tue, 24 Oct 2023 11:17:15 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv3.myservices.hosting (Postfix) with ESMTP id 67CA52081A for <64486@debbugs.gnu.org>; Tue, 24 Oct 2023 17:16:40 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id DC36980098; Tue, 24 Oct 2023 17:16:39 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 9HishwXb3LkL; Tue, 24 Oct 2023 17:16:39 +0200 (CEST) Received: from guix-nuc.home.arpa (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 53D2A800B0; Tue, 24 Oct 2023 17:16:37 +0200 (CEST) From: Bruno Victal Date: Tue, 24 Oct 2023 16:15:42 +0100 Message-ID: <73824f6d84e96e2f3c92cb94e3583ad4ce5f5f92.1698160401.git.mirai@makinata.eu> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -4.60 X-Spam-Score: -4.60 X-Migadu-Queue-Id: BEC3A45818 X-Migadu-Scanner: mx2.migadu.com X-TUID: joTqK994I9xD * gnu/packages/license.scm (licensecheck)[arguments]: Use G-Expressions. Drop trailing #t. <#:phases>: Rename 'wrap-program to 'wrap-licensecheck. Add 'check-wrap. --- gnu/packages/license.scm | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/gnu/packages/license.scm b/gnu/packages/license.scm index 025e1aa3bb..0760b6d7d2 100644 --- a/gnu/packages/license.scm +++ b/gnu/packages/license.scm @@ -35,6 +35,7 @@ (define-module (gnu packages license) #:use-module (guix build-system python) #:use-module (guix build-system pyproject) #:use-module (guix download) + #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix licenses) #:use-module (guix packages)) @@ -181,17 +182,23 @@ (define-public licensecheck perl-string-escape perl-string-license)) (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'install 'wrap-program - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (perllib (string-append out "/lib/perl5/site_perl/" - ,(package-version perl)))) - (wrap-program (string-append out "/bin/licensecheck") - `("PERL5LIB" ":" - prefix (,(string-append perllib ":" (getenv "PERL5LIB"))))) - #t)))))) + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'wrap 'wrap-licensecheck + (lambda _ + (let ((licensecheck (string-append #$output "/bin/licensecheck")) + (perl5lib (string-append #$output "/lib/perl5/site_perl/" + #$(package-version perl)))) + (wrap-program licensecheck + `("PERL5LIB" ":" prefix + ,(list perl5lib (getenv "PERL5LIB"))))))) + (add-after 'wrap-program 'check-wrap + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (unsetenv "PERL5LIB") + (invoke/quiet (string-append #$output "/bin/licensecheck") + "--version"))))))) (home-page "https://metacpan.org/release/App-Licensecheck") (synopsis "License checker for source files") (description "Licensecheck attempts to determine the license that applies -- 2.41.0