From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id yKX1D4TaEmChPQAA0tVLHw (envelope-from ) for ; Thu, 28 Jan 2021 15:38:44 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id kO3LC4TaEmCSeAAA1q6Kng (envelope-from ) for ; Thu, 28 Jan 2021 15:38:44 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 283E59403AE for ; Thu, 28 Jan 2021 15:38:43 +0000 (UTC) Received: from localhost ([::1]:59208 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l59Na-0006Ti-0A for larch@yhetil.org; Thu, 28 Jan 2021 10:38:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37976) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l59Mv-0005vY-VL for guix-patches@gnu.org; Thu, 28 Jan 2021 10:38:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37904) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l59Mv-0002Xh-OH for guix-patches@gnu.org; Thu, 28 Jan 2021 10:38:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l59Mv-0002Fa-LY for guix-patches@gnu.org; Thu, 28 Jan 2021 10:38:01 -0500 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?= 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 45972@debbugs.gnu.org Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.25 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=kqJg2yol; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 283E59403AE X-Spam-Score: -1.25 X-Migadu-Scanner: scn0.migadu.com X-TUID: ranyfl5egny8 --=-=-= 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 --=-=-=--