diff --git a/guix/import/hackage.scm b/guix/import/hackage.scm index b94f4169d4..75def99574 100644 --- a/guix/import/hackage.scm +++ b/guix/import/hackage.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2019 Robert Vollmert ;;; Copyright © 2021 Xinglu Chen ;;; Copyright © 2021 Sarah Morgensen +;;; Copyright © 2019 Simon Tournier ;;; ;;; This file is part of GNU Guix. ;;; @@ -337,10 +338,13 @@ (define* (hackage->guix-package package-name #:key (if port (read-cabal-and-hash port) (hackage-fetch-and-hash package-name)))) - (and=> cabal-meta (compose (cut hackage-module->sexp <> cabal-hash - #:include-test-dependencies? - include-test-dependencies?) - (cut eval-cabal <> cabal-environment))))) + (if cabal-meta + ((compose (cut hackage-module->sexp <> cabal-hash + #:include-test-dependencies? + include-test-dependencies?) + (cut eval-cabal <> cabal-environment)) + cabal-meta) + (values #f '())))) (define hackage->guix-package/m ;memoized variant (memoize hackage->guix-package))