unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#48003] Add julia-gumbo with dependencies
@ 2021-04-24 20:09 Nicolò Balzarotti
  2021-05-03 21:03 ` bug#48003: " Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Nicolò Balzarotti @ 2021-04-24 20:09 UTC (permalink / raw)
  To: 48003

[-- 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#48003: Add julia-gumbo with dependencies
  2021-04-24 20:09 [bug#48003] Add julia-gumbo with dependencies Nicolò Balzarotti
@ 2021-05-03 21:03 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2021-05-03 21:03 UTC (permalink / raw)
  To: Nicolò Balzarotti; +Cc: 48003-done

Ciao Nicolò,

Nicolò Balzarotti <anothersms@gmail.com> skribis:

>>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.

[...]

>>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.

[...]

>>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.

Applied, thanks!

> +    (description "@code{Gumbo.jl} is a Julia wrapper around Google's gumbo
> +library for parsing @code{HTML}.")

I removed @code above.  :-)

Ludo’.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-03 21:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-24 20:09 [bug#48003] Add julia-gumbo with dependencies Nicolò Balzarotti
2021-05-03 21:03 ` bug#48003: " Ludovic Courtès

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).