~ruther/guix-local

d66e9698a18a6be2d6b670f5a31c23f87afece68 — Nicolas Graves 7 months ago 73fe38f
import: pypi: Enforce home-page https prefix.

* guix/import/pypi.scm (make-pypi-sexp): Improve home-page handling to
enforce an https:// prefix, even in the case where upstream uses http://.

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

M guix/import/pypi.scm
M guix/import/pypi.scm => guix/import/pypi.scm +7 -2
@@ 601,7 601,12 @@ VERSION."
         (sha256 (or (and=> sha256 bytevector->nix-base32-string)
                     (guix-hash-url (with-store store
                                      (download-to-store store source-url)))))
         (source (pypi-package->upstream-source pypi-package version)))
         (source (pypi-package->upstream-source pypi-package version))
         (home-page (project-info-home-page info))
         (home-page (if (and (string? home-page)
                             (string-prefix? "http://" home-page))
                        (string-append "https" (string-drop home-page 4))
                        home-page)))
    (values
     `(package
        (name ,(python->package-name name))


@@ 626,7 631,7 @@ VERSION."
                        'propagated-inputs)
        ,@(maybe-inputs (upstream-source-native-inputs source)
                        'native-inputs)
        (home-page ,(project-info-home-page info))
        (home-page ,home-page)
        (synopsis ,(project-info-summary info))
        (description ,(and=> (non-empty-string-or-false
                              (project-info-summary info))