From 082d9383d1475b772f104f1a6b363e4c80d91cf9 Mon Sep 17 00:00:00 2001 From: Timothy Sample Date: Wed, 29 Aug 2018 00:06:20 -0400 Subject: gnu: ghc-haddock-library: Update to 1.5.0.1. * gnu/packages/patches/ghc-haddock-library-unbundle.patch: New file. * gnu/packages/haskell.scm (ghc-haddock-library): Update to 1.5.0.1. [source]: Add the patch; add a snippet to remove the bundled library. [arguments]: Add a phase to relax test suite dependency constraints and another to add a missing directory required for tests. [native-inputs]: Add ghc-base-compat, ghc-optparse-applicative, and ghc-tree-diff. --- gnu/packages/haskell.scm | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) (limited to 'gnu/packages/haskell.scm') diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm index 5f9c2a4b6e..0e061a6b40 100644 --- a/gnu/packages/haskell.scm +++ b/gnu/packages/haskell.scm @@ -935,7 +935,7 @@ compute the difference between arbitrary abstract datatypes (ADTs) using (define-public ghc-haddock-library (package (name "ghc-haddock-library") - (version "1.4.3") + (version "1.5.0.1") (source (origin (method url-fetch) @@ -945,14 +945,37 @@ compute the difference between arbitrary abstract datatypes (ADTs) using ".tar.gz")) (sha256 (base32 - "0ns4bpf6whmcfl0cm2gx2c73if416x4q3ac4l4qm8w84h0zpcr7p")))) + "1cmbg8l5xrwpliclwy3l057raypjqy0hsg1h1743ahaj8gq10b7z")) + (patches (search-patches + "ghc-haddock-library-unbundle.patch")) + (modules '((guix build utils))) + (snippet '(begin + (delete-file-recursively "vendor") + #t)))) (build-system haskell-build-system) - (inputs - `(("ghc-base-compat" ,ghc-base-compat))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'configure 'relax-test-suite-dependencies + (lambda _ + (substitute* "haddock-library.cabal" + (("base-compat\\s*\\^>= 0\\.9\\.3") "base-compat") + (("hspec\\s*\\^>= 2\\.4\\.4") "hspec")))) + ;; The release tarball does not contain the "fixtures/examples" + ;; directory, which is required for testing. In the upstream + ;; repository, the directory exists and is populated. Here, we + ;; create an empty directory to placate the tests. + (add-before 'check 'add-examples-directory + (lambda _ + (mkdir "fixtures/examples") + #t))))) (native-inputs - `(("hspec-discover" ,hspec-discover) + `(("ghc-base-compat" ,ghc-base-compat) ("ghc-hspec" ,ghc-hspec) - ("ghc-quickcheck" ,ghc-quickcheck))) + ("ghc-optparse-applicative" ,ghc-optparse-applicative) + ("ghc-quickcheck" ,ghc-quickcheck) + ("ghc-tree-diff" ,ghc-tree-diff) + ("hspec-discover" ,hspec-discover))) (home-page "https://www.haskell.org/haddock/") (synopsis "Library exposing some functionality of Haddock") (description -- cgit v1.2.3