Subject: [bug#32809] [PATCH 1/1] import: hackage: Do not repeat inputs in native-inputs.

From: Arun Isaac <[email-masked]>
Date: Sat, 22 Sep 2018 22:57:57 +0530

* 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 766a0b53f..48db764b3 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)
-- 
2.19.0