summaryrefslogtreecommitdiff
path: root/guix/import
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2021-12-05 19:17:41 +0100
committerRicardo Wurmus <rekado@elephly.net>2021-12-05 19:17:41 +0100
commit9bc0f45df5d6aed217020b1183dca54989844fb0 (patch)
treed927e89949ff7f65b5059bc94273c53fd43d0763 /guix/import
parent6db3c536e89deb8a204e756f427614925a7d2582 (diff)
parent10554e0a57feeea470127a1d0441957d1776b0bd (diff)
Merge remote-tracking branch 'origin/master' into core-updates-frozen
Diffstat (limited to 'guix/import')
-rw-r--r--guix/import/hackage.scm5
-rw-r--r--guix/import/pypi.scm11
2 files changed, 11 insertions, 5 deletions
diff --git a/guix/import/hackage.scm b/guix/import/hackage.scm
index d73fbe6a81..6ef1e7a675 100644
--- a/guix/import/hackage.scm
+++ b/guix/import/hackage.scm
@@ -41,6 +41,7 @@
#:use-module (guix memoization)
#:use-module (guix upstream)
#:use-module (guix packages)
+ #:autoload (guix build-system haskell) (hackage-uri)
#:use-module ((guix utils) #:select (call-with-temporary-output-file))
#:export (%hackage-url
hackage->guix-package
@@ -302,7 +303,7 @@ the hash of the Cabal file."
(version ,version)
(source (origin
(method url-fetch)
- (uri (string-append ,@(factorize-uri source-url version)))
+ (uri (hackage-uri ,name version))
(sha256
(base32
,(if tarball
@@ -366,7 +367,7 @@ respectively."
(hackage-cabal-url hackage-name))
#f)
((_ *** ("version" (version)))
- (let ((url (hackage-source-url hackage-name version)))
+ (let ((url (hackage-uri hackage-name version)))
(upstream-source
(package (package-name package))
(version version)
diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm
index 2b33b3b8bc..343e7c0a0a 100644
--- a/guix/import/pypi.scm
+++ b/guix/import/pypi.scm
@@ -10,6 +10,7 @@
;;; Copyright © 2020 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
+;;; Copyright © 2021 Marius Bakke <marius@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -113,7 +114,7 @@
(url distribution-url) ;string
(digests distribution-digests) ;list of string pairs
(file-name distribution-file-name "filename") ;string
- (has-signature? distribution-has-signature? "hash_sig") ;Boolean
+ (has-signature? distribution-has-signature? "has_sig") ;Boolean
(package-type distribution-package-type "packagetype") ;"bdist_wheel" | ...
(python-version distribution-package-python-version
"python_version"))
@@ -533,10 +534,14 @@ VERSION, SOURCE-URL, HOME-PAGE, SYNOPSIS, DESCRIPTION, and LICENSE."
(guard (c ((missing-source-error? c) #f))
(let* ((info (pypi-project-info pypi-package))
(version (project-info-version info))
- (url (distribution-url
- (source-release pypi-package))))
+ (dist (source-release pypi-package))
+ (url (distribution-url dist)))
(upstream-source
(urls (list url))
+ (signature-urls
+ (if (distribution-has-signature? dist)
+ (list (string-append url ".asc"))
+ #f))
(input-changes
(changed-inputs package
(pypi->guix-package pypi-name)))