@@ -158,14 +158,10 @@ library
(define-syntax-rule (make-cabal-import-test pattern)
(lambda*
(test-cabal #:key (cabal-environment '()))
- (mock
- ((guix import hackage) hackage-fetch
- (lambda (name-version)
- (call-with-input-string test-cabal
- read-cabal)))
- (match (hackage->guix-package "foo" #:cabal-environment cabal-environment)
- (pattern #t)
- (x (pk 'fail x #f))))))
+ (define port (open-input-string test-cabal))
+ (match (hackage->guix-package "foo" #:port port #:cabal-environment cabal-environment)
+ (pattern #t)
+ (x (pk 'fail x #f)))))
(define test-cabal-ghc-foo
(make-cabal-import-test