From unknown Sat Aug 16 18:44:40 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45972] [PATCH] Add julia-json with dependencies Resent-From: =?UTF-8?Q?Nicol=C3=B2?= Balzarotti Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 18 Jan 2021 23:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 45972 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 45972@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.161101368521859 (code B ref -1); Mon, 18 Jan 2021 23:49:02 +0000 Received: (at submit) by debbugs.gnu.org; 18 Jan 2021 23:48:05 +0000 Received: from localhost ([127.0.0.1]:48790 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1eFg-0005gU-Hw for submit@debbugs.gnu.org; Mon, 18 Jan 2021 18:48:05 -0500 Received: from lists.gnu.org ([209.51.188.17]:33482) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1eFe-0005gM-SK for submit@debbugs.gnu.org; Mon, 18 Jan 2021 18:48:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45530) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1eFe-0004Kr-Jn for guix-patches@gnu.org; Mon, 18 Jan 2021 18:48:02 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:51729) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l1eFb-0004Lf-Rj for guix-patches@gnu.org; Mon, 18 Jan 2021 18:48:02 -0500 Received: by mail-wm1-x333.google.com with SMTP id h17so14800638wmq.1 for ; Mon, 18 Jan 2021 15:47:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=ZIM9feHjAyoz7B16uZZlqb/HJMoGDW2WpTbmS5cOJ60=; b=MxxN8I3K6P6+E8qKOk3fJUbPQx8He7vEjve5t64Uliw3YckxYr8Arko9RuqstRr3jM aPKPrp16+j/KioPwlLajFNvyXkHxBxwf8Ij6nlsJ29w3eel57d8UJcJ36tc/ecmqgmeo oEYZ+fUBY9niktozsYlaWwAlijoW8hncgVZkEA7AyHksN5AqVeu5/zs1b0FYnonZa36Y 2G0HkR23+oRa/g9Va0zekuFNmWuCqonLclK7QMMDyXVbR9TLQsc+rot04jmMc3I4be3o zp3cFAYKtcRNtihpxWFukdDndqjfXToVngMn11JeecdARgxyjfCbCjwGhC7UDCalCr6V 9hNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=ZIM9feHjAyoz7B16uZZlqb/HJMoGDW2WpTbmS5cOJ60=; b=EJtnp+lcCol6ZP6rkMKqj90LJHgd4HioQ87XPorE1VkU+vbGJp0xR1ByiGZXimKJ58 el+LyiPt+dou8TE+RKBGm1k9KpCpkpP91jPKigJsWEH+VViyi+TtsTeUVSZqpZakaYl4 7AEDK2QgkVbKHOtvEwws38eiIlip7bO+u+3sHkMv3F7ut875E6r4eBtFeGP204wFW1/t HzkFGvlCTGyWKL+A9Gj1h9X9Z/PgzpzqGdhYtP+RrwLYxCLCd2pnDwli8mlaJ8hivHAZ xtmfu/HOzpp41w2Y9EPMzrd+J/ZwIzUQBjRxm69kYXx2w1hKWXyUHAKGjveD3QGWNIS5 YmzQ== X-Gm-Message-State: AOAM532BYS+/dNtLohkkMWTgo8Iz/2S2ZVMru99DCfVwPCUY9rEQFZ06 ECbBy3dDCj67HBrfk0XLNOudCDCvJUo= X-Google-Smtp-Source: ABdhPJyFFKeaNUYtUBx7Rj2/xYHUTbsqRSszBGU8bp6FAUNElwsbC2KgsJm7jau2nuFMkq34q83LWg== X-Received: by 2002:a1c:dec6:: with SMTP id v189mr1402977wmg.172.1611013678061; Mon, 18 Jan 2021 15:47:58 -0800 (PST) Received: from guixSD (host-95-244-15-108.retail.telecomitalia.it. [95.244.15.108]) by smtp.gmail.com with ESMTPSA id m18sm33258712wrw.43.2021.01.18.15.47.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jan 2021 15:47:56 -0800 (PST) From: =?UTF-8?Q?Nicol=C3=B2?= Balzarotti Date: Tue, 19 Jan 2021 00:47:55 +0100 Message-ID: <87ft2xzu1g.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=anothersms@gmail.com; helo=mail-wm1-x333.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.6 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi guix! This patch series adds julia-json together with its dependencies. It also enable tests for julia packages. Thanks, Nicol=C3=B2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-guix-build-system-julia-Enable-tests.patch >From a374ec23346cca7ff6f28c8141102f8838db649a Mon Sep 17 00:00:00 2001 From: nixo Date: Mon, 18 Jan 2021 23:56:54 +0100 Subject: [PATCH 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.29.2 --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0002-gnu-julia-compat-Update-to-3.25.0.patch Content-Transfer-Encoding: quoted-printable >From 46cc28fe6d532c64006b6fea88604b198acec278 Mon Sep 17 00:00:00 2001 From: nixo Date: Mon, 18 Jan 2021 17:42:50 +0100 Subject: [PATCH 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 =C2=A9 2020 Nicol=C3=B2 Balzarotti +;;; Copyright =C2=A9 2020, 2021 Nicol=C3=B2 Balzarotti ;;; ;;; 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") --=20 2.29.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0003-gnu-Add-julia-orderedcollections.patch >From ac384ede7faccc6ce9ac6c97522c7dbd18200b4a Mon Sep 17 00:00:00 2001 From: nixo Date: Mon, 18 Jan 2021 18:11:42 +0100 Subject: [PATCH 3/9] gnu: Add julia-orderedcollections. * gnu/packages/julia-xyz.scm (julia-orderedcollections): 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 9a4bf7c678..d3c1f35996 100644 --- a/gnu/packages/julia-xyz.scm +++ b/gnu/packages/julia-xyz.scm @@ -43,3 +43,26 @@ 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 "Julia implementation of associative containers that preserve +insertion order") + (description "This package implements OrderedDicts and OrderedSets, which +are similar to containers in base Julia. However, during iteration the +Ordered* containers return items in the order in which they were added to the +collection.") + (license license:expat))) -- 2.29.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0004-gnu-Add-julia-datastructures.patch >From 9736ab882b3348619cf3e74f4282404627dd2b64 Mon Sep 17 00:00:00 2001 From: nixo Date: Mon, 18 Jan 2021 18:17:50 +0100 Subject: [PATCH 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 d3c1f35996..fee694b1fd 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.8") + (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 "1r4xswdvnnlbp5rfa7i7k6kzgkwizvqwyz7jscvyqjylcs6wdsnc")))) + (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 implementation of Data structures") + (description "This package implements a variety of data structures, +including, CircularBuffer, Queue, Stack, Accumulators, Linked Lists, Sorted +Dicts and many others.") + (license license:expat))) + (define-public julia-orderedcollections (package (name "julia-orderedcollections") -- 2.29.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0005-gnu-Add-julia-fixedpointnumbers.patch >From 79fa1af823688da6796a12d664352a4f0512d702 Mon Sep 17 00:00:00 2001 From: nixo Date: Mon, 18 Jan 2021 18:25:02 +0100 Subject: [PATCH 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 fee694b1fd..f5c9e000db 100644 --- a/gnu/packages/julia-xyz.scm +++ b/gnu/packages/julia-xyz.scm @@ -68,6 +68,41 @@ including, CircularBuffer, Queue, Stack, Accumulators, Linked Lists, Sorted Dicts 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.29.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0006-gnu-Add-julia-parsers.patch >From f4ddd59a14cb0fcc259efbf509c2a8073adf62fc Mon Sep 17 00:00:00 2001 From: nixo Date: Mon, 18 Jan 2021 18:27:32 +0100 Subject: [PATCH 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 f5c9e000db..b887832df3 100644 --- a/gnu/packages/julia-xyz.scm +++ b/gnu/packages/julia-xyz.scm @@ -125,3 +125,23 @@ are similar to containers in base Julia. However, during iteration the 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.29.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0007-gnu-Add-julia-adapt.patch >From 358d115e218fc433b15474500a221861c9c82abb Mon Sep 17 00:00:00 2001 From: nixo Date: Mon, 18 Jan 2021 23:46:51 +0100 Subject: [PATCH 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 b887832df3..3601006976 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.0") + (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 "1qcj7i75m0wwk0xcdgf89bjymnz2dipv2iwxys8wzpvrashi6wsp")))) + (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 +T. This allows you to \"convert\" wrapper types like Adjoint to be GPU +compatible without throwing away the wrapper.") + (license license:expat))) + (define-public julia-compat (package (name "julia-compat") -- 2.29.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0008-gnu-Add-julia-offsetarrays.patch >From 06f2e7bbbff5b73493c9a0640ec4c9c6c20280c9 Mon Sep 17 00:00:00 2001 From: nixo Date: Tue, 19 Jan 2021 00:01:28 +0100 Subject: [PATCH 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 3601006976..429ab0afad 100644 --- a/gnu/packages/julia-xyz.scm +++ b/gnu/packages/julia-xyz.scm @@ -148,6 +148,31 @@ 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.1") + (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 "0pd42an8kj2mgw3sv00ijfrsvmfjfgf12lfmpan6zkdckqa73jqz")))) + (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.29.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0009-gnu-Add-julia-json.patch >From 3ebd72ef6a55ad46522fe2534b775e9b6d20130f Mon Sep 17 00:00:00 2001 From: nixo Date: Tue, 19 Jan 2021 00:06:34 +0100 Subject: [PATCH 9/9] gnu: Add julia-json. * gnu/packages/julia-xyz.scm (julia-json): 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 429ab0afad..7aba08cdb1 100644 --- a/gnu/packages/julia-xyz.scm +++ b/gnu/packages/julia-xyz.scm @@ -125,6 +125,30 @@ 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") + (description "Parsing and printing JSON in pure Julia.") + (license license:expat))) + (define-public julia-orderedcollections (package (name "julia-orderedcollections") -- 2.29.2 --=-=-=-- From unknown Sat Aug 16 18:44:40 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45972] [PATCH] Add julia-json with dependencies Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 26 Jan 2021 21:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45972 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: =?UTF-8?Q?Nicol=C3=B2?= Balzarotti Cc: 45972@debbugs.gnu.org Received: via spool by 45972-submit@debbugs.gnu.org id=B45972.161169682622067 (code B ref 45972); Tue, 26 Jan 2021 21:34:02 +0000 Received: (at 45972) by debbugs.gnu.org; 26 Jan 2021 21:33:46 +0000 Received: from localhost ([127.0.0.1]:42816 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4Vy6-0005jr-21 for submit@debbugs.gnu.org; Tue, 26 Jan 2021 16:33:46 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39312) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4Vy5-0005jf-7z for 45972@debbugs.gnu.org; Tue, 26 Jan 2021 16:33:45 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33158) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4Vy0-0002tY-1j; Tue, 26 Jan 2021 16:33:40 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=43308 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l4Vxz-0008T5-2K; Tue, 26 Jan 2021 16:33:39 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87ft2xzu1g.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> Date: Tue, 26 Jan 2021 22:33:37 +0100 In-Reply-To: <87ft2xzu1g.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> ("=?UTF-8?Q?Nicol=C3=B2?= Balzarotti"'s message of "Tue, 19 Jan 2021 00:47:55 +0100") Message-ID: <87wnvzwfgu.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Nicol=C3=B2, Nicol=C3=B2 Balzarotti skribis: > This patch series adds julia-json together with its dependencies. Neat. I looked at it quickly and it LGTM. Nitpicks: > + (synopsis "Julia implementation of associative containers that prese= rve > +insertion order") Maybe remove =E2=80=9CJulia implementation of=E2=80=9D. > + (description "This package implements OrderedDicts and OrderedSets, = which Ideally use @code for identifiers. > + (synopsis "Fixed point types for julia") s/julia/Julia/ > + (synopsis "JSON parsing and printing") > + (description "Parsing and printing JSON in pure Julia.") Please make that a full sentence. If you=E2=80=99re confident with the licenses and =E2=80=98guix lint=E2=80= =99 is happy, please push! Nice to see more Julia packages. Ludo=E2=80=99. From unknown Sat Aug 16 18:44:40 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45972] [PATCH] Add julia-json with dependencies Resent-From: =?UTF-8?Q?Nicol=C3=B2?= Balzarotti Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 26 Jan 2021 23:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45972 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 45972@debbugs.gnu.org Received: via spool by 45972-submit@debbugs.gnu.org id=B45972.161170344232415 (code B ref 45972); Tue, 26 Jan 2021 23:25:01 +0000 Received: (at 45972) by debbugs.gnu.org; 26 Jan 2021 23:24:02 +0000 Received: from localhost ([127.0.0.1]:42958 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4Xgk-0008QR-SO for submit@debbugs.gnu.org; Tue, 26 Jan 2021 18:24:02 -0500 Received: from mail-wm1-f48.google.com ([209.85.128.48]:52364) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4Xgj-0008QE-D9 for 45972@debbugs.gnu.org; Tue, 26 Jan 2021 18:23:58 -0500 Received: by mail-wm1-f48.google.com with SMTP id m187so18198wme.2 for <45972@debbugs.gnu.org>; Tue, 26 Jan 2021 15:23:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=hG5Z5cEWsnblm2k55k4dpq+jxISMK9mMjW7sEBBvA1s=; b=X5l2q+O+ilh7U+toTX+7Y/R72pLZyyeHUb9uuYW/J0yFb7apVrKWiJy/6x8JII/TmX 4qEaTkHTDIWn61QgMBZcLkP9KFl76tw8ErYW++NO2fBYCwqrguODsmFD5thMIKPS4cvJ celnSqgfsXe76TCcdxCmjqKSoIXodvlv2QqZ1tj+L2j1ONUUrGzz4repDQZRnQH3XYx5 jTLFs2Gm6HHTVVm1/pEyOhGx7Di96Tg61O3t1rTxpsTC1i2JjP+Rqfz+sx1SbKMg0qQ9 89plmA261n957WxesjVcLmxs92Juvg3oaAu4EWBbX4pHpbaTeAobXYqUXnwpMirPRMPX u7DA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=hG5Z5cEWsnblm2k55k4dpq+jxISMK9mMjW7sEBBvA1s=; b=s/b3VJYZAEpwzJpZJoZeU5BF6Ncnod3dr3yl0atDb4i114Tslouft8BfALbX8nZR5Z PFPt/sTgC75q21MfDSL4igybN1nZz+jgfifAJt+dp0OKw9z3iBlM56+tC8oabF3ltsd7 oKM55xQzzYhD08KFy5f3qSCC7xCbYOBS/eqQhDq3zAxkSOZvhdavpDjr2/EqgmsheawR D/DF/I85MYKVVLWEXITi4VNzKdMlrEXbiPCKbnqP668G6iFrZoa7+f/s+1MqOVQsjU/r L91Cl8uVghRgHn2R5FQSMGQED/h7KbhQ3pw1V0dQHWzVkZLdHd0ojMctDBF9pSiwOZ8P NE4A== X-Gm-Message-State: AOAM533viwv8jT2qZDNH9ylaoRhA/7ZBKs5vl0FcP/1KNcaC9FETuYQt zQp+KF3vKzmLQsyEPwTsLfcpHDvdf/U= X-Google-Smtp-Source: ABdhPJzLw5nmqGWmkZRe3ydgfIjFNFFloryR7K2OQtFEIQdHak21r5Kvr7vH6aqaNrl+R9wMkqCy8A== X-Received: by 2002:a7b:c942:: with SMTP id i2mr1629353wml.51.1611703431760; Tue, 26 Jan 2021 15:23:51 -0800 (PST) Received: from guixSD (host-79-41-162-131.retail.telecomitalia.it. [79.41.162.131]) by smtp.gmail.com with ESMTPSA id l18sm114420wme.37.2021.01.26.15.23.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Jan 2021 15:23:50 -0800 (PST) From: =?UTF-8?Q?Nicol=C3=B2?= Balzarotti In-Reply-To: <87wnvzwfgu.fsf@gnu.org> References: <87ft2xzu1g.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <87wnvzwfgu.fsf@gnu.org> Date: Wed, 27 Jan 2021 00:23:44 +0100 Message-ID: <87lfcfcmf3.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: I applied all your suggestions :) > If =?UTF-8?Q?you=E2=80=99re?= confident with the licenses and =?UTF-8?Q?=E2=80=98guix_?= =?UTF-8?Q?lint=E2=80=99?= 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 [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (anothersms[at]gmail.com) 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: nixo.xyz (xyz)] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.128.48 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.128.48 listed in wl.mailspike.net] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable I applied all your suggestions :) > If you=E2=80=99re confident with the licenses and =E2=80=98guix lint=E2= =80=99 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 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=v2-0001-guix-build-system-julia-Enable-tests.patch >From a374ec23346cca7ff6f28c8141102f8838db649a Mon Sep 17 00:00:00 2001 From: nixo 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 --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=v2-0002-gnu-julia-compat-Update-to-3.25.0.patch Content-Transfer-Encoding: quoted-printable >From 46cc28fe6d532c64006b6fea88604b198acec278 Mon Sep 17 00:00:00 2001 From: nixo 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 =C2=A9 2020 Nicol=C3=B2 Balzarotti +;;; Copyright =C2=A9 2020, 2021 Nicol=C3=B2 Balzarotti ;;; ;;; 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") --=20 2.30.0 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=v2-0003-gnu-Add-julia-orderedcollections.patch >From cecf5b2739226f06bfe9ff8df55207306e1db2b8 Mon Sep 17 00:00:00 2001 From: nixo 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 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=v2-0004-gnu-Add-julia-datastructures.patch >From ea24edc3e10695100a3c486736a2e4647316edf0 Mon Sep 17 00:00:00 2001 From: nixo 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 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=v2-0005-gnu-Add-julia-fixedpointnumbers.patch >From 431b0bb4d5b15c6b7121dcad56a81bef0f3c9aec Mon Sep 17 00:00:00 2001 From: nixo 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 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=v2-0006-gnu-Add-julia-parsers.patch >From 1814f61130c39eba91507fe5bde654e99d9c7421 Mon Sep 17 00:00:00 2001 From: nixo 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 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=v2-0007-gnu-Add-julia-adapt.patch >From 985de9540ffc4ed5351f9b884e95fea920d9e325 Mon Sep 17 00:00:00 2001 From: nixo 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 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=v2-0008-gnu-Add-julia-offsetarrays.patch >From fed9e5fe47495120b49c35535bc9d26fdd065760 Mon Sep 17 00:00:00 2001 From: nixo 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 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=v2-0009-gnu-Add-julia-json.patch >From aa1231bb89d1a7271181d437ebe36952ec8ccfc4 Mon Sep 17 00:00:00 2001 From: nixo 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 --=-=-=-- From unknown Sat Aug 16 18:44:40 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45972] [PATCH] Add julia-json with dependencies Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 27 Jan 2021 22:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45972 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: =?UTF-8?Q?Nicol=C3=B2?= Balzarotti Cc: 45972@debbugs.gnu.org Received: via spool by 45972-submit@debbugs.gnu.org id=B45972.161178723829503 (code B ref 45972); Wed, 27 Jan 2021 22:41:02 +0000 Received: (at 45972) by debbugs.gnu.org; 27 Jan 2021 22:40:38 +0000 Received: from localhost ([127.0.0.1]:46388 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4tUM-0007fn-A8 for submit@debbugs.gnu.org; Wed, 27 Jan 2021 17:40:38 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39250) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4tUK-0007fZ-P3 for 45972@debbugs.gnu.org; Wed, 27 Jan 2021 17:40:37 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56927) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4tUF-0001IH-FY; Wed, 27 Jan 2021 17:40:31 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=51400 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l4tUE-0008LC-Vt; Wed, 27 Jan 2021 17:40:31 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87ft2xzu1g.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <87wnvzwfgu.fsf@gnu.org> <87lfcfcmf3.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 8 =?UTF-8?Q?Pluvi=C3=B4se?= an 229 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 27 Jan 2021 23:40:28 +0100 In-Reply-To: <87lfcfcmf3.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> ("=?UTF-8?Q?Nicol=C3=B2?= Balzarotti"'s message of "Wed, 27 Jan 2021 00:23:44 +0100") Message-ID: <87mtwut34z.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Nicol=C3=B2 Balzarotti skribis: > 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. Great. > This is the first batch, I finally decided to submit in small batches > the 100+ packages I have; you have been warned :D Oh, fun! :-) So, actually, we have a problem: > +(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/OrderedCollection= s.jl") > + (commit (string-append "v" version)))) > + (file-name "OrderedCollections") I was surprised that =E2=80=98guix lint=E2=80=99 doesn=E2=80=99t complain a= bout this file name, I thought it required the file name to match the package name and at least that=E2=80=99s the spirit (I=E2=80=99ll take a look). Anyway, I went ahead and replaced all these by (git-file-name name version) as is done elsewhere. But now the tests would fail like so: --8<---------------cut here---------------start------------->8--- starting phase `check' ERROR: LoadError: ArgumentError: Package Adapt not found in current path: - Run `import Pkg; Pkg.add("Adapt")` to install the Adapt package. --8<---------------cut here---------------end--------------->8--- My understanding is that the first patch expects the source file name to match the Julia package name. IMO, that shouldn=E2=80=99t be the case. Ca= n we either extract the Julia package name from metadata that=E2=80=99s in the package itself (?), or otherwise pass it to all the phases via =E2=80=98julia-build-system=E2=80=99? Sorry for not noticing earlier! Thanks, Ludo=E2=80=99. From unknown Sat Aug 16 18:44:40 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45972] [PATCH] Add julia-json with dependencies Resent-From: =?UTF-8?Q?Nicol=C3=B2?= Balzarotti Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 28 Jan 2021 00:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45972 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 45972@debbugs.gnu.org Received: via spool by 45972-submit@debbugs.gnu.org id=B45972.161179383423580 (code B ref 45972); Thu, 28 Jan 2021 00:31:02 +0000 Received: (at 45972) by debbugs.gnu.org; 28 Jan 2021 00:30:34 +0000 Received: from localhost ([127.0.0.1]:46534 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4vCj-00068G-VS for submit@debbugs.gnu.org; Wed, 27 Jan 2021 19:30:34 -0500 Received: from mail-wr1-f47.google.com ([209.85.221.47]:39416) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4vCi-000683-Fr for 45972@debbugs.gnu.org; Wed, 27 Jan 2021 19:30:32 -0500 Received: by mail-wr1-f47.google.com with SMTP id a1so3750455wrq.6 for <45972@debbugs.gnu.org>; Wed, 27 Jan 2021 16:30:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=Hi1Z9Th2lnO72uuzpTCiXlvJloNDxPMQ6FsUD5lcAG8=; b=Q9nCrYiwenNIuUCYEQTHdRw99dBI7D/uXmn7aKQjSTLMEzO7chqdoF9W/gG9/jCa6c FrfTIVPW35+TJKaTVAq6Gup4xronE4avG4f7s8vg1b0Wn5JsFJ+Go0Y2Zx9uESfqFYtT MTTIcne8D5v3eEVpKJKqH8lRmdvh+QtWfd7xnakbJRfMNJ97jOgDXff6+xLYiPIIAp5W KlhHkQYzEoHULmSM1VMIUswH2Xm52K6VixVpXJn4jxjc75cpCq6Mp7Iuthdm/p7XgyEl Rx9B1MkS1uZX622TCOPnOoH7FIXFR8EHhWmnfS0h9nZ8k41AjwdiFJ/CcB2CrSStnS2t DMRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=Hi1Z9Th2lnO72uuzpTCiXlvJloNDxPMQ6FsUD5lcAG8=; b=a7npkbiqPCVaQnloJAi0DppH86BjpiZkkA6okeGth524DN268f5aUNWPmbSqTeN/+P E5T8nG/gyL5vCyUJgowckfS0XBs6jqk/Mplg+9N3pOczf9OSgiQNzpZ6CPwFjDJmDkQm nWZUS4ThUn+jzYfeXyDSxdZPj7wmupk9WbOJFxD7g/4fMZYuxmI9bkIo6PsC12LltKvW zI3fg+FqvBXC09jUDD1Mrvf5+TQmKfZUY8XbQ9V3Gg/K514O9Xo28PEFVZv9/uQt+fOx WTKgll95yB5m/Chgnm2axDJ22DG6VjQ2vusGqBvhGMwHLKfX/AkGCTL7KPR5rxvC6j8H gXzA== X-Gm-Message-State: AOAM530Fh0X36mdsGFdDROKH7Gwei/TKwlmPpXRBYJ8hyQmdGDrscOMR 2RuyEv9kszjjSNPFr02B8qgSg8HhTbQ= X-Google-Smtp-Source: ABdhPJxVg7W1U6Ju7jvnIRfL3Io1nK9Eye4SBZgskOyt47ciQ/rlhd/A0i05gHoESZj4QG36s0nT7w== X-Received: by 2002:adf:dfc7:: with SMTP id q7mr13537957wrn.153.1611793826640; Wed, 27 Jan 2021 16:30:26 -0800 (PST) Received: from guixSD (host-87-4-165-57.retail.telecomitalia.it. [87.4.165.57]) by smtp.gmail.com with ESMTPSA id r124sm4176343wmr.16.2021.01.27.16.30.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jan 2021 16:30:25 -0800 (PST) From: =?UTF-8?Q?Nicol=C3=B2?= Balzarotti In-Reply-To: <87mtwut34z.fsf@gnu.org> References: <87ft2xzu1g.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <87wnvzwfgu.fsf@gnu.org> <87lfcfcmf3.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <87mtwut34z.fsf@gnu.org> Date: Thu, 28 Jan 2021 01:30:24 +0100 Message-ID: <87czxpdhsv.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > My understanding is that the first patch expects the source file name to > match the Julia package name. That's correct, we use it in the build system. > IMO, that shouldn=E2=80=99t be the case. At first I wasn't sure it was ok, but it went on through the revision process when I submitted the first package (Compat) so I tought it was fine. > Can we either extract the Julia package name from metadata that=E2=80=99s= in > the package itself (?), or otherwise pass it to all the phases via > =E2=80=98julia-build-system=E2=80=99? Sure, I'd just read it from Package.toml (nowadays almost all the packages have this file, and for when it's missing we also have the julia-create-package-toml procedure that creates it). The file is toml, but I don't see a toml parser in guix. So, I'd use a function like the following: #+begin_src scheme (define (package.toml->name file) (call-with-input-file file (lambda (in) (let loop ((line (read-line in 'concat))) (if (eof-object? line) #f ;What to do? (let ((m (string-match "name\\s*=3D\\s*\"(.*)\"" line))) (if m (match:substring m 1) (loop (read-line in 'concat))))))))) #+end_src As you can see this is very minimal/naive (takes the first name =3D "" occurrence, does not even consider comments, for which I'd add a negative lookahead "^(?!#)" which I can't get to work with ice-9 regex), but tested on a few packages it working. I don't know what to do when the match is not found (since it's something that might happen only during development, the #f fallback should not be too bad, btw, as the build will fail). The other way I think this is easily solvable is by asking julia directly, by reading the output of: (invoke-julia "using Pkg; Pkg.TOML.parsefile("Project.toml")["name"] |> pri= ntln") doing something like cargo's manifest-target procedure does. But it'd go the other way if it's ok. Let me know! Once decided, I'll submit the updated patches > > Sorry for not noticing earlier! > np and thanks again! From unknown Sat Aug 16 18:44:40 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45972] [PATCH] Add julia-json with dependencies Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 28 Jan 2021 13:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45972 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: =?UTF-8?Q?Nicol=C3=B2?= Balzarotti Cc: 45972@debbugs.gnu.org Received: via spool by 45972-submit@debbugs.gnu.org id=B45972.161183944324528 (code B ref 45972); Thu, 28 Jan 2021 13:11:02 +0000 Received: (at 45972) by debbugs.gnu.org; 28 Jan 2021 13:10:43 +0000 Received: from localhost ([127.0.0.1]:47529 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l574N-0006NX-8N for submit@debbugs.gnu.org; Thu, 28 Jan 2021 08:10:43 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l574J-0006NJ-FG for 45972@debbugs.gnu.org; Thu, 28 Jan 2021 08:10:42 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41501) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l574E-0001gN-B3; Thu, 28 Jan 2021 08:10:34 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=58000 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l573w-00042p-U1; Thu, 28 Jan 2021 08:10:21 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87ft2xzu1g.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <87wnvzwfgu.fsf@gnu.org> <87lfcfcmf3.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <87mtwut34z.fsf@gnu.org> <87czxpdhsv.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 9 =?UTF-8?Q?Pluvi=C3=B4se?= an 229 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 28 Jan 2021 14:10:15 +0100 In-Reply-To: <87czxpdhsv.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> ("=?UTF-8?Q?Nicol=C3=B2?= Balzarotti"'s message of "Thu, 28 Jan 2021 01:30:24 +0100") Message-ID: <87h7n1qkaw.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Buon giorno! Nicol=C3=B2 Balzarotti skribis: >> My understanding is that the first patch expects the source file name to >> match the Julia package name. > > That's correct, we use it in the build system. > >> IMO, that shouldn=E2=80=99t be the case. > > At first I wasn't sure it was ok, but it went on through the revision > process when I submitted the first package (Compat) so I tought it was fi= ne. If it was me it was probably an oversight, I=E2=80=99m sorry about that. >> Can we either extract the Julia package name from metadata that=E2=80=99= s in >> the package itself (?), or otherwise pass it to all the phases via >> =E2=80=98julia-build-system=E2=80=99? > > Sure, I'd just read it from Package.toml (nowadays almost all the > packages have this file, and for when it's missing we also have the > julia-create-package-toml procedure that creates it). > > The file is toml, but I don't see a toml parser in guix. So, I'd use a > function like the following: > > #+begin_src scheme > (define (package.toml->name file) > (call-with-input-file file > (lambda (in) > (let loop ((line (read-line in 'concat))) > (if (eof-object? line) > #f ;What to do? > (let ((m (string-match "name\\s*=3D\\s*\"(.*)\"" line))) > (if m (match:substring m 1) > (loop (read-line in 'concat))))))))) > #+end_src Sounds reasonable to me. If I understand the toml format correctly, =E2=80=9Cname=3D.*=E2=80=9D is guaranteed to be on a line on its own, so th= at looks safe. > As you can see this is very minimal/naive (takes the first name =3D "" > occurrence, does not even consider comments, for which I'd add a > negative lookahead "^(?!#)" which I can't get to work with ice-9 regex), > but tested on a few packages it working. I don't know what to do when > the match is not found (since it's something that might happen only > during development, the #f fallback should not be too bad, btw, as the > build will fail). Yes, sounds good. To be on the safe side, we can add a #:julia-package-name parameter to the build system; it would default to #f, in which case the name is extracted from the toml file. > The other way I think this is easily solvable is by asking julia > directly, by reading the output of: > > (invoke-julia "using Pkg; Pkg.TOML.parsefile("Project.toml")["name"] |> p= rintln") > > doing something like cargo's manifest-target procedure does. But it'd > go the other way if it's ok. Yeah, the basic =E2=80=9Cparser=E2=80=9D seems to be good enough. Thanks! Ludo=E2=80=99. From unknown Sat Aug 16 18:44:40 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45972] [PATCH] Add julia-json with dependencies Resent-From: =?UTF-8?Q?Nicol=C3=B2?= Balzarotti Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 28 Jan 2021 15:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45972 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 45972@debbugs.gnu.org Received: via spool by 45972-submit@debbugs.gnu.org id=B45972.16118482708613 (code B ref 45972); Thu, 28 Jan 2021 15:38:01 +0000 Received: (at 45972) by debbugs.gnu.org; 28 Jan 2021 15:37:50 +0000 Received: from localhost ([127.0.0.1]:49445 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l59Me-0002Ej-20 for submit@debbugs.gnu.org; Thu, 28 Jan 2021 10:37:50 -0500 Received: from mail-wr1-f49.google.com ([209.85.221.49]:46312) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l59Mb-0002ES-CE for 45972@debbugs.gnu.org; Thu, 28 Jan 2021 10:37:42 -0500 Received: by mail-wr1-f49.google.com with SMTP id q7so5804037wre.13 for <45972@debbugs.gnu.org>; Thu, 28 Jan 2021 07:37:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=m5Y26WQWZE4sIRB9vDwKeFVbPjt707Yrxy+DDUIfxVo=; b=kqJg2yolXEKtx615Lhqbf2sdzOWUjbb5EGzdwTpkeXPsMLkAhsL5820E2ewi5pML/z OWO3RyHm4vXC7CNG1jurBThPprubdOn/vHy56iEFlL9SJsuRCoKriw4TjUdbmd6Jkcee EBZGvF96buvXyqQmQ2eZR74/TFbqk2szuDkQJwMVl3ew21jVDUlX0sHVQRJeIzqcFjML ZEXeRVtiXNJF4LcoK3s7Xmd8QTUW2btXL7J5bxfVlztM/pEu+fGW4miDmG+qTyWJymqs FnR0HcDnG4vbc+JUd+FDP0QClZcrl1t+EINQjnf797eVaAEkicykaW87KFrw91u3mw2u fPqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=m5Y26WQWZE4sIRB9vDwKeFVbPjt707Yrxy+DDUIfxVo=; b=ZfOWOuGioV/WaZhBiuhWKMU6uvO8UoY8RGR+z8KqSxrMry+S1oWsTvIkf+r5OvlwOs ao2XLetz8hDeG8LFRUGHV0Ytt0StQg9ws4cRvmzkp0I6bRFZKNIasBhUM6vSroh2FSX6 KmN172plZ6xzhtRW/PO9fMGiTUVuezyjL7pf64gmIAzQNyf70JlhZ+7/pB1v8vmQOqtC 3GDWHhS5KBDewO1YDSL9ySodunaeODPgxNjHshpsGd4fFGqxQCmHBjCpevcTMjfVbafY HKK7tvv87tExOf6SNeil8w7J64dE+UlPd/c9F8EfLwI/DqKZczviJmbERwtOT6RqKu2I GXng== X-Gm-Message-State: AOAM5313nlIawENDzx9aIfohTo5gHujbdPCy6YjtRMNw6S+T7t1W+AVl XqJfEDohaCexsprFLp/CNQrUcXQ964IIiA== X-Google-Smtp-Source: ABdhPJxXcqDXFBjBBkhFJs1dGV26if1sZ4V5M2cP/635pglS9x13ictXK6g4lJBvN1NU1uGyX7MxPA== X-Received: by 2002:a5d:6712:: with SMTP id o18mr16618107wru.375.1611848255417; Thu, 28 Jan 2021 07:37:35 -0800 (PST) Received: from guixSD (host-87-4-165-57.retail.telecomitalia.it. [87.4.165.57]) by smtp.gmail.com with ESMTPSA id o9sm7650714wrw.81.2021.01.28.07.37.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jan 2021 07:37:33 -0800 (PST) From: =?UTF-8?Q?Nicol=C3=B2?= Balzarotti In-Reply-To: <87h7n1qkaw.fsf@gnu.org> References: <87ft2xzu1g.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <87wnvzwfgu.fsf@gnu.org> <87lfcfcmf3.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <87mtwut34z.fsf@gnu.org> <87czxpdhsv.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <87h7n1qkaw.fsf@gnu.org> Date: Thu, 28 Jan 2021 16:37:32 +0100 Message-ID: <87y2gdax8j.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Ludovic =?UTF-8?Q?Court=C3=A8s?= writes: > Buon giorno! > >>> IMO, that =?UTF-8?Q?shouldn=E2=80=99t?= be the case. > If it was me it was probably an oversight, =?UTF-8?Q?I=E2=80=99m?= sorry about that. No problem! It appeared also in the manual so I fixed it Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: nixo.xyz (xyz)] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (anothersms[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.221.49 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.221.49 listed in wl.mailspike.net] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Buon giorno! > >>> IMO, that shouldn=E2=80=99t be the case. > If it was me it was probably an oversight, I=E2=80=99m sorry about that. No problem! It appeared also in the manual so I fixed it > >>> Can we either extract the Julia package name from metadata that=E2=80= =99s in >>> the package itself (?), or otherwise pass it to all the phases via >>> =E2=80=98julia-build-system=E2=80=99? > > Sounds reasonable to me. If I understand the toml format correctly, > =E2=80=9Cname=3D.*=E2=80=9D is guaranteed to be on a line on its own, so = that looks > safe. exactly > > To be on the safe side, we can add a #:julia-package-name parameter to > the build system; it would default to #f, in which case the name is > extracted from the toml file. > Done, I attached the updated patch set! --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=v4-0001-guix-build-system-julia-Enable-tests.patch >From ea999a33f5b70bb98c890bdc92f6755ad56694a1 Mon Sep 17 00:00:00 2001 From: nixo Date: Mon, 18 Jan 2021 23:56:54 +0100 Subject: [PATCH v4 01/11] 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. * doc/guix.texi (julia-build-system): Update accordingly. --- doc/guix.texi | 2 +- guix/build-system/julia.scm | 2 +- guix/build/julia-build-system.scm | 27 +++++++++++++++++---------- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index dc41fe9aea..a7ae9b60a7 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -7619,7 +7619,7 @@ implements the build procedure used by @uref{https://julialang.org/, julia} packages, which essentially is similar to running @samp{julia -e 'using Pkg; Pkg.add(package)'} in an environment where @env{JULIA_LOAD_PATH} contains the paths to all Julia package inputs. -Tests are run with @code{Pkg.test}. +Tests are run by calling @code{/test/runtests.jl}. Julia packages require the source @code{file-name} to be the real name of the package, correctly capitalized. 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 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=v4-0002-guix-julia-build-system-Don-t-rely-on-file-name-t.patch >From e7af058c7c162a2d2e755e5b9e39fd8016d2a1ae Mon Sep 17 00:00:00 2001 From: nixo Date: Thu, 28 Jan 2021 16:13:33 +0100 Subject: [PATCH v4 02/11] guix: julia-build-system: Don't rely on file-name to set module name. * guix/build/julia-build-system.scm (project.toml->name): New procedure. (precompile, check, julia-build): Accept new key argument #:julia-package-name. * guix/build-system/julia.scm (julia-build): ... add it. * doc/guix.texi (julia-build-system): Update julia-package-name accordingly. --- doc/guix.texi | 5 +++-- guix/build-system/julia.scm | 4 +++- guix/build/julia-build-system.scm | 35 ++++++++++++++++++++++++------- 3 files changed, 34 insertions(+), 10 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index a7ae9b60a7..64451c6de5 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -7621,8 +7621,9 @@ julia} packages, which essentially is similar to running @samp{julia -e @env{JULIA_LOAD_PATH} contains the paths to all Julia package inputs. Tests are run by calling @code{/test/runtests.jl}. -Julia packages require the source @code{file-name} to be the real name of the -package, correctly capitalized. +The Julia package name is read from the file @file{Project.toml}. This +value can be overridden by passing the argument @code{#:julia-file-name} +(which must be correctly capitalized). For packages requiring shared library dependencies, you may need to write the @file{/deps/deps.jl} file manually. It's usually a line of @code{const diff --git a/guix/build-system/julia.scm b/guix/build-system/julia.scm index d3cb41c054..63cb7cd864 100644 --- a/guix/build-system/julia.scm +++ b/guix/build-system/julia.scm @@ -82,6 +82,7 @@ (search-paths '()) (system (%current-system)) (guile #f) + (julia-package-name #f) (imported-modules %julia-build-system-modules) (modules '((guix build julia-build-system) (guix build utils)))) @@ -103,7 +104,8 @@ #:outputs %outputs #:search-paths ',(map search-path-specification->sexp search-paths) - #:inputs %build-inputs))) + #:inputs %build-inputs + #:julia-package-name ,julia-package-name))) (define guile-for-build (match guile diff --git a/guix/build/julia-build-system.scm b/guix/build/julia-build-system.scm index 61817e0b47..8f57045a8c 100644 --- a/guix/build/julia-build-system.scm +++ b/guix/build/julia-build-system.scm @@ -21,6 +21,8 @@ #:use-module ((guix build gnu-build-system) #:prefix gnu:) #:use-module (guix build utils) #:use-module (ice-9 match) + #:use-module (ice-9 regex) + #:use-module (ice-9 rdelim) #:export (%standard-phases julia-create-package-toml julia-build)) @@ -37,18 +39,34 @@ ;; subpath where we store the package content (define %package-path "/share/julia/packages/") -(define* (install #:key source inputs outputs #:allow-other-keys) +(define (project.toml->name file) + "Look for Julia package name in the TOML file FILE (usually named +Project.toml)." + (call-with-input-file file + (lambda (in) + (let loop ((line (read-line in 'concat))) + (if (eof-object? line) + #f + (let ((m (string-match "name\\s*=\\s*\"(.*)\"" line))) + (if m (match:substring m 1) + (loop (read-line in 'concat))))))))) + +(define* (install #:key source inputs outputs julia-package-name + #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (package-dir (string-append out %package-path - (strip-store-file-name source)))) + (or + julia-package-name + (project.toml->name "Project.toml"))))) (mkdir-p package-dir) (copy-recursively (getcwd) package-dir)) #t) -(define* (precompile #:key source inputs outputs #:allow-other-keys) +(define* (precompile #:key source inputs outputs julia-package-name + #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (builddir (string-append out "/share/julia/")) - (package (strip-store-file-name source))) + (package (or julia-package-name (project.toml->name "Project.toml")))) (mkdir-p builddir) ;; With a patch, SOURCE_DATE_EPOCH is honored (setenv "SOURCE_DATE_EPOCH" "1") @@ -69,10 +87,11 @@ (string-append "pushfirst!(DEPOT_PATH, pop!(DEPOT_PATH)); using " package))) #t) -(define* (check #:key tests? source inputs outputs #:allow-other-keys) +(define* (check #:key tests? source inputs outputs julia-package-name + #:allow-other-keys) (when tests? (let* ((out (assoc-ref outputs "out")) - (package (strip-store-file-name source)) + (package (or julia-package-name (project.toml->name "Project.toml"))) (builddir (string-append out "/share/julia/"))) ;; With a patch, SOURCE_DATE_EPOCH is honored (setenv "SOURCE_DATE_EPOCH" "1") @@ -127,9 +146,11 @@ version = \"" version "\" (delete 'patch-usr-bin-file) (delete 'build))) -(define* (julia-build #:key inputs (phases %standard-phases) +(define* (julia-build #:key inputs julia-package-name + (phases %standard-phases) #:allow-other-keys #:rest args) "Build the given Julia package, applying all of PHASES in order." (apply gnu:gnu-build #:inputs inputs #:phases phases + #:julia-package-name julia-package-name args)) -- 2.30.0 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=v4-0003-gnu-julia-xyz-julia-compat-Set-file-name-accordin.patch >From 8512ee370db8d8aaf7457a28db3d57778210c484 Mon Sep 17 00:00:00 2001 From: nixo Date: Thu, 28 Jan 2021 16:23:29 +0100 Subject: [PATCH v4 03/11] gnu: julia-xyz (julia-compat): Set file-name according to standards. * gnu/packages/julia-xyz.scm (): New variable. --- gnu/packages/julia-xyz.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm index f1da66a4be..f00faf6223 100644 --- a/gnu/packages/julia-xyz.scm +++ b/gnu/packages/julia-xyz.scm @@ -32,7 +32,7 @@ (uri (git-reference (url "https://github.com/JuliaLang/Compat.jl") (commit (string-append "v" version)))) - (file-name "Compat") + (file-name (git-file-name name version)) (sha256 (base32 "01vwjr2134bzgnaxwd67knbibbhnfgnqjw7gxrp29s6y2a6j3882")))) (build-system julia-build-system) -- 2.30.0 --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=v4-0004-gnu-julia-compat-Update-to-3.25.0.patch Content-Transfer-Encoding: quoted-printable >From 0c02cfcca23a9e7a96edbbfcc78ed4637a6d0ec5 Mon Sep 17 00:00:00 2001 From: nixo Date: Mon, 18 Jan 2021 17:42:50 +0100 Subject: [PATCH v4 04/11] 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 f00faf6223..7836489e15 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 =C2=A9 2020 Nicol=C3=B2 Balzarotti +;;; Copyright =C2=A9 2020, 2021 Nicol=C3=B2 Balzarotti ;;; ;;; 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 (git-file-name name version)) (sha256 - (base32 "01vwjr2134bzgnaxwd67knbibbhnfgnqjw7gxrp29s6y2a6j3882")))) + (base32 "1m4r5i8mq29xjp3mllh6047n5a78sdyld57m15anrnsjgaapcgby")))) (build-system julia-build-system) (home-page "https://github.com/JuliaLang/Compat.jl") (synopsis "Compatibility across Julia versions") --=20 2.30.0 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=v4-0005-gnu-Add-julia-orderedcollections.patch >From cc301e31e2fead723bd3a1d2a47ac8d31012de5d Mon Sep 17 00:00:00 2001 From: nixo Date: Mon, 18 Jan 2021 18:11:42 +0100 Subject: [PATCH v4 05/11] 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 7836489e15..ab5bba1bda 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 (git-file-name name version)) + (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 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=v4-0006-gnu-Add-julia-datastructures.patch >From 373e5eddc67703d3315c19dd0f26609bd5a7dbc2 Mon Sep 17 00:00:00 2001 From: nixo Date: Mon, 18 Jan 2021 18:17:50 +0100 Subject: [PATCH v4 06/11] 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 ab5bba1bda..bd7802b814 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 (git-file-name name version)) + (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 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=v4-0007-gnu-Add-julia-fixedpointnumbers.patch >From c012a27c414e6568b4db8338b914862ed6da007b Mon Sep 17 00:00:00 2001 From: nixo Date: Mon, 18 Jan 2021 18:25:02 +0100 Subject: [PATCH v4 07/11] 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 bd7802b814..b28906b546 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 (git-file-name name version)) + (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 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=v4-0008-gnu-Add-julia-parsers.patch >From 1a116a54820f5e0434bdffb7bdb837035a76c89d Mon Sep 17 00:00:00 2001 From: nixo Date: Mon, 18 Jan 2021 18:27:32 +0100 Subject: [PATCH v4 08/11] 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 b28906b546..9a615aba58 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 (git-file-name name version)) + (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 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=v4-0009-gnu-Add-julia-adapt.patch >From 63d2bd90609ecddb25e9dd3c646739c1912e6e45 Mon Sep 17 00:00:00 2001 From: nixo Date: Mon, 18 Jan 2021 23:46:51 +0100 Subject: [PATCH v4 09/11] 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 9a615aba58..2e0efb0b5a 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 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=v4-0010-gnu-Add-julia-offsetarrays.patch >From 6e5c1ccfd8a805e8b0b16ddeb4d56fc8f738b078 Mon Sep 17 00:00:00 2001 From: nixo Date: Tue, 19 Jan 2021 00:01:28 +0100 Subject: [PATCH v4 10/11] 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 2e0efb0b5a..3dd731ef28 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 (git-file-name name version)) + (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 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=v4-0011-gnu-Add-julia-json.patch >From 3da3028123253ebe69017607e3dc7c8825b47c51 Mon Sep 17 00:00:00 2001 From: nixo Date: Tue, 19 Jan 2021 00:06:34 +0100 Subject: [PATCH v4 11/11] 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 3dd731ef28..34dba958ce 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 (git-file-name name version)) + (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 --=-=-=-- From unknown Sat Aug 16 18:44:40 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: =?UTF-8?Q?Nicol=C3=B2?= Balzarotti Subject: bug#45972: closed (Re: bug#45972: [PATCH] Add julia-json with dependencies) Message-ID: References: <87k0rufrco.fsf_-_@gnu.org> <87ft2xzu1g.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> X-Gnu-PR-Message: they-closed 45972 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 45972@debbugs.gnu.org Date: Sat, 30 Jan 2021 14:11:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1612015861-26302-1" This is a multi-part message in MIME format... ------------=_1612015861-26302-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #45972: [PATCH] Add julia-json with dependencies which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 45972@debbugs.gnu.org. --=20 45972: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D45972 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1612015861-26302-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 45972-done) by debbugs.gnu.org; 30 Jan 2021 14:10:48 +0000 Received: from localhost ([127.0.0.1]:54174 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5qxb-0006po-0X for submit@debbugs.gnu.org; Sat, 30 Jan 2021 09:10:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41768) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5qxY-0006pb-4w for 45972-done@debbugs.gnu.org; Sat, 30 Jan 2021 09:10:46 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44700) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5qxO-0004xm-UE; Sat, 30 Jan 2021 09:10:35 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=35410 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l5qx7-0008Ir-98; Sat, 30 Jan 2021 09:10:29 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: =?utf-8?Q?Nicol=C3=B2?= Balzarotti Subject: Re: bug#45972: [PATCH] Add julia-json with dependencies References: <87ft2xzu1g.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <87wnvzwfgu.fsf@gnu.org> <87lfcfcmf3.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <87mtwut34z.fsf@gnu.org> <87czxpdhsv.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <87h7n1qkaw.fsf@gnu.org> <87y2gdax8j.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> Date: Sat, 30 Jan 2021 15:10:15 +0100 In-Reply-To: <87y2gdax8j.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> (=?utf-8?Q?=22Nicol=C3=B2?= Balzarotti"'s message of "Thu, 28 Jan 2021 16:37:32 +0100") Message-ID: <87k0rufrco.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 45972-done Cc: 45972-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi, Nicol=C3=B2 Balzarotti skribis: > Done, I attached the updated patch set! Applied it all, thanks a lot! Ludo=E2=80=99. ------------=_1612015861-26302-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 18 Jan 2021 23:48:05 +0000 Received: from localhost ([127.0.0.1]:48790 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1eFg-0005gU-Hw for submit@debbugs.gnu.org; Mon, 18 Jan 2021 18:48:05 -0500 Received: from lists.gnu.org ([209.51.188.17]:33482) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1eFe-0005gM-SK for submit@debbugs.gnu.org; Mon, 18 Jan 2021 18:48:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45530) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1eFe-0004Kr-Jn for guix-patches@gnu.org; Mon, 18 Jan 2021 18:48:02 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:51729) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l1eFb-0004Lf-Rj for guix-patches@gnu.org; Mon, 18 Jan 2021 18:48:02 -0500 Received: by mail-wm1-x333.google.com with SMTP id h17so14800638wmq.1 for ; Mon, 18 Jan 2021 15:47:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=ZIM9feHjAyoz7B16uZZlqb/HJMoGDW2WpTbmS5cOJ60=; b=MxxN8I3K6P6+E8qKOk3fJUbPQx8He7vEjve5t64Uliw3YckxYr8Arko9RuqstRr3jM aPKPrp16+j/KioPwlLajFNvyXkHxBxwf8Ij6nlsJ29w3eel57d8UJcJ36tc/ecmqgmeo oEYZ+fUBY9niktozsYlaWwAlijoW8hncgVZkEA7AyHksN5AqVeu5/zs1b0FYnonZa36Y 2G0HkR23+oRa/g9Va0zekuFNmWuCqonLclK7QMMDyXVbR9TLQsc+rot04jmMc3I4be3o zp3cFAYKtcRNtihpxWFukdDndqjfXToVngMn11JeecdARgxyjfCbCjwGhC7UDCalCr6V 9hNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=ZIM9feHjAyoz7B16uZZlqb/HJMoGDW2WpTbmS5cOJ60=; b=EJtnp+lcCol6ZP6rkMKqj90LJHgd4HioQ87XPorE1VkU+vbGJp0xR1ByiGZXimKJ58 el+LyiPt+dou8TE+RKBGm1k9KpCpkpP91jPKigJsWEH+VViyi+TtsTeUVSZqpZakaYl4 7AEDK2QgkVbKHOtvEwws38eiIlip7bO+u+3sHkMv3F7ut875E6r4eBtFeGP204wFW1/t HzkFGvlCTGyWKL+A9Gj1h9X9Z/PgzpzqGdhYtP+RrwLYxCLCd2pnDwli8mlaJ8hivHAZ xtmfu/HOzpp41w2Y9EPMzrd+J/ZwIzUQBjRxm69kYXx2w1hKWXyUHAKGjveD3QGWNIS5 YmzQ== X-Gm-Message-State: AOAM532BYS+/dNtLohkkMWTgo8Iz/2S2ZVMru99DCfVwPCUY9rEQFZ06 ECbBy3dDCj67HBrfk0XLNOudCDCvJUo= X-Google-Smtp-Source: ABdhPJyFFKeaNUYtUBx7Rj2/xYHUTbsqRSszBGU8bp6FAUNElwsbC2KgsJm7jau2nuFMkq34q83LWg== X-Received: by 2002:a1c:dec6:: with SMTP id v189mr1402977wmg.172.1611013678061; Mon, 18 Jan 2021 15:47:58 -0800 (PST) Received: from guixSD (host-95-244-15-108.retail.telecomitalia.it. [95.244.15.108]) by smtp.gmail.com with ESMTPSA id m18sm33258712wrw.43.2021.01.18.15.47.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jan 2021 15:47:56 -0800 (PST) From: =?utf-8?Q?Nicol=C3=B2_Balzarotti?= To: guix-patches@gnu.org Subject: [PATCH] Add julia-json with dependencies Date: Tue, 19 Jan 2021 00:47:55 +0100 Message-ID: <87ft2xzu1g.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=anothersms@gmail.com; helo=mail-wm1-x333.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.6 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi guix! This patch series adds julia-json together with its dependencies. It also enable tests for julia packages. Thanks, Nicol=C3=B2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-guix-build-system-julia-Enable-tests.patch >From a374ec23346cca7ff6f28c8141102f8838db649a Mon Sep 17 00:00:00 2001 From: nixo Date: Mon, 18 Jan 2021 23:56:54 +0100 Subject: [PATCH 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.29.2 --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0002-gnu-julia-compat-Update-to-3.25.0.patch Content-Transfer-Encoding: quoted-printable >From 46cc28fe6d532c64006b6fea88604b198acec278 Mon Sep 17 00:00:00 2001 From: nixo Date: Mon, 18 Jan 2021 17:42:50 +0100 Subject: [PATCH 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 =C2=A9 2020 Nicol=C3=B2 Balzarotti +;;; Copyright =C2=A9 2020, 2021 Nicol=C3=B2 Balzarotti ;;; ;;; 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") --=20 2.29.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0003-gnu-Add-julia-orderedcollections.patch >From ac384ede7faccc6ce9ac6c97522c7dbd18200b4a Mon Sep 17 00:00:00 2001 From: nixo Date: Mon, 18 Jan 2021 18:11:42 +0100 Subject: [PATCH 3/9] gnu: Add julia-orderedcollections. * gnu/packages/julia-xyz.scm (julia-orderedcollections): 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 9a4bf7c678..d3c1f35996 100644 --- a/gnu/packages/julia-xyz.scm +++ b/gnu/packages/julia-xyz.scm @@ -43,3 +43,26 @@ 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 "Julia implementation of associative containers that preserve +insertion order") + (description "This package implements OrderedDicts and OrderedSets, which +are similar to containers in base Julia. However, during iteration the +Ordered* containers return items in the order in which they were added to the +collection.") + (license license:expat))) -- 2.29.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0004-gnu-Add-julia-datastructures.patch >From 9736ab882b3348619cf3e74f4282404627dd2b64 Mon Sep 17 00:00:00 2001 From: nixo Date: Mon, 18 Jan 2021 18:17:50 +0100 Subject: [PATCH 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 d3c1f35996..fee694b1fd 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.8") + (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 "1r4xswdvnnlbp5rfa7i7k6kzgkwizvqwyz7jscvyqjylcs6wdsnc")))) + (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 implementation of Data structures") + (description "This package implements a variety of data structures, +including, CircularBuffer, Queue, Stack, Accumulators, Linked Lists, Sorted +Dicts and many others.") + (license license:expat))) + (define-public julia-orderedcollections (package (name "julia-orderedcollections") -- 2.29.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0005-gnu-Add-julia-fixedpointnumbers.patch >From 79fa1af823688da6796a12d664352a4f0512d702 Mon Sep 17 00:00:00 2001 From: nixo Date: Mon, 18 Jan 2021 18:25:02 +0100 Subject: [PATCH 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 fee694b1fd..f5c9e000db 100644 --- a/gnu/packages/julia-xyz.scm +++ b/gnu/packages/julia-xyz.scm @@ -68,6 +68,41 @@ including, CircularBuffer, Queue, Stack, Accumulators, Linked Lists, Sorted Dicts 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.29.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0006-gnu-Add-julia-parsers.patch >From f4ddd59a14cb0fcc259efbf509c2a8073adf62fc Mon Sep 17 00:00:00 2001 From: nixo Date: Mon, 18 Jan 2021 18:27:32 +0100 Subject: [PATCH 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 f5c9e000db..b887832df3 100644 --- a/gnu/packages/julia-xyz.scm +++ b/gnu/packages/julia-xyz.scm @@ -125,3 +125,23 @@ are similar to containers in base Julia. However, during iteration the 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.29.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0007-gnu-Add-julia-adapt.patch >From 358d115e218fc433b15474500a221861c9c82abb Mon Sep 17 00:00:00 2001 From: nixo Date: Mon, 18 Jan 2021 23:46:51 +0100 Subject: [PATCH 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 b887832df3..3601006976 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.0") + (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 "1qcj7i75m0wwk0xcdgf89bjymnz2dipv2iwxys8wzpvrashi6wsp")))) + (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 +T. This allows you to \"convert\" wrapper types like Adjoint to be GPU +compatible without throwing away the wrapper.") + (license license:expat))) + (define-public julia-compat (package (name "julia-compat") -- 2.29.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0008-gnu-Add-julia-offsetarrays.patch >From 06f2e7bbbff5b73493c9a0640ec4c9c6c20280c9 Mon Sep 17 00:00:00 2001 From: nixo Date: Tue, 19 Jan 2021 00:01:28 +0100 Subject: [PATCH 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 3601006976..429ab0afad 100644 --- a/gnu/packages/julia-xyz.scm +++ b/gnu/packages/julia-xyz.scm @@ -148,6 +148,31 @@ 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.1") + (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 "0pd42an8kj2mgw3sv00ijfrsvmfjfgf12lfmpan6zkdckqa73jqz")))) + (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.29.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0009-gnu-Add-julia-json.patch >From 3ebd72ef6a55ad46522fe2534b775e9b6d20130f Mon Sep 17 00:00:00 2001 From: nixo Date: Tue, 19 Jan 2021 00:06:34 +0100 Subject: [PATCH 9/9] gnu: Add julia-json. * gnu/packages/julia-xyz.scm (julia-json): 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 429ab0afad..7aba08cdb1 100644 --- a/gnu/packages/julia-xyz.scm +++ b/gnu/packages/julia-xyz.scm @@ -125,6 +125,30 @@ 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") + (description "Parsing and printing JSON in pure Julia.") + (license license:expat))) + (define-public julia-orderedcollections (package (name "julia-orderedcollections") -- 2.29.2 --=-=-=-- ------------=_1612015861-26302-1-- From unknown Sat Aug 16 18:44:40 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45972] Julia importer? Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 30 Jan 2021 14:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45972 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: =?UTF-8?Q?Nicol=C3=B2?= Balzarotti , Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 45972@debbugs.gnu.org Received: via spool by 45972-submit@debbugs.gnu.org id=B45972.161201815030471 (code B ref 45972); Sat, 30 Jan 2021 14:50:02 +0000 Received: (at 45972) by debbugs.gnu.org; 30 Jan 2021 14:49:10 +0000 Received: from localhost ([127.0.0.1]:54377 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5rYj-0007vP-Ub for submit@debbugs.gnu.org; Sat, 30 Jan 2021 09:49:10 -0500 Received: from mail-wr1-f46.google.com ([209.85.221.46]:46483) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5rYf-0007uv-WE for 45972@debbugs.gnu.org; Sat, 30 Jan 2021 09:49:08 -0500 Received: by mail-wr1-f46.google.com with SMTP id q7so11749912wre.13 for <45972@debbugs.gnu.org>; Sat, 30 Jan 2021 06:49:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=XMxcnGJBZ5rgJTWnhr5HCxkmMEmYPQX6OlyQlU4V6nM=; b=ptvn/u63iLXV+Iuu41BilPx4ZWQESWID1f3poN52nw1IuYqT5v7KXHRJdN5io0zAu6 N7QD4oE0yGp0X7Y5o5ZeGz/I5KLoS7WRpfCFCxPaqXmh3E008kyED70ukm6NF58Z6Cah IIeSsjvwvGzB8csHUnQDr9DJyalCXJ7GTjgxRycGCComlD1ohX+VywZuOskmKqhRZxEY dqx/HbzAivVrnYvHoyYp5Iv9Qt4pYZktClWmYRlY+g1Cbo0YAEWOOyaXBC8lvD59tVzt gsDuUpHjCM5XLHc3edKOIH4Wi3b0UjD02ldrwDidapILJHIkXPjWBataOW4wL1sjU7Ow zK5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=XMxcnGJBZ5rgJTWnhr5HCxkmMEmYPQX6OlyQlU4V6nM=; b=f+va9M6koCCl0WRwWCvW5UvV7t7NKSP0UCl/PKLkAbxWO8NZmaEDT/mUB/a3uFykum 42Sj1WMkhxUPzEVIB8f/uExax0wMB5lNgZOj6DSxC4CKXq7rAtqnrBCMaEp5qkPvz4/J aVvx0EEB4k7jr47y+kzmukvbQzBYwYpPKSOfvuDK8VdXCipZipq0HjDBL71sCCbyAGUY NBLvXihEIITEdgurxcvPAfcUlakXGhVb1gZZ1FIDdt6jjl+j7XR9ZZ5Fw7AS1zMFsSsI AvmWGSRQ4CylJjQb9MLga7Ct6fwoJfIwaYGv/FFYMt0KGpJdM5k+tLlhmEUMkunPcXxp hb4A== X-Gm-Message-State: AOAM533gRQcj8FBCpALvOYSzDJXCi47RFPrJH0S5F1qDL2ZHDgl1SWCY 6prEsE+xACjSxr7LxUBqYe9FW/oPuRk= X-Google-Smtp-Source: ABdhPJyyYerBPwLAgZc5CXTXMro5eRkpaZ2ruVs7enIIaOdf43uIgDr1slIcfqC06UhjSL+eJGODwA== X-Received: by 2002:a5d:55c6:: with SMTP id i6mr10162415wrw.145.1612018140053; Sat, 30 Jan 2021 06:49:00 -0800 (PST) Received: from lili ([88.126.110.68]) by smtp.gmail.com with ESMTPSA id r17sm3870643wro.46.2021.01.30.06.48.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Jan 2021 06:48:59 -0800 (PST) From: zimoun In-Reply-To: <87czxpdhsv.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> References: <87ft2xzu1g.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <87wnvzwfgu.fsf@gnu.org> <87lfcfcmf3.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <87mtwut34z.fsf@gnu.org> <87czxpdhsv.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> Date: Sat, 30 Jan 2021 15:46:02 +0100 Message-ID: <86pn1mfpp1.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, On Thu, 28 Jan 2021 at 01:30, Nicol=C3=B2 Balzarotti = wrote: > Sure, I'd just read it from Package.toml (nowadays almost all the > packages have this file, and for when it's missing we also have the > julia-create-package-toml procedure that creates it). > > The file is toml, but I don't see a toml parser in guix. So, I'd use a > function like the following: > > #+begin_src scheme > (define (package.toml->name file) > (call-with-input-file file > (lambda (in) > (let loop ((line (read-line in 'concat))) > (if (eof-object? line) > #f ;What to do? > (let ((m (string-match "name\\s*=3D\\s*\"(.*)\"" line))) > (if m (match:substring m 1) > (loop (read-line in 'concat))))))))) > #+end_src [...] > The other way I think this is easily solvable is by asking julia > directly, by reading the output of: > > (invoke-julia "using Pkg; Pkg.TOML.parsefile("Project.toml")["name"] |> p= rintln") With a bit more glue, could this be transformed into something like =E2=80=9Cjulia->guix-package=E2=80=9D? And so have a Julia package importe= r, even if it fails for some cases. WDYT? All the best, simon From unknown Sat Aug 16 18:44:40 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45972] Julia importer? Resent-From: =?UTF-8?Q?Nicol=C3=B2?= Balzarotti Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 30 Jan 2021 20:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45972 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: zimoun , Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 45972@debbugs.gnu.org Received: via spool by 45972-submit@debbugs.gnu.org id=B45972.161203760721680 (code B ref 45972); Sat, 30 Jan 2021 20:14:02 +0000 Received: (at 45972) by debbugs.gnu.org; 30 Jan 2021 20:13:27 +0000 Received: from localhost ([127.0.0.1]:55867 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5wcY-0005da-MB for submit@debbugs.gnu.org; Sat, 30 Jan 2021 15:13:27 -0500 Received: from mail-wr1-f51.google.com ([209.85.221.51]:44700) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5wcV-0005dL-3s for 45972@debbugs.gnu.org; Sat, 30 Jan 2021 15:13:25 -0500 Received: by mail-wr1-f51.google.com with SMTP id d16so12320214wro.11 for <45972@debbugs.gnu.org>; Sat, 30 Jan 2021 12:13:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=cw7ZVwwYDHEdKdVBUqkEk5QH+yTYAF7XEdZnwGHjk/M=; b=NcaJ/ewB6hDtZCf5PCGgQtGC/qirdzn1rY2Xs+Uc8BfubWo/fdr1mW0jJJ6D+fgO6N 0E+4dSHZci+iWDdiyAPGkxlV6frGzpoSnsnl77C7u/E5aDr+Cy79gKOkE7Ls9p/VkXIp Cq7fym+P7G/YtHwP/Cpt62A3F2Pu66E9ugQ1G+tqvMHRWPtb+cp1RW1SDPY/NuA7GFWr o+1XnySdKYmdRYN3C8k1fqP7rsTs7IAeYWOfWTI8J2OrtNISPEaB8kuEGWH+t+cNWTSQ IYe29AwVC+9q0L9ipozI/r/VBiq8AqvkvX4PMo9wwuKxPav2zQIVpDkV/6MqxYsPinW9 1E/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=cw7ZVwwYDHEdKdVBUqkEk5QH+yTYAF7XEdZnwGHjk/M=; b=OJyhqRj+Xm0A+U95oTB8DMGrmbYXFj/BivfizA1EouRVxdAYPA5clUeurHiad+5IxD OZfLG38/kvLIfh+ymwUVRvnEnia45aXSIUHhZUA5snNAvqiJJnbPU0Zx3dpMrM7xJKXm G/GioMXXHOb3J3NZ8XO1Oxg9oLM4yOfGGQmKRlCHx1SR6Rf7ur7REM3G9cnpTG/59+mL nOkBqVeno8oxuoJhrnUYXjBJhTKOqrsqixeQmH4sdPeyOgkcZyARO/4xQBj+uzIiSGvR OgmupSmd6/AZ8L5+sVBl/r9/C045exHs7dgDcSXGJwAVcPQtCczLzLepKuLJjiKr6zHi nPZQ== X-Gm-Message-State: AOAM530coatgUa+Wjd2T8DaRZS1LAb59RUrt/TbBMdVmNI4XhHAAanFQ Uv+85pZKSt2pNfdlQsG4xm+uh3Ihc9c= X-Google-Smtp-Source: ABdhPJwQ7M/g1+aUtZ2s5vqqZuBXaqlzAjqySN9/r2fWlferRFNo/1HXQglWghVqb567hxdB0+7u4w== X-Received: by 2002:adf:f183:: with SMTP id h3mr11084909wro.30.1612037597264; Sat, 30 Jan 2021 12:13:17 -0800 (PST) Received: from guixSD (host-87-4-165-57.retail.telecomitalia.it. [87.4.165.57]) by smtp.gmail.com with ESMTPSA id h187sm16023368wmf.30.2021.01.30.12.13.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Jan 2021 12:13:16 -0800 (PST) From: =?UTF-8?Q?Nicol=C3=B2?= Balzarotti In-Reply-To: <86pn1mfpp1.fsf@gmail.com> References: <87ft2xzu1g.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <87wnvzwfgu.fsf@gnu.org> <87lfcfcmf3.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <87mtwut34z.fsf@gnu.org> <87czxpdhsv.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <86pn1mfpp1.fsf@gmail.com> Date: Sat, 30 Jan 2021 21:13:14 +0100 Message-ID: <8735yi9o9x.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable zimoun writes: > Hi, Hi Simon! >> >> (invoke-julia "using Pkg; Pkg.TOML.parsefile("Project.toml")["name"] |> = println") > > With a bit more glue, could this be transformed into something like > =E2=80=9Cjulia->guix-package=E2=80=9D? And so have a Julia package impor= ter, even if it > fails for some cases. Well, if you mean "Can we use Pkg.jl to generate package definitions for us?" the answer is "probably yes, but I never investigated this". That line uses just Julia Base TOML.jl, which for some reason is defined inside module Pkg.jl (and it's not top-level). If you instead meant "Can we have a Julia importer?" some time ago I wrote one in Julia, I've not used it in the last year, but it did work quite well back then. I attach it here for reference. But before digging into Pkg3, I need to push a new set of packages which contains julia-jllwrappers, which is needed for Julia packages which require binary distributions to work. After that, it will be possible to create an importer that work "ok" even with packages depending on .so libraries. --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=import.jl Content-Description: julia import.jl using Pkg using Pkg.TOML using LibGit2 const base = ["Base64", "CRC32c", "Dates", "DelimitedFiles", "Distributed", "FileWatching", "Future", "InteractiveUtils", "Libdl", "LibGit2", "LinearAlgebra", "Logging", "Markdown", "Mmap", "Pkg", "Printf", "Profile", "Random", "REPL", "Serialization", "SHA", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "SuiteSparse", "Test", "Unicode", "UUIDs"] const disabled = ["WinRPM", "Homebrew", "CMake", "Docile", "Color", "HTTPClient", "ICU", "Calendar", "LegacyStrings", "Nulls"] registrypath = expanduser("~/.julia-old/registries/General/") registry = joinpath(registrypath, "Registry.toml") const register = TOML.parse(join(readlines(registry), "\n")) jlpkgname(info) = "julia-$(lowercase(info.name))" function getrev(path) versions = TOML.parse(join(readlines(path), "\n")) versionv = findmax(map(x -> VersionNumber(x), keys(versions) |> collect)) (rev = versions[string(versionv[1])]["git-tree-sha1"], ver = versionv[1]) end function getpackagebyuuid(uuid) uuid in keys(register["packages"]) || return nothing path = register["packages"][uuid]["path"] getpath(x) = joinpath(registrypath, joinpath(path, x)) package = TOML.parse(join(readlines(getpath("Package.toml")), "\n")) deppath = getpath("Deps.toml") isfile(deppath) || return nothing deps = TOML.parse(join(readlines(deppath), "\n")) (name = package["name"], uuid = package["uuid"], repo = package["repo"], deps = deps, vers = getrev(getpath("Versions.toml"))) end function getpackage(wanted) uuid = findfirst(p -> lowercase(p["name"]) == lowercase(wanted), register["packages"]) uuid == nothing && return nothing return getpackagebyuuid(uuid) end function getdeps!(deps, vers, recursive, out) flat(arr::Array) = mapreduce(x -> isa(x, Array) ? flat(x) : x, append!, arr, init=[]) v = map(p -> VersionNumber.(split(p, '-')), keys(deps) |> collect) valid = findall(x -> length(x) == 1 || (x[2] == v"0" && x[1] <= vers) || x[1] <= vers <= x[2], v) f = flat(map(x -> values(x), values(collect(values(deps))[valid]))) push!.(Ref(out), f) # if recursive # push! # end nothing end function have(info) file = "/home/nixo/git/guix/gnu/packages/julia-xyz.scm" return "(name \"" * jlpkgname(info) * "\")" in strip.(readlines(file)) end function gethash(info) wd = mktempdir() if info.name in base || info.name in disabled || have(info) return "" end println(stderr, "Cloning $(info.name) in $wd") repo = LibGit2.clone(info.repo, wd) hash = cd(wd) do out = Pipe() try LibGit2.checkout!(repo, string(LibGit2.GitHash(LibGit2.peel(LibGit2.GitCommit, LibGit2.GitTag(repo, "v" * string(info.vers.ver)))))) catch e try LibGit2.checkout!(repo, string(LibGit2.GitHash(LibGit2.peel(LibGit2.GitCommit, LibGit2.GitCommit(repo, "v" * string(info.vers.ver)))))) catch e # FIXME: if this happens, return the commit too and use it in the package println(stderr, "Failed to checkout $(e), continuing") end end run(pipeline(`guix hash -rx .`, stdout=out)) readline(out) end rm(wd, recursive = true) hash end function makepackage(info; done = []) if info === nothing @warn "Could not find package (have you cloned the registry?)" return elseif info in done return "" end push!(done, info) deps = String[] getdeps!(info.deps, info.vers.ver, true, deps) # TODO: remove deps that are in base deps = filter(x -> x !== nothing, getpackagebyuuid.(deps)) deplist = join(map(name -> "(\"$name\" ,$name)", jlpkgname.(deps)), '\n') packagedeps = join(makepackage.(deps, done = done), "") hash = gethash(info) hash == "" && return "" """ $packagedeps (define-public $(jlpkgname(info)) (package (name "$(jlpkgname(info))") (version "$(info.vers.ver)") (source (origin (method git-fetch) (uri (git-reference (url "$(info.repo)") (commit (string-append "v" version)))) (file-name "$(info.name)") (sha256 (base32 "$hash")))) (propagated-inputs `($(deplist))) (build-system julia-build-system) (home-page "$(info.repo)") (synopsis "") (description "") (license license:expat))) """ end println.(makepackage.(getpackage.(ARGS))) --=-=-=-- From unknown Sat Aug 16 18:44:40 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45972] Julia importer? Resent-From: =?UTF-8?Q?Nicol=C3=B2?= Balzarotti Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 30 Jan 2021 21:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45972 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: zimoun , Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 45972@debbugs.gnu.org Received: via spool by 45972-submit@debbugs.gnu.org id=B45972.161204297730036 (code B ref 45972); Sat, 30 Jan 2021 21:43:02 +0000 Received: (at 45972) by debbugs.gnu.org; 30 Jan 2021 21:42:57 +0000 Received: from localhost ([127.0.0.1]:55938 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5y1B-0007oO-48 for submit@debbugs.gnu.org; Sat, 30 Jan 2021 16:42:57 -0500 Received: from mail-wr1-f45.google.com ([209.85.221.45]:41569) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5y17-0007o8-Gt for 45972@debbugs.gnu.org; Sat, 30 Jan 2021 16:42:55 -0500 Received: by mail-wr1-f45.google.com with SMTP id p15so12451433wrq.8 for <45972@debbugs.gnu.org>; Sat, 30 Jan 2021 13:42:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=rKuUGNpgKVOq80x7QC2761NW4oZsSUk3K4x+ncCeKQA=; b=bFnLxnQo0o+djKQL/ULkJM/uoGwLE+tC4uPV3ROeHOo7d2RMNF1WrWs6AuLRqIUMth 6QmR230THsSeMyGPmuPLhSRAGe5YzDW959LZc9J6wNZ7m14Yx9tQ4Ng8OZ2R47+pp+tK WTbnVW0UJcXNS2kfWAcYXCLdVF8m+IAoKKQXYKMsEBMVAr3mKj/h8xD6Ktx9b/htGxNd ssd9izRpuph9KxiFPCkGORNvTpTcU09PPo+wCH/UcYiw4vglNh8lfWXytr6BE/Qm+6vi cSvuZNWlMnHaxUJJ/aTV01MZoGs4qpqOqQuGWJWxnODlvI+lxhvkch15sYl73ztasNYq /sBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=rKuUGNpgKVOq80x7QC2761NW4oZsSUk3K4x+ncCeKQA=; b=hlZ1oJCG9d3QbnwK/IEjYT1wRmnn3mUpNVOfsL3fA9moQ7tdpsr94D0EZidfKnvoaa gLLBb9M/zjE9cOuwNFsy8443NNPiqXyd6I0TCJ9aC19SD4WT8IZMKKmS1Gc9XiQXJw/E YMXdaVeiChnc7MqJYkW+1SN3h5pfWTWO1g9FT0luhyIceFth0IzKX/gh9VgXXAJeVRYP cDuvVaTnbNkWY0no7e8xjBVunorQ6zsdffkEF6veRY5deHvOYV5xis5btHEWVbjH3e+j URN5iOOuU5wHzX8K1+I7d7b97M++MnzMRdnFlXCwwNIz/T46aIbJgOqal1dNdkgIICls W9HQ== X-Gm-Message-State: AOAM530bzaHQyOD9L1C5ujkDsHjeENQtPkmAWV7Q2ot+FJVwn18e144Y grcyKKjgtjXSFn6hUg2EVEZdrc391BQ= X-Google-Smtp-Source: ABdhPJzZKG4l0kRiWmq21/YPQHNX3tETQOo6Z3Tz9KrEjR6Y8QYi74527ZTHo99YO3c5NZ9q40y++Q== X-Received: by 2002:a5d:6b45:: with SMTP id x5mr10637532wrw.415.1612042967676; Sat, 30 Jan 2021 13:42:47 -0800 (PST) Received: from guixSD (host-87-4-165-57.retail.telecomitalia.it. [87.4.165.57]) by smtp.gmail.com with ESMTPSA id i7sm10585671wmq.2.2021.01.30.13.42.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Jan 2021 13:42:47 -0800 (PST) From: =?UTF-8?Q?Nicol=C3=B2?= Balzarotti In-Reply-To: <8735yi9o9x.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> References: <87ft2xzu1g.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <87wnvzwfgu.fsf@gnu.org> <87lfcfcmf3.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <87mtwut34z.fsf@gnu.org> <87czxpdhsv.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <86pn1mfpp1.fsf@gmail.com> <8735yi9o9x.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> Date: Sat, 30 Jan 2021 22:42:46 +0100 Message-ID: <87pn1m85k9.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) As a self reminder, I found this repo https://github.com/cdluminate/DistroHelper.jl which might contain something useful for our purposes From unknown Sat Aug 16 18:44:40 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45972] Julia importer? Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 31 Jan 2021 19:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45972 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: =?UTF-8?Q?Nicol=C3=B2?= Balzarotti , Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 45972@debbugs.gnu.org Received: via spool by 45972-submit@debbugs.gnu.org id=B45972.161212177015726 (code B ref 45972); Sun, 31 Jan 2021 19:37:02 +0000 Received: (at 45972) by debbugs.gnu.org; 31 Jan 2021 19:36:10 +0000 Received: from localhost ([127.0.0.1]:58064 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6IW0-00045Y-H6 for submit@debbugs.gnu.org; Sun, 31 Jan 2021 14:36:10 -0500 Received: from mail-wm1-f53.google.com ([209.85.128.53]:51106) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6IVy-000453-8b for 45972@debbugs.gnu.org; Sun, 31 Jan 2021 14:36:07 -0500 Received: by mail-wm1-f53.google.com with SMTP id 190so10860752wmz.0 for <45972@debbugs.gnu.org>; Sun, 31 Jan 2021 11:36:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=FH7MqABuc3g2BCfjzLecOWACnjZRbK5kQu0EcSiXznI=; b=pfa0Mr1+hz8Exp5j2CW2vjq/s7Owq9lSWCTaqyLQvRL0lAX6qkYX7KmoARb0B7Elc1 2boi3NnNKFUiRcgMcdrEfAPIILQOsHck0pvPCT9VLx89MjiIa8SHmOYhBVeZehq8oUY4 BiEpABT+mTlKQs6IWHZTbl29BbYJiXkqzHNzV5b3VTl51+VJjWV3d5WcbX6zXNwS4A27 qA8+1/GY+R1OVrIOf0g/TVdYjU1fBOS9+aXj0FeAuchIpMslDhzY17OKwJVgMv+F4i9c B/j/tZD6b4CwMtHTScf+aa0M2/NdSuzu4acbTiW9FczyBCh7XedPkPHlqt+bKYKUJNVX bFLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=FH7MqABuc3g2BCfjzLecOWACnjZRbK5kQu0EcSiXznI=; b=MnIB2p/WHyWeTRw89WDWz906R1+FJKMl12OGX5KOCuPFef6SbUF2052AkEw7Rln7TP r99w+VUGlpbrTLa3+spbRWYqVoSA3QfD3QsWqCzYPYlM9zj2wz+TCSOUkq+MANjXnncq PuLgrKrvPyXEE+lbCTn84dgPDkuXOWeKVuJX5kibLB9uB+FkalrroAyx1YNHFBuUmDeq SVetusPNYxo7haC8MNz8g7aks9I8oJNHkI+1zksVarni5vHeWFb2rWy6KTvEbihderQr D0rbjQc+Empn7cG1zfdDOKAzFerOFEVBJLTCbLYSduXHZyHYMx+49JR+LekNcw/x7gAS 69ow== X-Gm-Message-State: AOAM533pHjqMROsuqoEB9vmocJcwxVow8/ENeKPiSVxxRm0G08ZsYoVU kH47O3vFXnGI4vLWtEF+GjI7FVEUseE= X-Google-Smtp-Source: ABdhPJzewu0W3AhQy404UF5sabLCOb285MqJ+ucQRMEVGvr+eCYMqneoGiLUd/5rbU6hxk34h4JnCw== X-Received: by 2002:a1c:b643:: with SMTP id g64mr11535084wmf.89.1612121760337; Sun, 31 Jan 2021 11:36:00 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id w4sm18377637wmc.13.2021.01.31.11.35.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Jan 2021 11:35:59 -0800 (PST) From: zimoun In-Reply-To: <8735yi9o9x.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> References: <87ft2xzu1g.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <87wnvzwfgu.fsf@gnu.org> <87lfcfcmf3.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <87mtwut34z.fsf@gnu.org> <87czxpdhsv.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <86pn1mfpp1.fsf@gmail.com> <8735yi9o9x.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> Date: Sun, 31 Jan 2021 20:35:07 +0100 Message-ID: <86y2g8ew7o.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, On Sat, 30 Jan 2021 at 21:13, Nicol=C3=B2 Balzarotti = wrote: > zimoun writes: >>> (invoke-julia "using Pkg; Pkg.TOML.parsefile("Project.toml")["name"] |>= println") >> >> With a bit more glue, could this be transformed into something like >> =E2=80=9Cjulia->guix-package=E2=80=9D? And so have a Julia package impo= rter, even if it >> fails for some cases. > > Well, if you mean "Can we use Pkg.jl to generate package definitions for > us?" the answer is "probably yes, but I never investigated this". That > line uses just Julia Base TOML.jl, which for some reason is defined > inside module Pkg.jl (and it's not top-level). I mean the correct way is to write a TOML parser, probably using PEG. As it is done with the other importers. It is a piece of work. Not especially hard but it could take some time. So instead, the question is, using a bit of Julia glue and Guile glue, is it possible to extract the necessary information to have a Guix package? Well, maybe these glue code is the same as writing a TOML parser. :-) > If you instead meant "Can we have a Julia importer?" some time ago I > wrote one in Julia, I've not used it in the last year, but it did work > quite well back then. I attach it here for reference. Fun! One thing is how to deal with =E2=80=99Manifest.toml=E2=80=99. And pre-com= piled substitutes do not make too much sense in the Julia world. Well, I do not know how these Manifest.toml overlap with how Guix works. Cheers, simon From unknown Sat Aug 16 18:44:40 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45972] Julia importer? Resent-From: =?UTF-8?Q?Nicol=C3=B2?= Balzarotti Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 31 Jan 2021 20:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45972 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: zimoun , Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 45972@debbugs.gnu.org Received: via spool by 45972-submit@debbugs.gnu.org id=B45972.161212323518020 (code B ref 45972); Sun, 31 Jan 2021 20:01:02 +0000 Received: (at 45972) by debbugs.gnu.org; 31 Jan 2021 20:00:35 +0000 Received: from localhost ([127.0.0.1]:58096 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6Itd-0004gY-EK for submit@debbugs.gnu.org; Sun, 31 Jan 2021 15:00:35 -0500 Received: from mail-wm1-f54.google.com ([209.85.128.54]:52518) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6ItZ-0004gJ-Gu for 45972@debbugs.gnu.org; Sun, 31 Jan 2021 15:00:32 -0500 Received: by mail-wm1-f54.google.com with SMTP id o5so1229135wmq.2 for <45972@debbugs.gnu.org>; Sun, 31 Jan 2021 12:00:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=Bkfhb2NcRLc+LqpEJuczXeWWEzRooLIF2zrJnw2ETkI=; b=uNbgsqXsG9+ZnK/kSuovccJtZvxav++C1MzYTbealPhdpCyJ1i8JrU0drGWc9A5+EH XXP9FR+98Eb4YyG47VnyqEUVxBjHE70Lco4MKbixfj9VcHaBnWOEdkZoYyL0DrvZyR3K SjnsLeeZkkrAmi/uKewfwIyzij07bucCW6OkkmqHH66jcxKXkrLU9a4RS0sOqVMIenLS pbrKPvBf+8HTEhNPOevyapkcMWE6bJ2LOONoTfUlHAiKLxBkUjk5JOrRxPy1aekcl5jc uiOtk+CFbjo2Yg2Q9CkXgZFG+9EDkkp0a0LjAQRUFGT5Zn3WwtM3jZFHbfsyoHC3FPKJ L+RA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=Bkfhb2NcRLc+LqpEJuczXeWWEzRooLIF2zrJnw2ETkI=; b=Th86VG24/JnFeKs5YE/+pA3uAoIY2jM7Mq1CdkFa1HKGnQ+I+YlpDkT0nbotuCpgHF N4XqB/yblgwNjc8ZWuazlPVBhglziXTeBEhZlz2rf5YftoQkKCsntDWtUXFsSg+j5EGU 4MgoYzWoHv6dw2oeEKEQs/+lUVPYjxPscPV7QRzNOj9URIeL+6s2m7RITnenqHKUmBZT TcYU5/s+9zdrSV880nAs5Pm56BKdiu/+W0kc+hk2Rmh6XXA8pb1BEvo+yfQfjHMM+bu7 Fm307b4ufHfSZngFQhAq+yAk72pZOLqtW9gj00o/OIdo2M53+Nnbw4FqXJvIoD7ZN3Pz KJWw== X-Gm-Message-State: AOAM533Av4KlpdDZ6J68VmfduMjPJIi5qYe01uQAgLq+/LDgXc4wzBq/ JU1hEBDNH+pxoPhHD489TF6J1W/TNlQ= X-Google-Smtp-Source: ABdhPJwMw69g4hl+dmgwn7intkqm5XgvbHLikSk+4XdbHerE+RTNGouRQ9ZSN55VqwZ20+tTUg5x3A== X-Received: by 2002:a05:600c:358e:: with SMTP id p14mr11928510wmq.73.1612123223380; Sun, 31 Jan 2021 12:00:23 -0800 (PST) Received: from guixSD (host-87-4-165-57.retail.telecomitalia.it. [87.4.165.57]) by smtp.gmail.com with ESMTPSA id o12sm24309343wrx.82.2021.01.31.12.00.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Jan 2021 12:00:22 -0800 (PST) From: =?UTF-8?Q?Nicol=C3=B2?= Balzarotti In-Reply-To: <86y2g8ew7o.fsf@gmail.com> References: <87ft2xzu1g.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <87wnvzwfgu.fsf@gnu.org> <87lfcfcmf3.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <87mtwut34z.fsf@gnu.org> <87czxpdhsv.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <86pn1mfpp1.fsf@gmail.com> <8735yi9o9x.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <86y2g8ew7o.fsf@gmail.com> Date: Sun, 31 Jan 2021 21:00:21 +0100 Message-ID: <87lfc8yizu.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > I mean the correct way is to write a TOML parser, probably using PEG. > As it is done with the other importers. > It is a piece of work. Not especially hard but it could take some time. That wouldn't be too hard, but also it would not be enough. As you can see in [fn:1], there's just the list of dependencies, but no info on how to get them, so parsing the Julia General Registry [fn:2] is still required. > So instead, the question is, using a bit of Julia glue and Guile glue, > is it possible to extract the necessary information to have a Guix > package? > > Well, maybe these glue code is the same as writing a TOML parser. :-) This might be feasible, but as I said above, unfortunately I don't think that a TOML parser would be enough. But asking "Pkg3" to resolve dependencies for us, yes, this makes sense. > One thing is how to deal with =E2=80=99Manifest.toml=E2=80=99. And pre-c= ompiled > substitutes do not make too much sense in the Julia world. Well, I do > not know how these Manifest.toml overlap with how Guix works. WDYM? Julia uses .ji files (which are the analogoues of .go for guile and .pyc for python), if this is what you are referring to. I'm just ignoring Manifest.toml, which should be the same as venv in the python world. [fn:1] https://github.com/JuliaLang/TOML.jl/blob/master/Project.toml [fn:2] https://github.com/JuliaRegistries/General From unknown Sat Aug 16 18:44:40 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45972] Julia importer? Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 01 Feb 2021 07:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45972 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: =?UTF-8?Q?Nicol=C3=B2?= Balzarotti , Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 45972@debbugs.gnu.org Received: via spool by 45972-submit@debbugs.gnu.org id=B45972.161216467126345 (code B ref 45972); Mon, 01 Feb 2021 07:32:02 +0000 Received: (at 45972) by debbugs.gnu.org; 1 Feb 2021 07:31:11 +0000 Received: from localhost ([127.0.0.1]:58624 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6Tfz-0006qr-0W for submit@debbugs.gnu.org; Mon, 01 Feb 2021 02:31:11 -0500 Received: from mail-wr1-f54.google.com ([209.85.221.54]:34858) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6Tfu-0006qG-Ay for 45972@debbugs.gnu.org; Mon, 01 Feb 2021 02:31:09 -0500 Received: by mail-wr1-f54.google.com with SMTP id l12so15417835wry.2 for <45972@debbugs.gnu.org>; Sun, 31 Jan 2021 23:31:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=4QjUm/pyfNMHrwLZzbRUykuOqY/XcY+jT7qhuk7LV2M=; b=CERmkvYKXKOQH+HEw2lhE0j1k5TOWxr57mnNU5YmIZaxjZQ5NP9p9k9r63/vExf7gs yRnwUaNjmj+TccAnak22HoMLC8m3qIa4gN5BKY8VB/IOYiPWH2o14X6+IwvEYLvX/Q1Z aH11tz/dKtvx3yVA70X9WzIFjHuvg84lcJxfciEXvs4TADi/3vJNfL8ib3ty3PpsEzK1 8oN2YnWZec+79z6RfBOqZGZ3RA75a4r1hNBygKqiojsoVTPwi5x3FCS2+yXvl+idwTom MOjrbXqT3IZpwa65k6NS/kJISbWIFwqrRHlJ3b5VoV/jIHQts2aQS5W8kg34IEnwPv40 USwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=4QjUm/pyfNMHrwLZzbRUykuOqY/XcY+jT7qhuk7LV2M=; b=atPn0Ox4/lyqaQJgC0ygw1wj87p3km6m1W7ekOCBcD0tyfpWEJFAqGjK+TFC/UNCec RUAmrRyR2V5WTTrNJDjMv2I/BC+kAD/4BzSyj7V650zKiSLk1REfLuigjjOATmP6tSO0 aLeeN+wo5oYgIF1Gy6vkG/KswQgZMVbR+MhMtA9CjKFqWLeAKONXLc1kS4qZS9bCC36H FVWXRVXNxL9ny+c6HLcbRWIyFKLd6w8bJt6RwRyN3R4YQbZJ32Maq3/iBMUpT7tYjxbH CXMxi6gb7rrX4c12loi8glD89Ja/lCggrffsmDkFNyodZGlGnT0a7km6BKF/+wREbegh Ywqw== X-Gm-Message-State: AOAM532JIfOdvStu3obB3//9vbllGlhMq/q3HIjMQI1vKmnSeOnWObwV bk+6d80o5N1Sv0ze5dXC1thhc1cgfyY= X-Google-Smtp-Source: ABdhPJxVb4svog+2MGJCzDMPrz2LPisNQn7LMMdcNl6m8M8G5L/McgcqzNpt8j6DwmLWfJof2TWxxA== X-Received: by 2002:a05:6000:1841:: with SMTP id c1mr16286302wri.278.1612164660327; Sun, 31 Jan 2021 23:31:00 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id b7sm25252118wru.33.2021.01.31.23.30.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Jan 2021 23:30:59 -0800 (PST) From: zimoun In-Reply-To: <87lfc8yizu.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> References: <87ft2xzu1g.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <87wnvzwfgu.fsf@gnu.org> <87lfcfcmf3.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <87mtwut34z.fsf@gnu.org> <87czxpdhsv.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <86pn1mfpp1.fsf@gmail.com> <8735yi9o9x.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <86y2g8ew7o.fsf@gmail.com> <87lfc8yizu.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> Date: Mon, 01 Feb 2021 08:22:33 +0100 Message-ID: <86sg6gdzgm.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, On Sun, 31 Jan 2021 at 21:00, Nicol=C3=B2 Balzarotti = wrote: > That wouldn't be too hard, but also it would not be enough. As you can > see in [fn:1], there's just the list of dependencies, but no info on how > to get them, so parsing the Julia General Registry [fn:2] is still requir= ed. [...] > I'm just ignoring Manifest.toml, which should be the same as venv in the > python world. Sorry, you have right. I have misremembered an old presentation about Pkg3 by Stefan Karpinski. Well, thanks for the pointers. And I gave a look at the Pkg doc. ;-) Once a PEG parser for TOML files is written, all the information is in the Registry (by default this General repository), recursively. However, the =E2=80=9Cresolve=E2=80=9D part is not straightforward, IMHO. = It is what confused me in my previous email and I thought was =E2=80=9CManifest.toml= =E2=80=9D. Anyway. Instead of reinventing the wheel and reimplement Pkg.jl in Guix, maybe it is worth to have Julia code as you did that extracts the relevant information and then generates the relevant Guix packages. However, it should mean that =E2=80=9Cguix import julia=E2=80=9D requires to have the p= ackage julia implicitly used. Why not. :-) Cheers, simon