diff options
author | Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> | 2018-03-13 17:23:46 +0100 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2018-03-13 20:01:54 +0100 |
commit | 08eaa0d877869d6e54ddb97a48fe9d8f90da16d2 (patch) | |
tree | 7855200cc23992b107ad54a8f3822b3016960fdf /gnu/packages/haskell.scm | |
parent | 8e3149eeb273fe66fac55119e37e96f725d99074 (diff) | |
download | guix-08eaa0d877869d6e54ddb97a48fe9d8f90da16d2.tar.gz |
gnu: Add ghc-skylighting-for-pandoc-1.
* gnu/packages/haskell.scm (ghc-skylighting-for-pandoc-1): New variable.
Diffstat (limited to 'gnu/packages/haskell.scm')
-rw-r--r-- | gnu/packages/haskell.scm | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm index 12dbe2f000..aa8c0352b6 100644 --- a/gnu/packages/haskell.scm +++ b/gnu/packages/haskell.scm @@ -5957,6 +5957,57 @@ supported by that framework can be added. An optional command-line program is provided. Skylighting is intended to be the successor to highlighting-kate.") (license license:gpl2))) +(define-public ghc-skylighting-for-pandoc-1 + (package (inherit ghc-skylighting) + (version "0.1.1.5") + (source (origin + (method git-fetch) + ;; We take the sources from Github, because the tarball on + ;; hackage does not include the XML files. + (uri (git-reference + (url "https://github.com/jgm/skylighting.git") + (commit version))) + (file-name (string-append "ghc-skylighting-" version "-checkout")) + (sha256 + (base32 + "0z3yv8v2fqqgv6lsf0ff3ld0h2vkg97b2jiry9wn2f1rizwdqmzl")))) + (arguments + `(#:configure-flags '("-fbootstrap") + #:phases + (modify-phases %standard-phases + ;; After building the skylighting-extract tool we use it to generate + ;; syntax source files from the included XML files. These are then + ;; added to the skylighting.cabal file. + (add-after 'build 'extract-xml + (lambda _ + (make-file-writable "skylighting.cabal") + (apply invoke "./dist/build/skylighting-extract/skylighting-extract" + (find-files "xml" "\\.xml$")) + #t)) + ;; Reconfigure without bootstrap flag + (add-after 'extract-xml 'configure-again + (lambda* (#:key outputs inputs tests? #:allow-other-keys) + ((assoc-ref %standard-phases 'configure) + #:outputs outputs + #:inputs inputs + #:tests? tests? + #:configure-flags '("-f-bootstrap")))) + (add-after 'configure-again 'build-again + (assoc-ref %standard-phases 'build))))) + (inputs + `(("ghc-aeson" ,ghc-aeson-for-pandoc-1) + ("ghc-ansi-terminal" ,ghc-ansi-terminal) + ("ghc-blaze-html" ,ghc-blaze-html) + ("ghc-case-insensitive" ,ghc-case-insensitive) + ("ghc-diff" ,ghc-diff) + ("ghc-hxt" ,ghc-hxt) + ("ghc-mtl" ,ghc-mtl) + ("ghc-pretty-show" ,ghc-pretty-show) + ("ghc-regex-pcre-builtin" ,ghc-regex-pcre-builtin) + ("ghc-safe" ,ghc-safe) + ("ghc-text" ,ghc-text) + ("ghc-utf8-string" ,ghc-utf8-string))))) + (define-public ghc-doctemplates (package (name "ghc-doctemplates") |