From dedfcaa8e2b948124f76121b9062c827fe649e29 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sun, 22 May 2022 11:20:07 +0200 Subject: import: hackage: Filter internal libraries from inputs and native-inputs. Fixes . * guix/import/hackage.scm (filter-dependencies): Support multiple OWN-NAMES. (hackage-module->sexp): Filter OWN-NAMES from HACKAGE-DEPENDENCIES and HACKAGE-NATIVE-DEPENDENCIES. * tests/hackage.scm (test-cabal-internal-library-ignored): New variable. ("hackage->guix-package test internal libraries are ignored"): New testcase. --- tests/hackage.scm | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'tests/hackage.scm') diff --git a/tests/hackage.scm b/tests/hackage.scm index 85a5c2115c..a11dd14846 100644 --- a/tests/hackage.scm +++ b/tests/hackage.scm @@ -368,6 +368,25 @@ executable cabal (test-assert "hackage->guix-package test without final newline" (eval-test-with-cabal test-cabal-no-final-newline match-ghc-foo)) +;; Make sure internal libraries will not be part of the dependencies. +(define test-cabal-internal-library-ignored + "name: foo +version: 1.0.0 +homepage: http://test.org +synopsis: synopsis +description: description +license: BSD3 +executable cabal + build-depends: + HTTP >= 4000.2.5 && < 4000.3, + internal +library internal + build-depends: mtl >= 2.0 && < 3 +") + +(test-assert "hackage->guix-package test internal libraries are ignored" + (eval-test-with-cabal test-cabal-internal-library-ignored match-ghc-foo)) + ;; Check if-elif-else statements (define test-cabal-if "name: foo -- cgit v1.2.3