From 4121adffc251dcbcd5dee69435ed99680e39ac6f Mon Sep 17 00:00:00 2001 From: nixo Date: Sat, 12 Oct 2019 15:16:23 +0200 Subject: [PATCH] gnu: Add julia-gumbo. * gnu/packages/julia-xyz.scm (julia-gumbo-0.5.1): New variable. --- gnu/packages/julia-xyz.scm | 44 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm index 0ca5cfa3f4..97f2b23b6b 100644 --- a/gnu/packages/julia-xyz.scm +++ b/gnu/packages/julia-xyz.scm @@ -25,6 +25,7 @@ #:use-module (gnu packages graphics) #:use-module (gnu packages maths) #:use-module (gnu packages video) + #:use-module (gnu packages web) #:use-module (gnu packages xml) #:use-module (gnu packages tls)) @@ -2149,3 +2150,46 @@ that any package that contains such a datastructure may import and extend in order to take advantage of any generic tree algorithm in this package (or other packages compatible with this package).") (license license:expat))) + +(define-public julia-gumbo + (package + (name "julia-gumbo") + (version "0.5.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/JuliaWeb/Gumbo.jl") + (commit (string-append "v" version)))) + (file-name "Gumbo") + (sha256 + (base32 "1wsdrqz3jj684paanmpla9kvpdcv7sbsw2967kljykvb4plvsx95")))) + (propagated-inputs `(("julia-sha" ,julia-sha) + ("julia-abstracttrees" ,julia-abstracttrees) + ("julia-binaryprovider" ,julia-binaryprovider) + ("julia-compat" ,julia-compat) + ("gumbo-parser", gumbo-parser))) + (build-system julia-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'precompile 'build-deps + (lambda* (#:key outputs source inputs #:allow-other-keys) + (let ((f (open-file + (string-append + (assoc-ref outputs "out") + "/share/julia/packages/" + (string-append + (strip-store-file-name source) "/deps/deps.jl")) + "w"))) + (display (string-append "const libgumbo = \"" + (assoc-ref inputs "gumbo-parser") + "/lib/libgumbo.so\"\n") f) + (close-port f)) + #t))))) + (home-page "https://github.com/JuliaWeb/Gumbo.jl") + (synopsis "Julia wrapper around Google's gumbo C library for parsing +HTML") + (description "@code{Gumbo.jl} is a Julia wrapper around Google's gumbo +library for parsing HTML.") + (license license:expat)))