Subject: bug#46170: closed (Re: [bug#46170] [PATCH] gnu: Add licenseheaders.)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 31 Jan 2021 16:02:02 +0000

Your bug report

#46170: [PATCH] gnu: Add licenseheaders.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
46170: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=46170
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#46170] [PATCH] gnu: Add licenseheaders.
From: Nicolas Goaziou <[email-masked]>
To: Tanguy Le Carrour <[email-masked]>
Cc: [email-masked]
Date: Sun, 31 Jan 2021 17:01:20 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

Tanguy Le Carrour <[email-masked]> writes:

> * gnu/packages/license.scm (licenseheaders): New variable.

Applied. Thank you.

> +     "A Python 3 tool to update, change or add license headers to all files
> + of any of the supported types (see below) in or below some
> directory.")

I turned the description into a complete sentence.

Regards,
-- 
Nicolas Goaziou

Subject: [PATCH] gnu: Add licenseheaders.
From: Tanguy Le Carrour <[email-masked]>
To: [email-masked]
Cc: Tanguy Le Carrour <[email-masked]>
Date: Fri, 29 Jan 2021 11:09:48 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

* gnu/packages/license.scm (licenseheaders): New variable.
---
 gnu/packages/license.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/license.scm b/gnu/packages/license.scm
index 369426768b..568275e510 100644
--- a/gnu/packages/license.scm
+++ b/gnu/packages/license.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2018 Oleg Pykhalov <[email-masked]>
 ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <[email-masked]>
 ;;; Copyright © 2020, 2021 Michael Rohleder <[email-masked]>
+;;; Copyright © 2021 Tanguy Le Carrour <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -205,3 +206,37 @@ tools that have a lot more features and functionality surrounding the analysis
 and inspection of copyright and licenses in software projects.  This one is
 designed to be simple.")
     (license (list asl2.0 gpl3+))))
+
+(define-public licenseheaders
+  (package
+    (name "licenseheaders")
+    (version "0.8.6")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "licenseheaders" version))
+       (sha256
+        (base32
+         "073xcm10gyg5kcxqmbsyaz9sr0slbdwgr0r9qanch0zl8i0z9259"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         ;; Reported upstream:
+         ;; <https://github.com/johann-petrak/licenseheaders/issues/47>.
+         (add-after 'unpack 'patch-code
+           (lambda _
+             (substitute* "licenseheaders.py"
+               (("\\\"filenames\\\": \\[\\\"CMakeLists.txt\\\"\\],")
+                "\"filenames\": [\"CMakeLists.txt\"], \n        \"extensions\": [],"))
+             #t)))))
+    (propagated-inputs
+     `(("python-regex" ,python-regex)))
+    (home-page
+     "http://github.com/johann-petrak/licenseheaders")
+    (synopsis
+     "Add or change license headers for all files in a directory")
+    (description
+     "A Python 3 tool to update, change or add license headers to all files
+ of any of the supported types (see below) in or below some directory.")
+    (license expat)))
-- 
2.30.0