unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / Atom feed
* [bug#43841] [PATCH] build-system/go: Install license files.
@ 2020-10-07  7:11 Efraim Flashner
       [not found] ` <handler.43841.B.160205476615851.ack@debbugs.gnu.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Efraim Flashner @ 2020-10-07  7:11 UTC (permalink / raw)
  To: 43841; +Cc: Efraim Flashner

* 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 <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2020 Jack Hill <jackhill@jackhill.us>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
+;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
 ;;;
 ;;; 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





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#43841: Acknowledgement ([PATCH] build-system/go: Install license files.)
       [not found] ` <handler.43841.B.160205476615851.ack@debbugs.gnu.org>
@ 2020-10-15  8:13   ` Efraim Flashner
  0 siblings, 0 replies; 2+ messages in thread
From: Efraim Flashner @ 2020-10-15  8:13 UTC (permalink / raw)
  To: 43841-done

[-- Attachment #1: Type: text/plain, Size: 230 bytes --]

Patch pushed!


-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-15  8:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-07  7:11 [bug#43841] [PATCH] build-system/go: Install license files Efraim Flashner
     [not found] ` <handler.43841.B.160205476615851.ack@debbugs.gnu.org>
2020-10-15  8:13   ` bug#43841: Acknowledgement ([PATCH] build-system/go: Install license files.) Efraim Flashner

unofficial mirror of guix-patches@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix-patches/1 guix-patches/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-patches guix-patches/ https://yhetil.org/guix-patches \
		guix-patches@gnu.org
	public-inbox-index guix-patches

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.patches


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git