~ruther/guix-local

56bd65a410c41729ff97362eb087b985cd9f177a — Nicolas Graves 5 months ago ffa4ce6
gnu: licenseheaders: Update to 0.8.8.

* gnu/packages/license.scm (licenseheaders): Update to 0.8.8.
[source]: Switch to git-fetch.
[build-system]: Switch to pyproject-build-system.
[arguments]: Improve style.
<#:test-backend, #:test-flags, #:phases>: Run tests.
[native-inputs]: Add python-setuptools.

Change-Id: Idbfc65edac210c9423ca9b6786c442ca75b8bbef
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
1 files changed, 26 insertions(+), 17 deletions(-)

M gnu/packages/license.scm
M gnu/packages/license.scm => gnu/packages/license.scm +26 -17
@@ 268,27 268,36 @@ designed to be simple.")
(define-public licenseheaders
  (package
    (name "licenseheaders")
    (version "0.8.6")
    (version "0.8.8")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "licenseheaders" version))
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/johann-petrak/licenseheaders")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "073xcm10gyg5kcxqmbsyaz9sr0slbdwgr0r9qanch0zl8i0z9259"))))
    (build-system python-build-system)
        (base32 "1k2naf8vgi8l5h5nxc927x8b10kr4gkraxkim72p71flm8gqhrr4"))))
    (build-system pyproject-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
     (list python-regex))
     (list
      #:test-backend #~'custom
      #:test-flags #~(list "driver.py")
      #: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\\\"\\]," all)
                 (string-append all " \n        \"extensions\": [],")))))
          (replace 'check
            (lambda args
              (with-directory-excursion "tests"
                (apply (assoc-ref %standard-phases 'check) args)))))))
    (native-inputs (list python-setuptools))
    (propagated-inputs (list python-regex))
    (home-page "https://github.com/johann-petrak/licenseheaders")
    (synopsis "Add or change license headers for all files in a directory")
    (description