summaryrefslogtreecommitdiff
path: root/guix/import
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2022-06-02 13:52:08 +0200
committerLars-Dominik Braun <lars@6xq.net>2022-06-06 13:26:51 +0200
commit143141726e6c1b3f1170e9f4e971700e30d74375 (patch)
treeccb5ca5f990d2baa939e7d1ed958829fb6a246dd /guix/import
parentdedfcaa8e2b948124f76121b9062c827fe649e29 (diff)
import: hackage: Filter upper/mixed case dependencies too.
* guix/import/hackage.scm (filter-dependencies): Convert OWN-NAMES to lowercase before filtering. (hackage-module->sexp): Remove #f from OWN-NAMES, which is used for unnamed (default) libraries. * tests/hackage.scm (test-cabal-internal-library-ignored): Add mismatched uppercase letters.
Diffstat (limited to 'guix/import')
-rw-r--r--guix/import/hackage.scm8
1 files changed, 5 insertions, 3 deletions
diff --git a/guix/import/hackage.scm b/guix/import/hackage.scm
index 6e982366cf..878a7d2f9c 100644
--- a/guix/import/hackage.scm
+++ b/guix/import/hackage.scm
@@ -227,9 +227,10 @@ object."
list with the names of dependencies. OWN-NAMES is the name of the Cabal
package being processed and its internal libaries and is used to filter
references to itself."
- (filter (lambda (d) (not (member (string-downcase d)
+ (let ((ignored-dependencies (map string-downcase
(append own-names ghc-standard-libraries))))
- dependencies))
+ (filter (lambda (d) (not (member (string-downcase d) ignored-dependencies)))
+ dependencies)))
(define* (hackage-module->sexp cabal cabal-hash
#:key (include-test-dependencies? #t))
@@ -250,7 +251,8 @@ the hash of the Cabal file."
(hackage-source-url name version))
(define own-names (cons (cabal-package-name cabal)
- (map cabal-library-name (cabal-package-library cabal))))
+ (filter (lambda (x) (not (eqv? x #f)))
+ (map cabal-library-name (cabal-package-library cabal)))))
(define hackage-dependencies
(filter-dependencies (cabal-dependencies->names cabal) own-names))