From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id sEAEBolqfV91fAAA0tVLHw (envelope-from ) for ; Wed, 07 Oct 2020 07:13:13 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id mJXQAYlqfV+SKgAAB5/wlQ (envelope-from ) for ; Wed, 07 Oct 2020 07:13:13 +0000 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 5620B9401BC for ; Wed, 7 Oct 2020 07:13:12 +0000 (UTC) Received: from localhost ([::1]:51244 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kQ3dO-0001Dy-QN for larch@yhetil.org; Wed, 07 Oct 2020 03:13:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58436) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kQ3dG-0001Df-7d for guix-patches@gnu.org; Wed, 07 Oct 2020 03:13:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43405) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kQ3dF-0008UI-V6 for guix-patches@gnu.org; Wed, 07 Oct 2020 03:13:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kQ3dF-000488-R4 for guix-patches@gnu.org; Wed, 07 Oct 2020 03:13:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#43841] [PATCH] build-system/go: Install license files. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 07 Oct 2020 07:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 43841 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43841@debbugs.gnu.org Cc: Efraim Flashner X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.160205476615851 (code B ref -1); Wed, 07 Oct 2020 07:13:01 +0000 Received: (at submit) by debbugs.gnu.org; 7 Oct 2020 07:12:46 +0000 Received: from localhost ([127.0.0.1]:54951 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQ3cz-00047a-R3 for submit@debbugs.gnu.org; Wed, 07 Oct 2020 03:12:46 -0400 Received: from lists.gnu.org ([209.51.188.17]:40008) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQ3cx-00047R-HY for submit@debbugs.gnu.org; Wed, 07 Oct 2020 03:12:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58366) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kQ3cx-0001C9-CR for guix-patches@gnu.org; Wed, 07 Oct 2020 03:12:43 -0400 Received: from flashner.co.il ([178.62.234.194]:34604) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kQ3cv-0008RV-CM for guix-patches@gnu.org; Wed, 07 Oct 2020 03:12:43 -0400 Received: from localhost (unknown [147.161.9.74]) by flashner.co.il (Postfix) with ESMTPSA id C0C5E40148; Wed, 7 Oct 2020 07:12:39 +0000 (UTC) From: Efraim Flashner Date: Wed, 7 Oct 2020 10:11:56 +0300 Message-Id: <20201007071156.12765-1-efraim@flashner.co.il> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=178.62.234.194; envelope-from=efraim@flashner.co.il; helo=flashner.co.il X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/07 03:12:40 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -2.3 (--) 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-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 1.49 X-TUID: j98kbkrcUCF4 * guix/build/go-build-system.scm (install-license-files): New procedure. (%standard-phases): Replace inherited 'install-license-files phase. --- guix/build/go-build-system.scm | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/guix/build/go-build-system.scm b/guix/build/go-build-system.scm index b9cb2bfd7b..227df820db 100644 --- a/guix/build/go-build-system.scm +++ b/guix/build/go-build-system.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2019 Maxim Cournoyer ;;; Copyright © 2020 Jack Hill ;;; Copyright © 2020 Jakub Kądziołka +;;; Copyright © 2020 Efraim Flashner ;;; ;;; This file is part of GNU Guix. ;;; @@ -254,6 +255,17 @@ XXX We can't make use of compiled libraries (Go \"packages\")." (copy-recursively source dest #:keep-mtime? #t))) #t) +(define* (install-license-files #:key unpack-path + import-path + #:allow-other-keys + #:rest args) + "Install license files matching LICENSE-FILE-REGEXP to 'share/doc'. Adjust +the standard install-license-files phase to first enter the correct directory." + (with-directory-excursion (string-append "src/" (if (string-null? unpack-path) + import-path + unpack-path)) + (apply (assoc-ref gnu:%standard-phases 'install-license-files) args))) + (define* (remove-store-reference file file-name #:optional (store (%store-directory))) "Remove from FILE occurrences of FILE-NAME in STORE; return #t when FILE-NAME @@ -317,6 +329,7 @@ files in OUTPUTS." (replace 'build build) (replace 'check check) (replace 'install install) + (replace 'install-license-files install-license-files) (add-after 'install 'remove-go-references remove-go-references))) (define* (go-build #:key inputs (phases %standard-phases) -- 2.28.0