From: "Nicolò Balzarotti" <anothersms@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 45972@debbugs.gnu.org
Subject: [bug#45972] [PATCH] Add julia-json with dependencies
Date: Wed, 27 Jan 2021 00:23:44 +0100 [thread overview]
Message-ID: <87lfcfcmf3.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> (raw)
In-Reply-To: <87wnvzwfgu.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 601 bytes --]
I applied all your suggestions :)
> If you’re confident with the licenses and ‘guix lint’ is happy,
> please push!
Almost all of Julia packages are under MIT (expat), I double checked and
they are fine. Also, 3 packages (out of 8) have been updated since my
submission, so I updated them now and guix lint does not complain anymore.
> Nice to see more Julia packages.
This is the first batch, I finally decided to submit in small batches
the 100+ packages I have; you have been warned :D
Here's the updated patchset (if somebody can push).
Thanks Ludo for the review
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: v2-0001-guix-build-system-julia-Enable-tests.patch --]
[-- Type: text/x-patch, Size: 3143 bytes --]
From a374ec23346cca7ff6f28c8141102f8838db649a Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Mon, 18 Jan 2021 23:56:54 +0100
Subject: [PATCH v2 1/9] guix: build-system (julia): Enable tests.
* guix/build-system/julia.scm (julia-build): Set tests? default to #t.
* guix/build/julia-build-system.scm (check): Respect tests? and fix julia
invocation.
(%standard-phases): Add check phase after install.
---
guix/build-system/julia.scm | 2 +-
guix/build/julia-build-system.scm | 27 +++++++++++++++++----------
2 files changed, 18 insertions(+), 11 deletions(-)
diff --git a/guix/build-system/julia.scm b/guix/build-system/julia.scm
index 488fe9bb1d..d3cb41c054 100644
--- a/guix/build-system/julia.scm
+++ b/guix/build-system/julia.scm
@@ -75,7 +75,7 @@
(define* (julia-build store name inputs
#:key source
- (tests? #f)
+ (tests? #t)
(phases '(@ (guix build julia-build-system)
%standard-phases))
(outputs '("out"))
diff --git a/guix/build/julia-build-system.scm b/guix/build/julia-build-system.scm
index e8ebcf8ba0..61817e0b47 100644
--- a/guix/build/julia-build-system.scm
+++ b/guix/build/julia-build-system.scm
@@ -69,15 +69,22 @@
(string-append "pushfirst!(DEPOT_PATH, pop!(DEPOT_PATH)); using " package)))
#t)
-(define* (check #:key source inputs outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (package (strip-store-file-name source))
- (builddir (string-append out "/share/julia/")))
- ;; With a patch, SOURCE_DATE_EPOCH is honored
- (setenv "SOURCE_DATE_EPOCH" "1")
- (setenv "JULIA_DEPOT_PATH" builddir)
- (setenv "JULIA_LOAD_PATH" (string-append builddir "packages/"))
- (invoke-julia (string-append "using Pkg;Pkg.test(\"" package "\")")))
+(define* (check #:key tests? source inputs outputs #:allow-other-keys)
+ (when tests?
+ (let* ((out (assoc-ref outputs "out"))
+ (package (strip-store-file-name source))
+ (builddir (string-append out "/share/julia/")))
+ ;; With a patch, SOURCE_DATE_EPOCH is honored
+ (setenv "SOURCE_DATE_EPOCH" "1")
+ (setenv "JULIA_DEPOT_PATH" builddir)
+ (setenv "JULIA_LOAD_PATH"
+ (string-append builddir "packages/" ":"
+ (or (getenv "JULIA_LOAD_PATH")
+ "")))
+ (setenv "HOME" "/tmp")
+ (invoke "julia"
+ (string-append builddir "packages/"
+ package "/test/runtests.jl"))))
#t)
(define (julia-create-package-toml outputs source
@@ -112,7 +119,7 @@ version = \"" version "\"
(delete 'check) ; tests must be run after installation
(replace 'install install)
(add-after 'install 'precompile precompile)
- ;; (add-after 'install 'check check)
+ (add-after 'install 'check check)
;; TODO: In the future we could add a "system-image-generation" phase
;; where we use PackageCompiler.jl to speed up package loading times
(delete 'configure)
--
2.30.0
[-- Attachment #3: v2-0002-gnu-julia-compat-Update-to-3.25.0.patch --]
[-- Type: text/x-patch, Size: 1431 bytes --]
From 46cc28fe6d532c64006b6fea88604b198acec278 Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Mon, 18 Jan 2021 17:42:50 +0100
Subject: [PATCH v2 2/9] gnu: julia-compat: Update to 3.25.0.
* gnu/packages/julia-xyz.scm (julia-compat): Update to 3.25.0.
---
gnu/packages/julia-xyz.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm
index f1da66a4be..9a4bf7c678 100644
--- a/gnu/packages/julia-xyz.scm
+++ b/gnu/packages/julia-xyz.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xyz>
+;;; Copyright © 2020, 2021 Nicolò Balzarotti <nicolo@nixo.xyz>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -25,7 +25,7 @@
(define-public julia-compat
(package
(name "julia-compat")
- (version "3.9.1")
+ (version "3.25.0")
(source
(origin
(method git-fetch)
@@ -34,7 +34,7 @@
(commit (string-append "v" version))))
(file-name "Compat")
(sha256
- (base32 "01vwjr2134bzgnaxwd67knbibbhnfgnqjw7gxrp29s6y2a6j3882"))))
+ (base32 "1m4r5i8mq29xjp3mllh6047n5a78sdyld57m15anrnsjgaapcgby"))))
(build-system julia-build-system)
(home-page "https://github.com/JuliaLang/Compat.jl")
(synopsis "Compatibility across Julia versions")
--
2.30.0
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: v2-0003-gnu-Add-julia-orderedcollections.patch --]
[-- Type: text/x-patch, Size: 1711 bytes --]
From cecf5b2739226f06bfe9ff8df55207306e1db2b8 Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Mon, 18 Jan 2021 18:11:42 +0100
Subject: [PATCH v2 3/9] gnu: Add julia-orderedcollections.
* gnu/packages/julia-xyz.scm (julia-orderedcollections): New variable.
---
gnu/packages/julia-xyz.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm
index 9a4bf7c678..58b8795eab 100644
--- a/gnu/packages/julia-xyz.scm
+++ b/gnu/packages/julia-xyz.scm
@@ -43,3 +43,25 @@ between older and newer versions of the Julia language. The Compat package
provides a macro that lets you use the latest syntax in a backwards-compatible
way.")
(license license:expat)))
+
+(define-public julia-orderedcollections
+ (package
+ (name "julia-orderedcollections")
+ (version "1.3.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/JuliaCollections/OrderedCollections.jl")
+ (commit (string-append "v" version))))
+ (file-name "OrderedCollections")
+ (sha256
+ (base32 "0sfip1ixghsz91q2s7d62rgzw3gppg42fg6bccxlplqa3hfmbycf"))))
+ (build-system julia-build-system)
+ (home-page "https://github.com/JuliaCollections/OrderedCollections.jl")
+ (synopsis "Associative containers that preserve insertion order")
+ (description "This package implements @code{OrderedDicts} and
+@code{OrderedSets}, which are similar to containers in base Julia. However,
+during iteration the @code{Ordered*} containers return items in the order in
+which they were added to the collection.")
+ (license license:expat)))
--
2.30.0
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #5: v2-0004-gnu-Add-julia-datastructures.patch --]
[-- Type: text/x-patch, Size: 1776 bytes --]
From ea24edc3e10695100a3c486736a2e4647316edf0 Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Mon, 18 Jan 2021 18:17:50 +0100
Subject: [PATCH v2 4/9] gnu: Add julia-datastructures.
* gnu/packages/julia-xyz.scm (julia-datastructures): New variable.
---
gnu/packages/julia-xyz.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm
index 58b8795eab..aacc7ee96d 100644
--- a/gnu/packages/julia-xyz.scm
+++ b/gnu/packages/julia-xyz.scm
@@ -44,6 +44,30 @@ provides a macro that lets you use the latest syntax in a backwards-compatible
way.")
(license license:expat)))
+(define-public julia-datastructures
+ (package
+ (name "julia-datastructures")
+ (version "0.18.9")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/JuliaCollections/DataStructures.jl")
+ (commit (string-append "v" version))))
+ (file-name "DataStructures")
+ (sha256
+ (base32 "0hdqp8ipsqdw5bqqkdvz4j6n67x80sj5azr9vzyxwjfsgkfbnk2l"))))
+ (propagated-inputs
+ `(("julia-compat" ,julia-compat)
+ ("julia-orderedcollections" ,julia-orderedcollections)))
+ (build-system julia-build-system)
+ (home-page "https://github.com/JuliaCollections/DataStructures.jl")
+ (synopsis "Julia module providing different data structures")
+ (description "This package implements a variety of data structures,
+including, @code{CircularBuffer}, @code{Queue}, @code{Stack},
+@code{Accumulators}, @code{LinkedLists}, @code{SortedDicts} and many others.")
+ (license license:expat)))
+
(define-public julia-orderedcollections
(package
(name "julia-orderedcollections")
--
2.30.0
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #6: v2-0005-gnu-Add-julia-fixedpointnumbers.patch --]
[-- Type: text/x-patch, Size: 2406 bytes --]
From 431b0bb4d5b15c6b7121dcad56a81bef0f3c9aec Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Mon, 18 Jan 2021 18:25:02 +0100
Subject: [PATCH v2 5/9] gnu: Add julia-fixedpointnumbers.
* gnu/packages/julia-xyz.scm (julia-fixedpointnumbers): New variable.
---
gnu/packages/julia-xyz.scm | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm
index aacc7ee96d..6b9ff1bc8d 100644
--- a/gnu/packages/julia-xyz.scm
+++ b/gnu/packages/julia-xyz.scm
@@ -68,6 +68,41 @@ including, @code{CircularBuffer}, @code{Queue}, @code{Stack},
@code{Accumulators}, @code{LinkedLists}, @code{SortedDicts} and many others.")
(license license:expat)))
+(define-public julia-fixedpointnumbers
+ (package
+ (name "julia-fixedpointnumbers")
+ (version "0.8.4")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/JuliaMath/FixedPointNumbers.jl")
+ (commit (string-append "v" version))))
+ (file-name "FixedPointNumbers")
+ (sha256
+ (base32 "0j0n40n04q9sk68wh9jq90m6c67k4ws02k41djjzkrqmpzv4rcdi"))))
+ (build-system julia-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'disable-failing-test
+ (lambda* (#:key outputs #:allow-other-keys)
+ (substitute* "test/fixed.jl"
+ ;; A deprecation warning is not thrown
+ (("@test_logs.*:warn" all) (string-append "# " all)))
+ #t)))))
+ (propagated-inputs `(("julia-compat" ,julia-compat)))
+ (home-page "https://github.com/JuliaMath/FixedPointNumbers.jl")
+ (synopsis "Fixed point types for Julia")
+ (description "@code{FixedPointNumbers.jl} implements fixed-point number
+types for Julia. A fixed-point number represents a fractional, or
+non-integral, number. In contrast with the more widely known floating-point
+numbers, with fixed-point numbers the decimal point doesn't \"float\":
+fixed-point numbers are effectively integers that are interpreted as being
+scaled by a constant factor. Consequently, they have a fixed number of
+digits (bits) after the decimal (radix) point.")
+ (license license:expat)))
+
(define-public julia-orderedcollections
(package
(name "julia-orderedcollections")
--
2.30.0
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #7: v2-0006-gnu-Add-julia-parsers.patch --]
[-- Type: text/x-patch, Size: 1453 bytes --]
From 1814f61130c39eba91507fe5bde654e99d9c7421 Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Mon, 18 Jan 2021 18:27:32 +0100
Subject: [PATCH v2 6/9] gnu: Add julia-parsers.
* gnu/packages/julia-xyz.scm (julia-parsers): New variable.
---
gnu/packages/julia-xyz.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm
index 6b9ff1bc8d..a35755d5da 100644
--- a/gnu/packages/julia-xyz.scm
+++ b/gnu/packages/julia-xyz.scm
@@ -124,3 +124,23 @@ digits (bits) after the decimal (radix) point.")
during iteration the @code{Ordered*} containers return items in the order in
which they were added to the collection.")
(license license:expat)))
+
+(define-public julia-parsers
+ (package
+ (name "julia-parsers")
+ (version "1.0.15")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/JuliaData/Parsers.jl")
+ (commit (string-append "v" version))))
+ (file-name "Parsers")
+ (sha256
+ (base32 "16iffl6l28kspgqch48mhi1s8qhspr3cpqcwsph3rqi72lbfqygx"))))
+ (build-system julia-build-system)
+ (home-page "https://github.com/JuliaData/Parsers.jl")
+ (synopsis "Fast parsing machinery for basic types in Julia")
+ (description "@code{Parsers.jl} is a collection of type parsers and
+utilities for Julia.")
+ (license license:expat)))
--
2.30.0
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #8: v2-0007-gnu-Add-julia-adapt.patch --]
[-- Type: text/x-patch, Size: 1600 bytes --]
From 985de9540ffc4ed5351f9b884e95fea920d9e325 Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Mon, 18 Jan 2021 23:46:51 +0100
Subject: [PATCH v2 7/9] gnu: Add julia-adapt.
* gnu/packages/julia-xyz.scm (julia-adapt): New variable.
---
gnu/packages/julia-xyz.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm
index a35755d5da..58b45d3f15 100644
--- a/gnu/packages/julia-xyz.scm
+++ b/gnu/packages/julia-xyz.scm
@@ -22,6 +22,28 @@
#:use-module (guix git-download)
#:use-module (guix build-system julia))
+(define-public julia-adapt
+ (package
+ (name "julia-adapt")
+ (version "3.1.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/JuliaGPU/Adapt.jl")
+ (commit (string-append "v" version))))
+ (file-name "Adapt")
+ (sha256
+ (base32 "1lks6k3a1gvwlplld47nh6xfy3nnlpc0vhkzg6zg0qn33qdmavrg"))))
+ (build-system julia-build-system)
+ (home-page "https://github.com/JuliaGPU/Adapt.jl")
+ (synopsis "Package providing the @code{adapt} function, similar to @code{convert}")
+ (description "This Julia package provides the @code{adapt(T, x)} function
+acts like @code{convert(T, x)}, but without the restriction of returning a
+@code{T}. This allows you to \"convert\" wrapper types like @code{Adjoint} to
+be GPU compatible without throwing away the wrapper.")
+ (license license:expat)))
+
(define-public julia-compat
(package
(name "julia-compat")
--
2.30.0
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #9: v2-0008-gnu-Add-julia-offsetarrays.patch --]
[-- Type: text/x-patch, Size: 1796 bytes --]
From fed9e5fe47495120b49c35535bc9d26fdd065760 Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Tue, 19 Jan 2021 00:01:28 +0100
Subject: [PATCH v2 8/9] gnu: Add julia-offsetarrays.
* gnu/packages/julia-xyz.scm (julia-offsetarrays): New variable.
---
gnu/packages/julia-xyz.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm
index 58b45d3f15..70d7f1d718 100644
--- a/gnu/packages/julia-xyz.scm
+++ b/gnu/packages/julia-xyz.scm
@@ -147,6 +147,31 @@ during iteration the @code{Ordered*} containers return items in the order in
which they were added to the collection.")
(license license:expat)))
+(define-public julia-offsetarrays
+ (package
+ (name "julia-offsetarrays")
+ (version "1.5.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/JuliaArrays/OffsetArrays.jl")
+ (commit (string-append "v" version))))
+ (file-name "OffsetArrays")
+ (sha256
+ (base32 "1y3fnssw2hzyghrk6jfcxslab0f8sjkjszh482snfq4k6mkrhy77"))))
+ (build-system julia-build-system)
+ (propagated-inputs
+ `(("julia-adapt" ,julia-adapt)))
+ ;; CatIndices depends on OffsetArrays, introducing a recursive dependency
+ (arguments '(#:tests? #f))
+ (home-page "https://juliaarrays.github.io/OffsetArrays.jl/stable/")
+ (synopsis "Fortran-like arrays with arbitrary, zero or negative indices")
+ (description "@code{OffsetArrays.jl} provides Julia users with arrays that
+have arbitrary indices, similar to those found in some other programming
+languages like Fortran.")
+ (license license:expat)))
+
(define-public julia-parsers
(package
(name "julia-parsers")
--
2.30.0
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #10: v2-0009-gnu-Add-julia-json.patch --]
[-- Type: text/x-patch, Size: 1723 bytes --]
From aa1231bb89d1a7271181d437ebe36952ec8ccfc4 Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Tue, 19 Jan 2021 00:06:34 +0100
Subject: [PATCH v2 9/9] gnu: Add julia-json.
* gnu/packages/julia-xyz.scm (julia-json): New variable.
---
gnu/packages/julia-xyz.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm
index 70d7f1d718..a79b8d07b6 100644
--- a/gnu/packages/julia-xyz.scm
+++ b/gnu/packages/julia-xyz.scm
@@ -125,6 +125,31 @@ scaled by a constant factor. Consequently, they have a fixed number of
digits (bits) after the decimal (radix) point.")
(license license:expat)))
+(define-public julia-json
+ (package
+ (name "julia-json")
+ (version "0.21.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/JuliaIO/JSON.jl")
+ (commit (string-append "v" version))))
+ (file-name "JSON")
+ (sha256
+ (base32 "1f9k613kbknmp4fgjxvjaw4d5sfbx8a5hmcszmp1w9rqfqngjx9m"))))
+ (build-system julia-build-system)
+ (propagated-inputs
+ `(("julia-datastructures" ,julia-datastructures)
+ ("julia-fixedpointnumbers" ,julia-fixedpointnumbers)
+ ("julia-parsers" ,julia-parsers)
+ ("julia-offsetarrays" ,julia-offsetarrays)))
+ (home-page "https://github.com/JuliaIO/JSON.jl")
+ (synopsis "JSON parsing and printing library for Julia")
+ (description "@code{JSON.jl} is a pure Julia module which supports parsing
+and printing JSON documents.")
+ (license license:expat)))
+
(define-public julia-orderedcollections
(package
(name "julia-orderedcollections")
--
2.30.0
next prev parent reply other threads:[~2021-01-26 23:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-18 23:47 [bug#45972] [PATCH] Add julia-json with dependencies Nicolò Balzarotti
2021-01-26 21:33 ` Ludovic Courtès
2021-01-26 23:23 ` Nicolò Balzarotti [this message]
2021-01-27 22:40 ` Ludovic Courtès
2021-01-28 0:30 ` Nicolò Balzarotti
2021-01-28 13:10 ` Ludovic Courtès
2021-01-28 15:37 ` Nicolò Balzarotti
2021-01-30 14:10 ` bug#45972: " Ludovic Courtès
2021-01-30 14:46 ` [bug#45972] Julia importer? zimoun
2021-01-30 20:13 ` Nicolò Balzarotti
2021-01-30 21:42 ` Nicolò Balzarotti
2021-01-31 19:35 ` zimoun
2021-01-31 20:00 ` Nicolò Balzarotti
2021-02-01 7:22 ` zimoun
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lfcfcmf3.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me \
--to=anothersms@gmail.com \
--cc=45972@debbugs.gnu.org \
--cc=ludo@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 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).