From 69b0a847fbeaa104e927e4fd2a231fb4fc98a40f Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Sat, 22 Sep 2018 22:18:50 +0530 Subject: [PATCH] import: hackage: Do not repeat inputs in native-inputs. * guix/import/hackage.scm (hackage-module->sexp): Do not repeat inputs again in native-inputs. native-inputs should only contain packages that are not already listed in inputs. --- guix/import/hackage.scm | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/guix/import/hackage.scm b/guix/import/hackage.scm index 766a0b53f1..48db764b3c 100644 --- a/guix/import/hackage.scm +++ b/guix/import/hackage.scm @@ -215,15 +215,18 @@ representation of a Cabal file as produced by 'read-cabal'." cabal)) (define hackage-native-dependencies - ((compose (cut filter-dependencies <> - (cabal-package-name cabal)) - ;; FIXME: Check include-test-dependencies? - (lambda (cabal) - (append (if include-test-dependencies? - (cabal-test-dependencies->names cabal) - '()) - (cabal-custom-setup-dependencies->names cabal)))) - cabal)) + (lset-difference + equal? + ((compose (cut filter-dependencies <> + (cabal-package-name cabal)) + ;; FIXME: Check include-test-dependencies? + (lambda (cabal) + (append (if include-test-dependencies? + (cabal-test-dependencies->names cabal) + '()) + (cabal-custom-setup-dependencies->names cabal)))) + cabal) + hackage-dependencies)) (define dependencies (map (lambda (name)