all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Nicolò Balzarotti" <anothersms@gmail.com>
To: 48003@debbugs.gnu.org
Subject: [bug#48003] Add julia-gumbo with dependencies
Date: Sat, 24 Apr 2021 22:09:59 +0200	[thread overview]
Message-ID: <87k0origvc.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> (raw)

[-- Attachment #1: Type: text/plain, Size: 85 bytes --]

Hi!

Three simple patches attached to have Gumbo.jl with its dependencies.

Thanks!


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-julia-abstracttrees.patch --]
[-- Type: text/x-patch, Size: 1771 bytes --]

From ebd7c319ea086ccf43d65f0100f608ee87374dbf Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Sat, 24 Apr 2021 19:33:27 +0200
Subject: [PATCH 1/3] gnu: Add julia-abstracttrees.

* gnu/packages/julia-xyz.scm (julia-abstracttrees): New variable.
---
 gnu/packages/julia-xyz.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm
index 9812162ce1..21815387de 100644
--- a/gnu/packages/julia-xyz.scm
+++ b/gnu/packages/julia-xyz.scm
@@ -51,6 +51,29 @@ implement FFTs (such as @code{FFTW.jl} or @code{FastTransforms.jl}) extend the
 types/functions defined in AbstractFFTs.")
     (license license:expat)))
 
+(define-public julia-abstracttrees
+  (package
+    (name "julia-abstracttrees")
+    (version "0.3.4")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/JuliaCollections/AbstractTrees.jl")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "16is5n2qa69cci34vfazxsa7ik6q0hbnnqrbrhkq8frh142f1xs8"))))
+    (build-system julia-build-system)
+    (home-page "https://juliacollections.github.io/AbstractTrees.jl/stable/")
+    (synopsis "Abstract Julia interfaces for working with trees")
+    (description "This Julia package provides several utilities for working
+with tree-like data structures.  Most importantly, it defines the
+@code{children} method that any package that contains such a data structure
+may import and extend in order to take advantage of any generic tree algorithm
+in this package.")
+    (license license:expat)))
+
 (define-public julia-adapt
   (package
     (name "julia-adapt")
-- 
2.31.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-gnu-Add-julia-gumbo-jll.patch --]
[-- Type: text/x-patch, Size: 2729 bytes --]

From 6e225f07e1380d42053df8ca9a40ed6997b0dd3f Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Sat, 24 Apr 2021 21:52:54 +0200
Subject: [PATCH 2/3] gnu: Add julia-gumbo-jll.

* gnu/packages/julia-xyz.scm (julia-gumbo-jll): New variable.
---
 gnu/packages/julia-xyz.scm | 42 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 41 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm
index 21815387de..582072e320 100644
--- a/gnu/packages/julia-xyz.scm
+++ b/gnu/packages/julia-xyz.scm
@@ -24,7 +24,8 @@
   #:use-module (guix build-system julia)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages maths)
-  #:use-module (gnu packages tls))
+  #:use-module (gnu packages tls)
+  #:use-module (gnu packages web))
 
 (define-public julia-abstractffts
   (package
@@ -647,6 +648,45 @@ functions (or any callable object, really) using forward mode automatic
 differentiation (AD).")
     (license license:expat)))
 
+(define-public julia-gumbo-jll
+  (package
+    (name "julia-gumbo-jll")
+    (version "0.10.1+1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/JuliaBinaryWrappers/Gumbo_jll.jl")
+             (commit (string-append "Gumbo-v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "00a182x5hfpjzyvrxdn8wh4h67q899p5dzqp19a5s22si4g41k76"))))
+    (build-system julia-build-system)
+    (arguments
+     '(#:tests? #f ; no runtests
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'override-binary-path
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((gumbo (string-append (assoc-ref inputs "gumbo-parser"))))
+               (for-each
+                (lambda (wrapper)
+                  (substitute* wrapper
+                    (("(const libgumbo = )\"(.*)\"" all const libname)
+                     (string-append const "\"" gumbo "/lib/" libname "\"\n"))
+                    (("(global artifact_dir =).*" all m)
+                     (string-append m " \"" gumbo "\""))))
+                ;; There's a Julia file for each platform, override them all
+                (find-files "src/wrappers/" "\\.jl$"))))))))
+    (inputs
+     `(("gumbo-parser" ,gumbo-parser)))
+    (propagated-inputs
+     `(("julia-jllwrappers" ,julia-jllwrappers)))
+    (home-page "https://github.com/JuliaBinaryWrappers/Gumbo_jll.jl")
+    (synopsis "Gumbo HTML parsing library wrappers")
+    (description "This package provides a wrapper for Gumbo HTML parsing library.")
+    (license license:expat)))
+
 (define-public julia-http
   (package
     (name "julia-http")
-- 
2.31.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0003-gnu-Add-julia-gumbo.patch --]
[-- Type: text/x-patch, Size: 1613 bytes --]

From 90d759ff8a8919763ded16800f5f82c61968976c Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Sat, 24 Apr 2021 21:58:26 +0200
Subject: [PATCH 3/3] gnu: Add julia-gumbo.

* gnu/packages/julia-xyz.scm (julia-gumbo): New variable.
---
 gnu/packages/julia-xyz.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm
index 582072e320..a8402f82dc 100644
--- a/gnu/packages/julia-xyz.scm
+++ b/gnu/packages/julia-xyz.scm
@@ -648,6 +648,29 @@ functions (or any callable object, really) using forward mode automatic
 differentiation (AD).")
     (license license:expat)))
 
+(define-public julia-gumbo
+  (package
+    (name "julia-gumbo")
+    (version "0.8.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/JuliaWeb/Gumbo.jl")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1g22dv3v7caakspv3pdahnqn937fzzsg9y87rj72hid9g8lxl1gm"))))
+    (build-system julia-build-system)
+    (propagated-inputs
+     `(("julia-abstracttrees" ,julia-abstracttrees)
+       ("julia-gumbo-jll" ,julia-gumbo-jll)))
+    (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 @code{HTML}.")
+    (license license:expat)))
+
 (define-public julia-gumbo-jll
   (package
     (name "julia-gumbo-jll")
-- 
2.31.1


             reply	other threads:[~2021-04-24 20:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-24 20:09 Nicolò Balzarotti [this message]
2021-05-03 21:03 ` bug#48003: Add julia-gumbo with dependencies Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k0origvc.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me \
    --to=anothersms@gmail.com \
    --cc=48003@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.