summaryrefslogtreecommitdiff
path: root/guix/import
diff options
context:
space:
mode:
Diffstat (limited to 'guix/import')
-rw-r--r--guix/import/cpan.scm14
-rw-r--r--guix/import/pypi.scm1
2 files changed, 10 insertions, 5 deletions
diff --git a/guix/import/cpan.scm b/guix/import/cpan.scm
index 01acc6f36e..6261e3e924 100644
--- a/guix/import/cpan.scm
+++ b/guix/import/cpan.scm
@@ -38,7 +38,6 @@
#:use-module (guix packages)
#:use-module (guix upstream)
#:use-module (guix derivations)
- #:use-module (gnu packages perl)
#:export (cpan->guix-package
%cpan-updater))
@@ -133,21 +132,28 @@ or #f on failure. MODULE should be e.g. \"Test::Script\""
(number->string version))
(version version)))
+(define (perl-package)
+ "Return the 'perl' package. This is a lazy reference so that we don't
+depend on (gnu packages perl)."
+ (module-ref (resolve-interface '(gnu packages perl)) 'perl))
+
(define %corelist
(delay
(let* ((perl (with-store store
(derivation->output-path
- (package-derivation store perl))))
+ (package-derivation store (perl-package)))))
(core (string-append perl "/bin/corelist")))
(and (access? core X_OK)
core))))
(define core-module?
- (let ((perl-version (package-version perl))
- (rx (make-regexp
+ (let ((rx (make-regexp
(string-append "released with perl v?([0-9\\.]*)"
"(.*and removed from v?([0-9\\.]*))?"))))
(lambda (name)
+ (define perl-version
+ (package-version (perl-package)))
+
(define (version-between? lower version upper)
(and (version>=? version lower)
(or (not upper)
diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm
index 90dbe56128..bb0db1ba85 100644
--- a/guix/import/pypi.scm
+++ b/guix/import/pypi.scm
@@ -44,7 +44,6 @@
#:use-module (guix upstream)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix build-system python)
- #:use-module (gnu packages python)
#:export (guix-package->pypi-name
pypi->guix-package
%pypi-updater))