GNU bug report logs - #62202
[PATCH 0/21] Juliahub import script.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Nicolas Graves <ngraves@HIDDEN>; Keywords: patch moreinfo; dated Wed, 15 Mar 2023 12:49:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 21 Dec 2023 14:02:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 21 09:02:08 2023
Received: from localhost ([127.0.0.1]:42700 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rGJcm-0000zA-AD
	for submit <at> debbugs.gnu.org; Thu, 21 Dec 2023 09:02:08 -0500
Received: from 2.mo560.mail-out.ovh.net ([188.165.53.149]:38653)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ngraves@HIDDEN>) id 1rGJcc-0000xu-7E
 for 62202 <at> debbugs.gnu.org; Thu, 21 Dec 2023 09:02:01 -0500
Received: from director10.ghost.mail-out.ovh.net (unknown [10.109.140.215])
 by mo560.mail-out.ovh.net (Postfix) with ESMTP id 6F18B2C92B
 for <62202 <at> debbugs.gnu.org>; Thu, 21 Dec 2023 14:01:52 +0000 (UTC)
Received: from ghost-submission-6684bf9d7b-kwgz9 (unknown [10.110.96.132])
 by director10.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 114A41FEA3;
 Thu, 21 Dec 2023 14:01:51 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.102])
 by ghost-submission-6684bf9d7b-kwgz9 with ESMTPSA
 id 0wIFAFBFhGWnJgAA8T+B1w
 (envelope-from <ngraves@HIDDEN>); Thu, 21 Dec 2023 14:01:51 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-102R004bb7d06d5-3e2e-454c-a5f4-c17aef2200e3,
 9D5CD1A767DEA5A8C66A052B36C551B71BBC44F2) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 89.85.249.141
From: Nicolas Graves <ngraves@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH v3 4/4] import: utils: Rule out texinfo common syntax from @
 escape.
Date: Thu, 21 Dec 2023 15:01:03 +0100
Message-ID: <20231221140142.16523-4-ngraves@HIDDEN>
X-Mailer: git-send-email 2.41.0
In-Reply-To: <20231221140142.16523-1-ngraves@HIDDEN>
References: <20231221140142.16523-1-ngraves@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Ovh-Tracer-Id: 4994491990046139106
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvkedrvdduhedgfeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepleffjeetueethfefkeffffefvddukeejkefgleduiedthfekvefhiedvhfffgeegnecukfhppeduvdejrddtrddtrddupdekledrkeehrddvgeelrddugedupdefjedrheelrddugedvrddutddvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqedpnhgspghrtghpthhtohepuddprhgtphhtthhopeeivddvtddvseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehiedtpdhmohguvgepshhmthhpohhuth
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: ngraves@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

---
 guix/import/utils.scm | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index 47254539a1..57e4ec0ce7 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -375,7 +375,13 @@ (define* (beautify-description description #:optional (length 80))
                    (cut string-trim-both <> #\')
                    ;; Escape single @ to prevent it from being understood as
                    ;; invalid Texinfo syntax.
-                   (cut regexp-substitute/global #f "@" <> 'pre "@@" 'post)
+                   (lambda (word)
+                     (if  ; Rule out some valid Texinfo syntax.
+                      (member word '("@itemize" "@item" "@end" "@quotation"
+                                     "@enumerate" "@code" "@code{"))
+                      word
+                      ((cut regexp-substitute/global
+                            #f "@" <> 'pre "@@" 'post) word)))
                    ;; Wrap camelCase or PascalCase words in @code{...}.
                    (lambda (word)
                      (let ((pattern (make-regexp "([A-Z][a-z]+[A-Z]|[a-z]+[A-Z])")))
-- 
2.41.0





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 21 Dec 2023 14:02:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 21 09:02:04 2023
Received: from localhost ([127.0.0.1]:42698 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rGJcg-0000yt-Sx
	for submit <at> debbugs.gnu.org; Thu, 21 Dec 2023 09:02:04 -0500
Received: from 9.mo550.mail-out.ovh.net ([178.32.108.172]:37231)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ngraves@HIDDEN>) id 1rGJcZ-0000xq-Vl
 for 62202 <at> debbugs.gnu.org; Thu, 21 Dec 2023 09:01:58 -0500
Received: from director7.ghost.mail-out.ovh.net (unknown [10.109.140.215])
 by mo550.mail-out.ovh.net (Postfix) with ESMTP id 9C00427F13
 for <62202 <at> debbugs.gnu.org>; Thu, 21 Dec 2023 14:01:49 +0000 (UTC)
Received: from ghost-submission-6684bf9d7b-7vdqn (unknown [10.111.174.161])
 by director7.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 024311FE7A;
 Thu, 21 Dec 2023 14:01:48 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.105])
 by ghost-submission-6684bf9d7b-7vdqn with ESMTPSA
 id SgJAMExFhGWjLgAAFFRZrQ
 (envelope-from <ngraves@HIDDEN>); Thu, 21 Dec 2023 14:01:48 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-105G006f7c80d17-d1d2-4227-8716-02146d4f6d9a,
 9D5CD1A767DEA5A8C66A052B36C551B71BBC44F2) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 89.85.249.141
From: Nicolas Graves <ngraves@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH v3 2/4] import: Add juliahub importer.
Date: Thu, 21 Dec 2023 15:01:01 +0100
Message-ID: <20231221140142.16523-2-ngraves@HIDDEN>
X-Mailer: git-send-email 2.41.0
In-Reply-To: <20231221140142.16523-1-ngraves@HIDDEN>
References: <20231221140142.16523-1-ngraves@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Ovh-Tracer-Id: 4993647564968288994
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvkedrvdduhedgfeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfgggtgfesthekredtredtjeenucfhrhhomheppfhitgholhgrshcuifhrrghvvghsuceonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqeenucggtffrrghtthgvrhhnpeevkeetkefffffgheekgeekhfeugedvheejteelheejudeffeffgfelleeghffhieenucffohhmrghinhepghhithhhuhgsrdgtohhmpdhjuhhlihgrhhhusgdrtghomhdpghhnuhdrohhrghdpghhithhhuhgsuhhsvghrtghonhhtvghnthdrtghomhdpjhhulhhirghhuhgsrdhorhhgnecukfhppeduvdejrddtrddtrddupdekledrkeehrddvgeelrddugedupdefjedrheelrddugedvrddutdehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqedpnhgspghrtghpthhtohepuddprhgtphhtthhopeeivddvtddvseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehhedtpdhmohguvgepshhmthhpohhuth
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: ngraves@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

---
 doc/guix.texi                    |  27 +++
 guix/import/juliahub.scm         | 309 +++++++++++++++++++++++++++++++
 guix/scripts/import.scm          |   2 +-
 guix/scripts/import/juliahub.scm | 107 +++++++++++
 4 files changed, 444 insertions(+), 1 deletion(-)
 create mode 100644 guix/import/juliahub.scm
 create mode 100644 guix/scripts/import/juliahub.scm

diff --git a/doc/guix.texi b/doc/guix.texi
index b742a3d5b2..f50bb3f328 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -14678,6 +14678,33 @@ guix import hexpm cf@@0.3.0
 
 Additional options include:
 
+@table @code
+@item --recursive
+@itemx -r
+Traverse the dependency graph of the given upstream package recursively
+and generate package expressions for all those packages that are not yet
+in Guix.
+@end table
+
+@item juliahub
+@cindex juliahub
+Import metadata from both the General
+@uref{https://github.com/JuliaRegistries/General} and Juliahub
+@uref{https://juliahub.com} Julia package repositories, as in this
+example:
+
+@example
+guix import juliahub Cthulhu@@2.8.9
+@end example
+
+The supplied package name must have the same case as in the
+aforementioned package repositories, and the version used must be an
+exact version (e.g. @code{2.8.9} instead of @code{2.8}). The command
+will also fail in the case of a Julia package that doesn't use a git
+tag.
+
+Additional options include:
+
 @table @code
 @item --recursive
 @itemx -r
diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
new file mode 100644
index 0000000000..ab838b6035
--- /dev/null
+++ b/guix/import/juliahub.scm
@@ -0,0 +1,309 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2023 Nicolas Graves <ngraves@HIDDEN>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (guix import juliahub)
+  #:use-module (ice-9 textual-ports)
+  #:use-module (ice-9 regex)
+  #:use-module (ice-9 match)
+  #:use-module (srfi srfi-1)
+  #:use-module (srfi srfi-9)
+  #:use-module (srfi srfi-71)
+  #:use-module (guix http-client)
+  #:use-module (guix git)
+  #:use-module (guix import utils)
+  #:use-module (guix import json)
+  #:use-module (guix base32)
+  #:use-module (guix packages)
+  #:use-module (guix upstream)
+  #:use-module (json)
+  #:use-module ((guix licenses) #:prefix license:)
+
+  #:export (juliahub->guix-package
+            %juliahub-updater
+            juliahub-recursive-import))
+
+
+;; JuliaHub API.
+(define (juliahub-redirect-uri name)
+  (let* ((url (string-append "https://docs.juliahub.com/" name "/"))
+         (port (http-fetch url #:text? #t))
+         (_ (get-line port))
+         (meta (get-line port))
+         (regex "url=[a-zA-Z0-9]{5}\\/[0-9\\.]*")
+         (redirect (match:substring (string-match regex meta))))
+    (close-port port)
+    (string-drop redirect 4)))
+
+(define (juliahub-url name)
+  (let* ((url (string-append "https://docs.juliahub.com/" name "/"))
+         (uri (juliahub-redirect-uri name)))
+    (string-append url uri "/")))
+
+;; General package repository.
+(define %general-base-url
+  "https://raw.githubusercontent.com/JuliaRegistries/General/master/")
+
+(define (general-url package-name file)
+  (let ((folder (string-capitalize (string-take package-name 1))))
+    (string-append
+     %general-base-url folder "/" package-name "/" file)))
+
+(define (ini-line->alist line)
+  (let* ((l (string-split line #\=))
+         (attribute (string->symbol (string-drop-right (car l) 1)))
+         (value (string-drop (string-drop-right (cadr l) 1) 2)))
+    `(,attribute . ,value)))
+
+(define (ini-fetch url)
+  (let* ((port (http-fetch url #:text? #t))
+         (raw (get-string-all port))
+         (lines (drop-right (string-split raw #\newline) 1)))
+    (close-port port)
+    (map ini-line->alist lines)))
+
+;; Filtering out julia-stdlibs.
+;; To update them, see file sysimg.jl.
+(define %julia-stdlibs
+  (list "julia"
+        "ArgTools"
+        "Artifacts"
+        "Base64"
+        "CRC32c"
+        "FileWatching"
+        "Libdl"
+        "Logging"
+        "Mmap"
+        "NetworkOptions"
+        "SHA"
+        "Serialization"
+        "Sockets"
+        "Unicode"
+        "DelimitedFiles"
+        "LinearAlgebra"
+        "Markdown"
+        "Printf"
+        "Random"
+        "Tar"
+        "Dates"
+        "Distributed"
+        "Future"
+        "InteractiveUtils"
+        "LibGit2"
+        "Profile"
+        "SparseArrays"
+        "UUIDs"
+        "REPL"
+        "SharedArrays"
+        "Statistics"
+        "SuiteSparse"
+        "TOML"
+        "Test"
+        "LibCURL"
+        "Downloads"
+        "Pkg"
+        "LazyArtifacts"))
+
+;; Julia package.
+(define-json-mapping <juliahub-package> make-juliahub-package juliahub-package?
+  json->juliahub-package
+  (homepage juliahub-package-homepage) ;string
+  (readme juliahub-package-readme) ;string
+  (version juliahub-package-version) ;string
+  (description juliahub-package-description) ;string
+  (dependencies
+   juliahub-package-dependencies "deps"
+   json->juliahub-dependencies) ;list of <juliahub-dependency>
+  (url juliahub-package-url) ;string
+  (uuid juliahub-package-uuid) ;string
+  (license juliahub-package-license)) ;string
+
+(define-json-mapping <juliahub-dependency>
+  make-juliahub-dependency juliahub-dependency?
+  json->juliahub-dependency
+  (direct? juliahub-dependency-direct? "direct") ;boolean
+  (name juliahub-dependency-name) ;string
+  (uuid juliahub-dependency-uuid) ;string
+  (versions juliahub-dependency-versions "versions" vector->list)) ;list of strings
+
+(define (julia-name->guix-name name)
+  (string-append "julia-" (snake-case name)))
+
+(define* (juliahub-fetch name #:key (version #f))
+  "Return a <juliahub-package> record for package NAME, or #f on failure."
+  (let* ((uri (juliahub-redirect-uri name))
+         (slug (string-take uri 5))
+         (url (if version
+                  (string-append "https://docs.juliahub.com/" name "/"
+                                 slug "/" version "/pkg.json")
+                  (string-append (juliahub-url name) "pkg.json"))))
+    (and=> (json-fetch url) json->juliahub-package)))
+
+(define (make-julia-sexp name version source home-page synopsis description
+                         direct-dependencies test-dependencies-names license)
+  "Return the `package' s-expression for a Julia package with the given NAME,
+VERSION, SOURCE, HOME-PAGE, DESCRIPTION, DIRECT-DEPENDENCIES,
+TEST-DEPENDENCIES-NAMES and LICENSE."
+  `(package
+     (name ,(julia-name->guix-name name))
+     (version ,version)
+     (source ,source)
+     (build-system julia-build-system)
+     ,@(if (null? direct-dependencies)
+           '()
+           `((propagated-inputs
+              (list ,@(map (compose string->symbol
+                                    julia-name->guix-name
+                                    juliahub-dependency-name)
+                           direct-dependencies)))))
+     ,@(if (null? test-dependencies-names)
+           '()
+           `((native-inputs
+              (list ,@(map (compose string->symbol julia-name->guix-name)
+                           test-dependencies-names)))))
+     (synopsis ,synopsis)
+     (description ,description)
+     (home-page ,home-page)
+     (license ,(if license (spdx-string->license license) #f))))
+
+;; Dependencies helpers.
+(define (json->juliahub-dependencies vector)
+  (if (vector? vector)
+      (filter-map
+       (lambda (el)
+         (let ((dep (json->juliahub-dependency el)))
+           (if (and (juliahub-dependency-direct? dep)
+                    (not (member (juliahub-dependency-name dep)
+                                 %julia-stdlibs)))
+               dep
+               #f)))
+       (vector->list vector))))
+
+(define (parse-test-dependencies directory)
+  (let* ((port (open-input-file (string-append directory "/Project.toml")))
+         (project.toml (get-string-all port))
+         (regex "\ntest = \\[.*\\]")
+         (deps (match:substring (string-match regex project.toml)))
+         (pure (string-delete (list->char-set (list #\" #\ )) deps)))
+    (close-port port)
+    (filter (lambda (x) (not (member x %julia-stdlibs)))
+            (string-split (string-drop (string-drop-right pure 1) 7) #\,))))
+
+;; Juliahub may be more up-to-date than the General registry or the actual git
+;; tag (it seems around 6 hours pass between the time a commit is supplied to
+;; JuliaRegistrator as a release, and the time Julia TagBot Github Action makes
+;; the git tag). We have no simple way to get the commit of the latest-version.
+;; Thus the best simple thing we can do is get the latest-git-tag, and import
+;; this version instead. We do this by parsing Package.toml in the General
+;; registry, and then getting the refs of the git repo supplied by this
+;; file. Parsing this file is also necessary if the package is in a subdir of a
+;; git repository, because the information isn't present in Juliahub.
+
+;; There's a last case where some Julia packages are not based on a particular
+;; git tag. In this case, the script fails, but it seems quite rare. We could
+;; introduce the tree-commit which is available in the Versions.toml file in the
+;; General repository. This can be used to identify the state of a repository,
+;; since we have a unique hash of the listing of files and directories.
+
+(define (latest-git-tag repo)
+  (let* ((last-ref (last (remote-refs repo #:tags? #t)))
+         (last-git-tag (last (string-split last-ref #\/))))
+    (string-drop last-git-tag 1)))
+
+(define* (juliahub->guix-package package-name
+                                 #:key version #:allow-other-keys)
+  "Fetch the metadata for PACKAGE-NAME from juliahub.org, and return the
+`package' s-expression corresponding to that package, or #f on failure.
+Optionally include a VERSION string to fetch a specific version juliahub."
+  (let* ((package-toml (ini-fetch (general-url package-name "Package.toml")))
+         (subdir (assoc-ref package-toml 'subdir))
+         (tag (latest-git-tag (assoc-ref package-toml 'repo)))
+         (package (if version
+                      (juliahub-fetch package-name #:version version)
+                      (if tag
+                          (juliahub-fetch package-name #:version tag)
+                          (juliahub-fetch package-name)))))
+    (if package
+        (let* ((source directory
+                       (git->origin
+                        (juliahub-package-url package)
+                        `(tag-or-commit
+                          . ,(string-append
+                              "v" (juliahub-package-version package)))))
+               (direct-dependencies
+                (filter juliahub-dependency-direct?
+                        (juliahub-package-dependencies package)))
+               (dependencies-names (map juliahub-dependency-name
+                                        direct-dependencies))
+               (test-dependencies-names
+                (if subdir
+                    (parse-test-dependencies
+                     (string-append subdir "/" directory))
+                    (parse-test-dependencies directory)))
+               (homepage (juliahub-package-homepage package)))
+          (values (make-julia-sexp
+                   package-name
+                   (juliahub-package-version package)
+                   source
+                   (match homepage
+                     ("" (juliahub-package-url package))
+                     ((? string?) homepage)
+                     (_ (juliahub-package-url package)))
+                   (juliahub-package-description package)
+                   (beautify-description
+                    (juliahub-package-readme package))
+                   direct-dependencies
+                   test-dependencies-names
+                   (juliahub-package-license package))
+                  (append dependencies-names test-dependencies-names)))
+    (values #f '()))))
+
+;; We must use the url to get a name with the true case of juliahub/general.
+(define (guix-package->juliahub-name package)
+  (let* ((url (juliahub-package-url package))
+         (git-name (last (string-split url #\/)))
+         (ungitted-name (if (string-suffix? ".git" git-name)
+                            (string-drop-right git-name 4)
+                            git-name))
+         (package-name (if (string-suffix? ".jl" ungitted-name)
+                           (string-drop-right ungitted-name 4)
+                           ungitted-name)))
+    package-name))
+
+(define* (import-release package #:key (version #f))
+  "Return an <upstream-source> for the latest release of PACKAGE."
+  (let* ((package-name (guix-package->juliahub-name package))
+         (package      (juliahub-fetch package-name))
+         (version  (or version (juliahub-package-version package))))
+    (upstream-source
+     (package (package-name package))
+     (version version)
+     (urls (list (juliahub-package-url package))))))
+
+(define %juliahub-updater
+  (upstream-updater
+   (name 'juliahub)
+   (description "Updater for Juliahub packages")
+   (pred juliahub-package?)
+   (import import-release)))
+
+(define* (juliahub-recursive-import package-name #:optional version)
+  (recursive-import package-name
+                    #:repo '()
+                    #:repo->guix-package juliahub->guix-package
+                    #:guix-name julia-name->guix-name
+                    #:version version))
diff --git a/guix/scripts/import.scm b/guix/scripts/import.scm
index d2a1cee56e..8926c9610f 100644
--- a/guix/scripts/import.scm
+++ b/guix/scripts/import.scm
@@ -47,7 +47,7 @@ (define %standard-import-options '())
 
 (define importers '("gnu" "pypi" "cpan" "hackage" "stackage" "egg" "elpa"
                     "gem" "go" "cran" "crate" "texlive" "json" "opam"
-                    "minetest" "elm" "hexpm" "composer"))
+                    "minetest" "elm" "hexpm" "composer" "juliahub"))
 
 (define (resolve-importer name)
   (let ((module (resolve-interface
diff --git a/guix/scripts/import/juliahub.scm b/guix/scripts/import/juliahub.scm
new file mode 100644
index 0000000000..1317c67aa3
--- /dev/null
+++ b/guix/scripts/import/juliahub.scm
@@ -0,0 +1,107 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2023 Nicolas Graves <ngraves@HIDDEN>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (guix scripts import juliahub)
+  #:use-module (guix ui)
+  #:use-module (guix utils)
+  #:use-module (guix scripts)
+  #:use-module (guix import juliahub)
+  #:use-module (guix scripts import)
+  #:use-module (srfi srfi-1)
+  #:use-module (srfi srfi-11)
+  #:use-module (srfi srfi-37)
+  #:use-module (ice-9 match)
+  #:use-module (ice-9 format)
+  #:use-module (ice-9 receive)
+  #:export (guix-import-juliahub))
+
+
+;;;
+;;; Command-line options.
+;;;
+
+(define %default-options
+  '())
+
+(define (show-help)
+  (display (G_ "Usage: guix import juliahub PACKAGE-NAME[@VERSION] Import and
+convert the Julia package for PACKAGE-NAME.  Optionally, a version can be
+specified after the at-sign (@) character.\n"))
+  (display (G_ "
+  -h, --help             display this help and exit"))
+  (display (G_ "
+  -V, --version          display version information and exit"))
+  (display (G_ "
+  -r, --recursive        generate package expressions for all Gem packages\
+ that are not yet in Guix"))
+  (newline)
+  (show-bug-report-information))
+
+(define %options
+  ;; Specification of the command-line options.
+  (cons* (option '(#\h "help") #f #f
+                 (lambda args
+                   (show-help)
+                   (exit 0)))
+         (option '(#\V "version") #f #f
+                 (lambda args
+                   (show-version-and-exit "guix import gem")))
+         (option '(#\r "recursive") #f #f
+                 (lambda (opt name arg result)
+                   (alist-cons 'recursive #t result)))
+         %standard-import-options))
+
+
+;;;
+;;; Entry point.
+;;;
+
+(define (guix-import-juliahub . args)
+  (define (parse-options)
+    ;; Return the alist of option values.
+    (parse-command-line args %options (list %default-options)
+                        #:build-options? #f))
+
+  (let* ((opts (parse-options))
+         (args (filter-map (match-lambda
+                             (('argument . value)
+                              value)
+                             (_ #f))
+                           (reverse opts))))
+    (match args
+      ((spec)
+       (receive (package-name package-version)
+           (package-name->name+version spec)
+         (let ((code (if (assoc-ref opts 'recursive)
+                         (map (match-lambda
+                                ((and ('package ('name name) . rest) pkg)
+                                 `(define-public ,(string->symbol name)
+                                    ,pkg))
+                                (_ #f))
+                              (juliahub-recursive-import package-name package-version))
+                         (let ((sexp (juliahub->guix-package package-name #:version package-version)))
+                           (if sexp sexp #f)))))
+           (match code
+             ((or #f '(#f))
+              (leave (G_ "failed to download meta-data for package '~a'~%")
+                     package-name))
+             (_ code)))))
+      (()
+       (leave (G_ "too few arguments~%")))
+      ((many ...)
+       (leave (G_ "too many arguments~%"))))))
-- 
2.41.0





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 21 Dec 2023 14:02:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 21 09:02:02 2023
Received: from localhost ([127.0.0.1]:42695 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rGJcg-0000yd-7m
	for submit <at> debbugs.gnu.org; Thu, 21 Dec 2023 09:02:02 -0500
Received: from 5.mo576.mail-out.ovh.net ([46.105.43.105]:48553)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ngraves@HIDDEN>) id 1rGJca-0000xs-Bg
 for 62202 <at> debbugs.gnu.org; Thu, 21 Dec 2023 09:01:57 -0500
Received: from director5.ghost.mail-out.ovh.net (unknown [10.109.139.217])
 by mo576.mail-out.ovh.net (Postfix) with ESMTP id 2F74E28DF1
 for <62202 <at> debbugs.gnu.org>; Thu, 21 Dec 2023 14:01:51 +0000 (UTC)
Received: from ghost-submission-6684bf9d7b-qnh7v (unknown [10.110.168.40])
 by director5.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 894721FEB9;
 Thu, 21 Dec 2023 14:01:50 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.107])
 by ghost-submission-6684bf9d7b-qnh7v with ESMTPSA
 id TfEXGU5FhGUvHwAAfKi07w
 (envelope-from <ngraves@HIDDEN>); Thu, 21 Dec 2023 14:01:50 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-107S001b38d7a09-3c56-45ee-98c2-64c9a3714c9d,
 9D5CD1A767DEA5A8C66A052B36C551B71BBC44F2) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 89.85.249.141
From: Nicolas Graves <ngraves@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH v3 3/4] import: juliahub: Beautify description.
Date: Thu, 21 Dec 2023 15:01:02 +0100
Message-ID: <20231221140142.16523-3-ngraves@HIDDEN>
X-Mailer: git-send-email 2.41.0
In-Reply-To: <20231221140142.16523-1-ngraves@HIDDEN>
References: <20231221140142.16523-1-ngraves@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Ovh-Tracer-Id: 4994210511922848482
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvkedrvdduhedgfeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepleffjeetueethfefkeffffefvddukeejkefgleduiedthfekvefhiedvhfffgeegnecukfhppeduvdejrddtrddtrddupdekledrkeehrddvgeelrddugedupdefjedrheelrddugedvrddutdejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqedpnhgspghrtghpthhtohepuddprhgtphhtthhopeeivddvtddvseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehjeeipdhmohguvgepshhmthhpohhuth
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: ngraves@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

---
 guix/import/juliahub.scm | 53 ++++++++++++++++++++++++++++++++++++++--
 1 file changed, 51 insertions(+), 2 deletions(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index ab838b6035..e4540de06d 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -30,8 +30,10 @@ (define-module (guix import juliahub)
   #:use-module (guix base32)
   #:use-module (guix packages)
   #:use-module (guix upstream)
-  #:use-module (json)
   #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (json)
+  #:use-module (htmlprag)
+  #:use-module (sxml transform)
 
   #:export (juliahub->guix-package
             %juliahub-updater
@@ -76,6 +78,53 @@ (define (ini-fetch url)
     (close-port port)
     (map ini-line->alist lines)))
 
+;; Beautify description.
+(define %juliahub-beautify-description-rules
+  `((h1 *preorder*   . ,(lambda args #f))
+    (h2 *preorder*   . ,(lambda args #f))
+    (h3 *preorder*   . ,(lambda args #f))
+    (h4 *preorder*   . ,(lambda args #f))
+    (h5 *preorder*   . ,(lambda args #f))
+    (h6 *preorder*   . ,(lambda args #f))
+    (hr *preorder*   . ,(lambda args #f))
+    (span *preorder* . ,(lambda args #f))
+    (img *preorder*  . ,(lambda args #f))
+    (pre *preorder*  . ,(lambda args #f))
+    (div *preorder*  . ,(lambda args #f))
+    (table *preorder* . ,(lambda args #f))
+    (imgalt *preorder* . ,(lambda args #f))
+    (@ *preorder* . ,(lambda args #f))
+    (*TOP*        . ,(lambda args (cdr args)))
+    (p            . ,(lambda args (cdr args)))
+    (em           . ,(lambda args (cdr args)))
+    (strong       . ,(lambda args (cdr args)))
+    (a            . ,(lambda args
+                       (match args
+                         ((tag link ref)
+                          (if ref ref #f))
+                         (_ #f))))
+    (ul           . ,(lambda args
+                       `("@itemize" ,@(cdr args) "\n@end itemize")))
+    (ol           . ,(lambda args
+                       `("@enumerate" ,@(cdr args) "@end enumerate")))
+    (blockquote   . ,(lambda args
+                       `("@quotation" ,@(cdr args) "@end quotation")))
+    (li           . ,(lambda args
+                       `("\n@item" ,@(cdr args))))
+    (code         . ,(lambda args
+                       `("@code{" ,@(cdr args) "}")))
+    (*text*       . ,(lambda (tag x) x))
+    (*default*    . ,(lambda (tag . body)
+                       (cons tag body)))))
+
+(define (juliahub-beautify-description description)
+  (string-join
+   (filter (lambda (x) (if (equal? x " ") #f x))
+           (flatten
+            (pre-post-order (html->sxml description)
+                            %juliahub-beautify-description-rules)))
+   " "))
+
 ;; Filtering out julia-stdlibs.
 ;; To update them, see file sysimg.jl.
 (define %julia-stdlibs
@@ -264,7 +313,7 @@ (define* (juliahub->guix-package package-name
                      ((? string?) homepage)
                      (_ (juliahub-package-url package)))
                    (juliahub-package-description package)
-                   (beautify-description
+                   ((compose beautify-description juliahub-beautify-description)
                     (juliahub-package-readme package))
                    direct-dependencies
                    test-dependencies-names
-- 
2.41.0





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 21 Dec 2023 14:02:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 21 09:02:00 2023
Received: from localhost ([127.0.0.1]:42693 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rGJcc-0000yD-Nd
	for submit <at> debbugs.gnu.org; Thu, 21 Dec 2023 09:02:00 -0500
Received: from 4.mo576.mail-out.ovh.net ([46.105.42.102]:40603)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ngraves@HIDDEN>) id 1rGJcY-0000xn-6k
 for 62202 <at> debbugs.gnu.org; Thu, 21 Dec 2023 09:01:57 -0500
Received: from director6.ghost.mail-out.ovh.net (unknown [10.108.17.219])
 by mo576.mail-out.ovh.net (Postfix) with ESMTP id 28AC92A0FD
 for <62202 <at> debbugs.gnu.org>; Thu, 21 Dec 2023 14:01:48 +0000 (UTC)
Received: from ghost-submission-6684bf9d7b-v96f7 (unknown [10.110.96.188])
 by director6.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 49A241FEC6;
 Thu, 21 Dec 2023 14:01:47 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.105])
 by ghost-submission-6684bf9d7b-v96f7 with ESMTPSA
 id b/ceDEtFhGUOPgAAgEA/0g
 (envelope-from <ngraves@HIDDEN>); Thu, 21 Dec 2023 14:01:47 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-105G0067c578b33-e0e4-42e2-a5ba-1545eed2567e,
 9D5CD1A767DEA5A8C66A052B36C551B71BBC44F2) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 89.85.249.141
From: Nicolas Graves <ngraves@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH v3 1/4] import: utils: Add function git->origin.
Date: Thu, 21 Dec 2023 15:01:00 +0100
Message-ID: <20231221140142.16523-1-ngraves@HIDDEN>
X-Mailer: git-send-email 2.41.0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Ovh-Tracer-Id: 4993366087554491106
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvkedrvdduhedgfeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffogggtgfesthekredtredtjeenucfhrhhomheppfhitgholhgrshcuifhrrghvvghsuceonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqeenucggtffrrghtthgvrhhnpefgfeejveevtdfgieekieejueffhefhtdetudffgedvkedvudejgeejieffvdetffenucffohhmrghinhepghhithhlrggsrdgtohhmpdhsphgugidrohhrghdpghhithhhuhgsrdgtohhmnecukfhppeduvdejrddtrddtrddupdekledrkeehrddvgeelrddugedupdefjedrheelrddugedvrddutdehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqedpnhgspghrtghpthhtohepuddprhgtphhtthhopeeivddvtddvseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehjeeipdhmohguvgepshhmthhpohhuth
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: ngraves@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* guix/import/utils.scm: (git->origin): Add function.

* guix/import/elpa.scm
(download-git-repository): Remove function download-git-repository.
(git-repository->origin): Remove function git-repository->origin.
(ref): Add function ref.
(melpa-recipe->origin): Use functions git->origin and ref.

* guix/import/go.scm
(git-checkout-hash): Remove function git-checkout-hash.
(transform-version): Add function transform-version.
(vcs->origin): Use functions git->origin and transform-version. Add
optional argument transform-version.

* tests/import/go.scm
(go-module->guix-package): Adapt test case to changes in guix/import/go.scm.

* guix/import/minetest.scm
(download-git-repository): Remove function download-git-repository.
(make-minetest-sexp): Use function git->origin.

* tests/minetest.scm
(make-package-sexp): Use function git->origin.
(example-package): Adapt test-case to git->origin.

* guix/import/composer.scm
(make-php-sexp): Use function git->origin.

Change-Id: Ied05a63bdd60fbafe26fbbb4e115ff6f0bb9db3c
---
 guix/import/composer.scm | 86 ++++++++++++++--------------------------
 guix/import/elpa.scm     | 43 ++++++--------------
 guix/import/go.scm       | 57 ++++++++------------------
 guix/import/minetest.scm | 28 ++-----------
 guix/import/utils.scm    | 39 ++++++++++++++++++
 tests/go.scm             | 29 ++++++++++----
 tests/minetest.scm       | 15 ++-----
 7 files changed, 127 insertions(+), 170 deletions(-)

diff --git a/guix/import/composer.scm b/guix/import/composer.scm
index 1ad608964b..dabc5423ed 100644
--- a/guix/import/composer.scm
+++ b/guix/import/composer.scm
@@ -19,22 +19,17 @@
 (define-module (guix import composer)
   #:use-module (ice-9 match)
   #:use-module (json)
-  #:use-module (guix hash)
-  #:use-module (guix base32)
-  #:use-module (guix build git)
-  #:use-module (guix build utils)
-  #:use-module (guix build-system)
   #:use-module (guix build-system composer)
+  #:use-module ((guix download) #:select (download-to-store))
   #:use-module (guix import json)
   #:use-module (guix import utils)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix memoization)
   #:use-module (guix packages)
-  #:use-module (guix serialization)
+  #:use-module (guix store)
   #:use-module (guix upstream)
   #:use-module (guix utils)
   #:use-module (srfi srfi-1)
-  #:use-module (srfi srfi-11)
   #:use-module (srfi srfi-26)
   #:export (composer->guix-package
             %composer-updater
@@ -141,55 +136,34 @@ (define (make-php-sexp composer-package)
          (dependencies (map php-package-name
                             (composer-package-require composer-package)))
          (dev-dependencies (map php-package-name
-                                (composer-package-dev-require composer-package)))
-         (git? (equal? (composer-source-type source) "git")))
-    ((if git? call-with-temporary-directory call-with-temporary-output-file)
-     (lambda* (temp #:optional port)
-       (and (if git?
-               (begin
-                 (mkdir-p temp)
-                 (git-fetch (composer-source-url source)
-                            (composer-source-reference source)
-                            temp))
-               (url-fetch (composer-source-url source) temp))
-            `(package
-               (name ,(composer-package-name composer-package))
-               (version ,(composer-package-version composer-package))
-               (source
-                (origin
-                  ,@(if git?
-                        `((method git-fetch)
-                          (uri (git-reference
-                                (url ,(if (string-suffix?
-                                           ".git"
-                                           (composer-source-url source))
-                                          (string-drop-right
-                                           (composer-source-url source)
-                                           (string-length ".git"))
-                                          (composer-source-url source)))
-                                (commit ,(composer-source-reference source))))
-                          (file-name (git-file-name name version))
-                          (sha256
-                           (base32
-                            ,(bytevector->nix-base32-string
-                              (file-hash* temp)))))
-                        `((method url-fetch)
-                          (uri ,(composer-source-url source))
-                          (sha256 (base32 ,(guix-hash-url temp)))))))
-               (build-system composer-build-system)
-               ,@(if (null? dependencies)
-                     '()
-                     `((inputs
-                        (list ,@(map string->symbol dependencies)))))
-               ,@(if (null? dev-dependencies)
-                     '()
-                     `((native-inputs
-                        (list ,@(map string->symbol dev-dependencies)))))
-               (synopsis "")
-               (description ,(composer-package-description composer-package))
-               (home-page ,(composer-package-homepage composer-package))
-               (license ,(or (composer-package-license composer-package)
-                             'unknown-license!))))))))
+                                (composer-package-dev-require composer-package))))
+    `(package
+       (name ,(composer-package-name composer-package))
+       (version ,(composer-package-version composer-package))
+       (source
+        ,(if (string= (composer-source-type source) "git")
+             (git->origin (composer-source-url source)
+                          `(tag-or-commit . ,(composer-source-reference source)))
+             (let* ((source (composer-source-url source))
+                    (tarball (with-store store (download-to-store store source))))
+               `(origin
+                  (method url-fetch)
+                  (uri ,source)
+                  (sha256 (base32 ,(guix-hash-url tarball)))))))
+       (build-system composer-build-system)
+       ,@(if (null? dependencies)
+             '()
+             `((inputs
+                (list ,@(map string->symbol dependencies)))))
+       ,@(if (null? dev-dependencies)
+             '()
+             `((native-inputs
+                (list ,@(map string->symbol dev-dependencies)))))
+       (synopsis "")
+       (description ,(composer-package-description composer-package))
+       (home-page ,(composer-package-homepage composer-package))
+       (license ,(or (composer-package-license composer-package)
+                     'unknown-license!)))))
 
 (define composer->guix-package
   (memoize
diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm
index d1855b3698..a755387242 100644
--- a/guix/import/elpa.scm
+++ b/guix/import/elpa.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2021 Sarah Morgensen <iskarian@HIDDEN>
 ;;; Copyright © 2021 Simon Tournier <zimon.toutoune@HIDDEN>
 ;;; Copyright © 2022 Hartmut Goebel <h.goebel@HIDDEN>
+;;; Copyright © 2023 Nicolas Graves <ngraves@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -208,11 +209,6 @@ (define* (fetch-elpa-package name #:optional (repo 'gnu))
                             url)))
       (_ #f))))
 
-(define* (download-git-repository url ref)
-  "Fetch the given REF from the Git repository at URL."
-  (with-store store
-    (latest-repository-commit store url #:ref ref)))
-
 (define (package-name->melpa-recipe package-name)
   "Fetch the MELPA recipe for PACKAGE-NAME, represented as an alist from
 keywords to values."
@@ -232,28 +228,15 @@ (define (data->recipe data)
     (close-port port)
     (data->recipe (cons ':name data))))
 
-(define (git-repository->origin recipe url)
-  "Fetch origin details from the Git repository at URL for the provided MELPA
-RECIPE."
-  (define ref
-    (cond
-     ((assoc-ref recipe #:branch)
-      => (lambda (branch) (cons 'branch branch)))
-     ((assoc-ref recipe #:commit)
-      => (lambda (commit) (cons 'commit commit)))
-     (else
-      '())))
-
-  (let-values (((directory commit) (download-git-repository url ref)))
-    `(origin
-       (method git-fetch)
-       (uri (git-reference
-             (url ,url)
-             (commit ,commit)))
-       (sha256
-        (base32
-         ,(bytevector->nix-base32-string
-           (file-hash* directory #:recursive? #true)))))))
+(define (ref recipe)
+  "Create REF from MELPA RECIPE."
+  (cond
+   ((assoc-ref recipe #:branch)
+    => (lambda (branch) (cons 'branch branch)))
+   ((assoc-ref recipe #:commit)
+    => (lambda (commit) (cons 'commit commit)))
+   (else
+    '())))
 
 (define* (melpa-recipe->origin recipe)
   "Fetch origin details from the MELPA recipe and associated repository for
@@ -264,9 +247,9 @@ (define (gitlab-repo->url repo)
     (string-append "https://gitlab.com/" repo ".git"))
 
   (match (assq-ref recipe ':fetcher)
-    ('github (git-repository->origin recipe (github-repo->url (assq-ref recipe ':repo))))
-    ('gitlab (git-repository->origin recipe (gitlab-repo->url (assq-ref recipe ':repo))))
-    ('git    (git-repository->origin recipe (assq-ref recipe ':url)))
+    ('github (git->origin (github-repo->url (assq-ref recipe ':repo)) (ref recipe)))
+    ('gitlab (git->origin (gitlab-repo->url (assq-ref recipe ':repo)) (ref recipe)))
+    ('git    (git->origin (assq-ref recipe ':url) (ref recipe)))
     (#f #f)   ; if we're not using melpa then this stops us printing a warning
     (_ (warning (G_ "unsupported MELPA fetcher: ~a, falling back to unstable MELPA source~%")
                 (assq-ref recipe ':fetcher))
diff --git a/guix/import/go.scm b/guix/import/go.scm
index dd9298808d..6e2ce2ed00 100644
--- a/guix/import/go.scm
+++ b/guix/import/go.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2021 Sarah Morgensen <iskarian@HIDDEN>
 ;;; Copyright © 2021 Simon Tournier <zimon.toutoune@HIDDEN>
 ;;; Copyright © 2023 Efraim Flashner <efraim@HIDDEN>
+;;; Copyright © 2023 Nicolas Graves <ngraves@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -514,49 +515,24 @@ (define (module-meta-data-repo-url meta-data goproxy)
       goproxy
       (module-meta-repo-root meta-data)))
 
-(define* (git-checkout-hash url reference algorithm)
-  "Return the ALGORITHM hash of the checkout of URL at REFERENCE, a commit or
-tag."
-  (define cache
-    (string-append (or (getenv "TMPDIR") "/tmp")
-                   "/guix-import-go-"
-                   (passwd:name (getpwuid (getuid)))))
+;; This is done because the version field of the package, which the generated
+;; quoted expression refers to, has been stripped of any 'v' prefixed.
+(define (transform-version version)
+  (let ((plain-version? (string=? version (go-version->git-ref version)))
+        (v-prefixed?    (string-prefix? "v" version)))
+    (if (and plain-version? v-prefixed?)
+        '(string-append "v" version)
+        '(go-version->git-ref version))))
 
-  ;; Use a custom cache to avoid cluttering the default one under
-  ;; ~/.cache/guix, but choose one under /tmp so that it's persistent across
-  ;; subsequent "guix import" invocations.
-  (mkdir-p cache)
-  (chmod cache #o700)
-  (let-values (((checkout commit _)
-                (parameterize ((%repository-cache-directory cache))
-                  (update-cached-checkout url
-                                          #:ref
-                                          `(tag-or-commit . ,reference)))))
-    (file-hash* checkout #:algorithm algorithm #:recursive? #true)))
-
-(define (vcs->origin vcs-type vcs-repo-url version)
+(define* (vcs->origin vcs-type vcs-repo-url version
+                      #:key (transform-version #f))
   "Generate the `origin' block of a package depending on what type of source
-control system is being used."
+control system is being used. Optionally use the function TRANSFORM-VERSION
+which takes version as an input."
   (case vcs-type
     ((git)
-     (let ((plain-version? (string=? version (go-version->git-ref version)))
-           (v-prefixed?    (string-prefix? "v" version)))
-       `(origin
-          (method git-fetch)
-          (uri (git-reference
-                (url ,vcs-repo-url)
-                ;; This is done because the version field of the package,
-                ;; which the generated quoted expression refers to, has been
-                ;; stripped of any 'v' prefixed.
-                (commit ,(if (and plain-version? v-prefixed?)
-                             '(string-append "v" version)
-                             '(go-version->git-ref version)))))
-          (file-name (git-file-name name version))
-          (sha256
-           (base32
-            ,(bytevector->nix-base32-string
-              (git-checkout-hash vcs-repo-url (go-version->git-ref version)
-                                 (hash-algorithm sha256))))))))
+     (git->origin vcs-repo-url `(tag-or-commit . ,version)
+                  #:ref->commit transform-version))
     ((hg)
      `(origin
         (method hg-fetch)
@@ -649,7 +625,8 @@ (define* (go-module->guix-package module-path #:key
         (name ,guix-name)
         (version ,(strip-v-prefix version*))
         (source
-         ,(vcs->origin vcs-type vcs-repo-url version*))
+         ,(vcs->origin vcs-type vcs-repo-url version*
+                       #:transform-version transform-version))
         (build-system go-build-system)
         (arguments
          (list ,@(if (version>? min-go-version (package-version (go-package)))
diff --git a/guix/import/minetest.scm b/guix/import/minetest.scm
index 5ea6e023ce..65ef242431 100644
--- a/guix/import/minetest.scm
+++ b/guix/import/minetest.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2021, 2022 Maxime Devos <maximedevos@HIDDEN>
 ;;; Copyright © 2022 Hartmut Goebel <h.goebel@HIDDEN>
+;;; Copyright © 2023 Nicolas Graves <ngraves@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -32,7 +33,6 @@ (define-module (guix import minetest)
   #:use-module (guix import utils)
   #:use-module (guix import json)
   #:use-module (json)
-  #:use-module (guix base32)
   #:use-module (guix git)
   #:use-module ((guix git-download) #:prefix download:)
   #:use-module (guix hash)
@@ -277,12 +277,6 @@ (define url (string-append (%contentdb-api) "packages/?type=" type
 
 
 
-;; XXX copied from (guix import elpa)
-(define* (download-git-repository url ref)
-  "Fetch the given REF from the Git repository at URL."
-  (with-store store
-    (latest-repository-commit store url #:ref ref)))
-
 (define (make-minetest-sexp author/name version repository commit
                             inputs home-page synopsis
                             description media-license license)
@@ -293,24 +287,8 @@ (define (make-minetest-sexp author/name version repository commit
      (name ,(contentdb->package-name author/name))
      (version ,version)
      (source
-       (origin
-         (method git-fetch)
-         (uri (git-reference
-                (url ,repository)
-                (commit ,commit)))
-         (sha256
-          (base32
-           ;; The git commit is not always available.
-           ,(and commit
-                 (bytevector->nix-base32-string
-                  (file-hash*
-                   (download-git-repository repository
-                                            `(commit . ,commit))
-                   ;; 'download-git-repository' already filtered out the '.git'
-                   ;; directory.
-                   #:select? (const #true)
-                   #:recursive? #true)))))
-         (file-name (git-file-name name version))))
+      ,(git->origin
+        repository `(tag-or-commit . ,commit) #:ref->commit #t))
      (build-system minetest-mod-build-system)
      ,@(maybe-propagated-inputs (map contentdb->package-name inputs))
      (home-page ,home-page)
diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index 0cf52cdbde..47254539a1 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -13,6 +13,7 @@
 ;;; Copyright © 2022 Alice Brenon <alice.brenon@HIDDEN>
 ;;; Copyright © 2022 Kyle Meyer <kyle@HIDDEN>
 ;;; Copyright © 2022 Philip McGrath <philip@HIDDEN>
+;;; Copyright © 2023 Nicolas Graves <ngraves@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -39,6 +40,8 @@ (define-module (guix import utils)
   #:use-module (guix packages)
   #:use-module (guix discovery)
   #:use-module (guix build-system)
+  #:use-module (guix git)
+  #:use-module (guix hash)
   #:use-module ((guix i18n) #:select (G_))
   #:use-module (guix store)
   #:use-module (guix download)
@@ -63,6 +66,7 @@ (define-module (guix import utils)
 
             url-fetch
             guix-hash-url
+            git->origin
 
             package-names->package-inputs
             maybe-inputs
@@ -161,6 +165,41 @@ (define (guix-hash-url filename)
   "Return the hash of FILENAME in nix-base32 format."
   (bytevector->nix-base32-string (file-sha256 filename)))
 
+(define* (git->origin repo-url ref #:key (ref->commit #f))
+  "Returns a generated `origin' block of a package depending on the git source
+control system, and the directory in the store where the package has been
+downloaded, in case further processing is necessary.  REPO-URL or REF can be
+null. REF->COMMIT can be a function or #t, in which case the commit matching
+ref is used. If REF->COMMIT is not used, the value inside REF is used."
+  (let* ((version (and (pair? ref) (cdr ref)))
+         (directory commit
+                    (if version
+                        (with-store store
+                          (latest-repository-commit store repo-url
+                                                    #:ref (if version ref '())))
+                        (values #f #f)))
+         (vcommit (match ref->commit
+                    (#t    commit)
+                    (#f    version)
+                    ((? procedure?) (ref->commit version))
+                    (_     #f))))
+    (values
+     `(origin
+        (method git-fetch)
+        (uri (git-reference
+              (url ,(and (not (eq? repo-url 'null)) repo-url))
+              (commit ,vcommit)))
+        (file-name (git-file-name name version))
+        (sha256
+         (base32
+          ,(and version  ; Version or commit is not always available.
+                (bytevector->nix-base32-string
+                 (file-hash* directory
+                             ;; 'git-fetch' already filtered out '.git'.
+                             #:select? (const #true)
+                             #:recursive? #true))))))
+     directory)))
+
 (define %spdx-license-identifiers
   ;; https://spdx.org/licenses/
   ;; The gfl1.0, nmap, repoze
diff --git a/tests/go.scm b/tests/go.scm
index d2e8846b30..4644e1bd1c 100644
--- a/tests/go.scm
+++ b/tests/go.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2021 François Joulaud <francois.joulaud@HIDDEN>
 ;;; Copyright © 2021 Sarah Morgensen <iskarian@HIDDEN>
+;;; Copyright © 2023 Nicolas Graves <ngraves@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -24,7 +25,6 @@ (define-module (tests-import-go)
   #:use-module (guix base32)
   #:use-module (guix build-system go)
   #:use-module (guix import go)
-  #:use-module (guix base32)
   #:use-module ((guix utils) #:select (call-with-temporary-directory))
   #:use-module (guix tests)
   #:use-module (ice-9 match)
@@ -403,13 +403,26 @@ (define (mock-http-get testcase)
             (mock-http-get fixtures-go-check-test))
          (mock ((guix http-client) http-fetch
                 (mock-http-fetch fixtures-go-check-test))
-             (mock ((guix git) update-cached-checkout
-                    (lambda* (url #:key ref)
-                      ;; Return an empty directory and its hash.
-                      (values checkout
-                              (nix-base32-string->bytevector
-                               "0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5")
-                              #f)))
+             (mock ((guix import utils) git->origin
+                    ;; Mock an empty directory by replacing hash.
+                    (lambda* (repo-url ref #:key (ref->commit #f))
+                      (let* ((version (if (pair? ref)
+                                          (cdr ref)
+                                          #f))
+                             (vcommit (match ref->commit
+                                        (#t    commit)
+                                        (#f    version)
+                                        ((? procedure?) (ref->commit version))
+                                        (_     #f))))
+                        `(origin
+                           (method git-fetch)
+                           (uri (git-reference
+                                 (url ,(and (not (eq? repo-url 'null)) repo-url))
+                                 (commit ,vcommit)))
+                           (file-name (git-file-name name version))
+                           (sha256
+                            (base32
+                             "0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5"))))))
                  (go-module->guix-package* "github.com/go-check/check")))))))
 
 (test-end "go")
diff --git a/tests/minetest.scm b/tests/minetest.scm
index 78469bf95b..7ff72dbfdc 100644
--- a/tests/minetest.scm
+++ b/tests/minetest.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2021 Maxime Devos <maximedevos@HIDDEN>
+;;; Copyright © 2023 Nicolas Graves <ngraves@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -57,15 +58,7 @@ (define* (make-package-sexp #:key
   `(package
      (name ,guix-name)
      (version ,version)
-     (source
-      (origin
-        (method git-fetch)
-        (uri (git-reference
-              (url ,(and (not (eq? repo 'null)) repo))
-              (commit #f)))
-        (sha256
-         (base32 #f))
-        (file-name (git-file-name name version))))
+     (source ,(git->origin repo #f))
      (build-system minetest-mod-build-system)
      ,@(maybe-propagated-inputs inputs)
      (home-page ,home-page)
@@ -419,8 +412,8 @@ (define* (example-package #:key
            (uri (git-reference
                  (url repo)
                  (commit commit #;"808f9ffbd3106da4c92d2367b118b98196c9e81e")))
-           (sha256 #f) ; not important for the following tests
-           (file-name (git-file-name name version)))
+           (file-name (git-file-name name version))
+           (sha256 #f)) ; not important for the following tests
          source))
     (build-system minetest-mod-build-system)
     (license #f)
-- 
2.41.0





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 19 Dec 2023 18:28:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 19 13:28:50 2023
Received: from localhost ([127.0.0.1]:37320 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rFepl-0005Td-Un
	for submit <at> debbugs.gnu.org; Tue, 19 Dec 2023 13:28:50 -0500
Received: from 1.mo575.mail-out.ovh.net ([46.105.41.146]:45217)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ngraves@HIDDEN>) id 1rFepi-0005TR-Sd
 for 62202 <at> debbugs.gnu.org; Tue, 19 Dec 2023 13:28:47 -0500
Received: from director2.ghost.mail-out.ovh.net (unknown [10.109.139.47])
 by mo575.mail-out.ovh.net (Postfix) with ESMTP id 6142A2B73B
 for <62202 <at> debbugs.gnu.org>; Tue, 19 Dec 2023 18:28:42 +0000 (UTC)
Received: from ghost-submission-6684bf9d7b-64495 (unknown [10.110.178.59])
 by director2.ghost.mail-out.ovh.net (Postfix) with ESMTPS id EA8281FE04;
 Tue, 19 Dec 2023 18:28:41 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.108])
 by ghost-submission-6684bf9d7b-64495 with ESMTPSA
 id t8ARN9nggWX2ewIA4uFpDA
 (envelope-from <ngraves@HIDDEN>); Tue, 19 Dec 2023 18:28:41 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-108S00232167f89-bcc9-40cb-8b4f-986e65ece967,
 0A183DEDD9F7D7733B4F13041BD52F66DC821FED) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 81.67.140.142
From: Nicolas Graves <ngraves@HIDDEN>
To: Simon Tournier <zimon.toutoune@HIDDEN>
Subject: Re: [bug#62202] [PATCH 0/21] Juliahub import script.
In-Reply-To: <868r8l9xlr.fsf@HIDDEN>
References: <871qlq89kz.fsf@HIDDEN> <87ile69geh.fsf@HIDDEN>
 <87cyzxr1zd.fsf_-_@HIDDEN> <87fs4jf0w6.fsf@HIDDEN>
 <87bke393cn.fsf@HIDDEN> <87pm2j4l5d.fsf@HIDDEN>
 <CAJ3okZ3Nok7UtC-i=nBq+whc_HxWz1UFLBr+L+ydftgPXxbhwA@HIDDEN>
 <87wmwnj095.fsf@HIDDEN> <87led3qrts.fsf@HIDDEN>
 <875y46bqqo.fsf@HIDDEN> <868r8l9xlr.fsf@HIDDEN>
Date: Tue, 19 Dec 2023 19:28:41 +0100
Message-ID: <875y0ukpwm.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Ovh-Tracer-Id: 16202262613482857183
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: -100
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvkedrvddutddgudduvdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufgjfhffkfggtgesthdtredttddttdenucfhrhhomheppfhitgholhgrshcuifhrrghvvghsuceonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqeenucggtffrrghtthgvrhhnpeevkeelueejtdehgfffkeelkefhhffftefgvdehkeeluefhheeuleejtdejhfdvgfenucfkphepuddvjedrtddrtddruddpkedurdeijedrudegtddrudegvddpfeejrdehledrudegvddruddtkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqpdhnsggprhgtphhtthhopedupdhrtghpthhtohepiedvvddtvdesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheejhedpmhhouggvpehsmhhtphhouhht
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: Giovanni Biscuolo <g@HIDDEN>,
 Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 62202 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 2023-10-02 11:34, Simon Tournier wrote:

> Hi,
>
> On Tue, 19 Sep 2023 at 08:51, Nicolas Graves via Guix-patches via <guix-patches@HIDDEN> wrote:
>
>>> My plan is to give a look to the series this week.
>
> [...]
>
>> Thanks a lot and good luck, sorry, quite hard to find time recently. 
>
> I pause a bit.  If someone is motivated, feel free to pick it.  Else I
> will resume when I will be able to dedicate some time for that.

Will probably try to give it a go, either this evening or during winter
vacation. Could you point out if some changes other than properly
rebasing have been done at the point of the DRAFT V2 ? Thanks! 


>
> Cheers,
> simon
>
>
>

-- 
Best regards,
Nicolas Graves




Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 2 Oct 2023 09:35:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 02 05:34:59 2023
Received: from localhost ([127.0.0.1]:36061 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qnFKI-000216-N9
	for submit <at> debbugs.gnu.org; Mon, 02 Oct 2023 05:34:59 -0400
Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:38294)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1qnFKG-00020n-AT
 for 62202 <at> debbugs.gnu.org; Mon, 02 Oct 2023 05:34:53 -0400
Received: by mail-wr1-x430.google.com with SMTP id
 ffacd0b85a97d-32337a39009so1902505f8f.1
 for <62202 <at> debbugs.gnu.org>; Mon, 02 Oct 2023 02:34:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1696239270; x=1696844070; darn=debbugs.gnu.org;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=sieRh38MWU7znDzXjt3bEZijUpO/WRyA4dtHh0li1NU=;
 b=ntHIy5K3agFwqulNSKFW1BCMO3zTAh4Jw7skO490VvaMRcojjhKZPu54jCot/wPODB
 7Lxy6s8ApLBkEka+xveheQfi/2ZtEPC2tUeqLNXbq0dKNBiUhajSkineSWzEW1TGkZ5k
 vwvnZ2A9jibVAfOEVIf/NMIyQJkAHyn/nMoxnh/ibF2snVOYTTVU2oSIbtrzn3rWgwxm
 rqR7XctyasrWwn3DgIY9dNHLGTYSJvz8mvafEDITLzH2pPeckSdMn4L6FI6ST6UBEhj8
 oqFv8zE05czZhsKXAJtudkA6HXgucEmT9qBunpV+tjkjSYbbLkWBK6IjeGZRzqy2pW6L
 Qzqg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1696239270; x=1696844070;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=sieRh38MWU7znDzXjt3bEZijUpO/WRyA4dtHh0li1NU=;
 b=kb+OFzlg5HCkEL1BtNHDp2ehgKtExX2HcUq/019N4d8YLyanO9QjWhcw160fvUznvt
 t/nlypa/EWImIpTQtJhGtbO0Pn7QTTHWhhDwqCqU1h1o/TkTHBpz50CAN1Ay74e0U8Ih
 eXoGaGCYt4LTbyCELHcYcq0lwgzQwhcT2ETRxQZ3Sngrthj4/fm1TpEuZnu4w1ei9CyT
 MxOtDfihKoyDC/66n5N1CrzV58PhheVXQDMWbXclAAgekvxR0ytZ9LKvPKfMglP7GC1E
 4hjxE1LTy52+0bf0k/o9ZHT4sQa4SvIZzrHrNlh+FXQ0i76n/WKJZIa3sfo8Up4/H9UI
 rSnA==
X-Gm-Message-State: AOJu0YwbSc4iXyaaHHbOW8ei1P6ROHWfZNjGqw6NqWYVDjvrWHitrqGb
 u4Aeeob7J4nIEyqJs/1rVVS21na84QI=
X-Google-Smtp-Source: AGHT+IF9Sn3iK/s6qMEnONXphHPaCekoz155ir6OWYfk8El9GxbzMUuobuVV75oA/gzpulKe8y3gRQ==
X-Received: by 2002:a5d:526b:0:b0:321:547b:f060 with SMTP id
 l11-20020a5d526b000000b00321547bf060mr8646222wrc.1.1696239269713; 
 Mon, 02 Oct 2023 02:34:29 -0700 (PDT)
Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e])
 by smtp.gmail.com with ESMTPSA id
 s28-20020adfa29c000000b003232f167df5sm17251680wra.108.2023.10.02.02.34.28
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 02 Oct 2023 02:34:29 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: Nicolas Graves <ngraves@HIDDEN>
Subject: Re: [bug#62202] [PATCH 0/21] Juliahub import script.
In-Reply-To: <875y46bqqo.fsf@HIDDEN>
References: <871qlq89kz.fsf@HIDDEN> <87ile69geh.fsf@HIDDEN>
 <87cyzxr1zd.fsf_-_@HIDDEN> <87fs4jf0w6.fsf@HIDDEN>
 <87bke393cn.fsf@HIDDEN> <87pm2j4l5d.fsf@HIDDEN>
 <CAJ3okZ3Nok7UtC-i=nBq+whc_HxWz1UFLBr+L+ydftgPXxbhwA@HIDDEN>
 <87wmwnj095.fsf@HIDDEN> <87led3qrts.fsf@HIDDEN>
 <875y46bqqo.fsf@HIDDEN>
Date: Mon, 02 Oct 2023 11:34:24 +0200
Message-ID: <868r8l9xlr.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: Giovanni Biscuolo <g@HIDDEN>,
 Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 62202 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi,

On Tue, 19 Sep 2023 at 08:51, Nicolas Graves via Guix-patches via <guix-patches@HIDDEN> wrote:

>> My plan is to give a look to the series this week.

[...]

> Thanks a lot and good luck, sorry, quite hard to find time recently. 

I pause a bit.  If someone is motivated, feel free to pick it.  Else I
will resume when I will be able to dedicate some time for that.

Cheers,
simon




Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 19 Sep 2023 08:09:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 19 04:09:47 2023
Received: from localhost ([127.0.0.1]:55315 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qiVnm-0003MW-KD
	for submit <at> debbugs.gnu.org; Tue, 19 Sep 2023 04:09:47 -0400
Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:39274)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1qiVnS-0003LZ-MU
 for 62202 <at> debbugs.gnu.org; Tue, 19 Sep 2023 04:09:41 -0400
Received: by mail-wm1-x332.google.com with SMTP id
 5b1f17b1804b1-404724ec0dcso14100875e9.1
 for <62202 <at> debbugs.gnu.org>; Tue, 19 Sep 2023 01:09:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1695110952; x=1695715752; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:message-id:date:references
 :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id
 :reply-to; bh=ugisSKInIezxRVtUvkAub8n9JNKXZt821BDXzi0V4AQ=;
 b=JydLCmNWlrDH0NjdAmY2l9VGY0dMbMcxAjJbYcUb9dhtKQUOPMaQ0Vrkx5YPPL9hkN
 hSFtUGPrHkG1PZyj6nTpB6aoVuAhqYkxhk8IwRoXlJs6npU8xG67wcIpNjffP70tRJZt
 jBrdHNqqpD+mw7TNySmZZoznCgFFsF/OhgcwjaJCH5DWVm8ZQepa4UhDmQNAZvyRyNl0
 2Uw9Xh1exvtWNipcCgjqAxF1twWlGC910F7zKRV6FOAHs1m4bT7zAjWnevWbLVGN9rBR
 AzcvC61jis2HDCyhH75TQ7nEIAZZEuFzcOEMwbVWiY5Rwbi064NF/cgM7QuOk9M3owbn
 GOYQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1695110952; x=1695715752;
 h=content-transfer-encoding:mime-version:message-id:date:references
 :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=ugisSKInIezxRVtUvkAub8n9JNKXZt821BDXzi0V4AQ=;
 b=gYdfDdhRye5Q0QbD7VsFq7j1xViihvyhkGW+YQ+KtxZwkqrp5VsmKQO1JhS/KYakQC
 XRXzWnFj8OuHtONjs/15DUgPd5phEYqwyo45wcYCBrKoGfmm2P8jfjaR88R4JFCNcvhq
 hweRWFazIPCc5m3qAc1JFuhF0vemeu1n6ALTvakrD7O2C8UxMRggrmOAxbbMTS9lLvL4
 cd73rdmsBnBm0/+/ZVbtld3CcM6718+aJlYoCRIWcPgFfEIPhGv4g4bNS+wWSAGzHAfj
 mW1OKWvzhv3F/TjVa2kzlA+oK4ZDdaXcXn2wUfgOiIX+TK9FqYxqtW93iRVnTici72D+
 k67A==
X-Gm-Message-State: AOJu0YyH01JDCgpCfUps6nHiWzIW91yobSZUGFpg0Y1lz5aT2gNxg9eV
 OUDiYdsGkxHQYDEoZybwjTmRR8iDB0E=
X-Google-Smtp-Source: AGHT+IG/QG5Ap3g9bk5EPm8D8uf83W8HNi5DNYW1+CVVLQLp6Xl7DZiyyHEMmT3a47kja6VfTvq95A==
X-Received: by 2002:a05:600c:3ba3:b0:3fe:dd78:8fbc with SMTP id
 n35-20020a05600c3ba300b003fedd788fbcmr10216501wms.3.1695110951744; 
 Tue, 19 Sep 2023 01:09:11 -0700 (PDT)
Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e])
 by smtp.gmail.com with ESMTPSA id
 p14-20020a1c740e000000b003fe407ca05bsm17400326wmc.37.2023.09.19.01.09.10
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 19 Sep 2023 01:09:11 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: Giovanni Biscuolo <g@HIDDEN>
Subject: Re: [bug#62202] [PATCH 0/21] Juliahub import script.
In-Reply-To: <87v8c64r72.fsf@HIDDEN>
References: <871qlq89kz.fsf@HIDDEN> <87ile69geh.fsf@HIDDEN>
 <87cyzxr1zd.fsf_-_@HIDDEN> <87fs4jf0w6.fsf@HIDDEN>
 <87bke393cn.fsf@HIDDEN> <87pm2j4l5d.fsf@HIDDEN>
 <CAJ3okZ3Nok7UtC-i=nBq+whc_HxWz1UFLBr+L+ydftgPXxbhwA@HIDDEN>
 <87wmwnj095.fsf@HIDDEN> <87led3qrts.fsf@HIDDEN>
 <87v8c64r72.fsf@HIDDEN>
Date: Tue, 19 Sep 2023 08:37:24 +0200
Message-ID: <864jjqmzx7.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>,
 Nicolas Graves <ngraves@HIDDEN>, 62202 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi,

On Tue, 19 Sep 2023 at 08:23, Giovanni Biscuolo <g@HIDDEN> wrote:

> out of curiosity, what do you mean by "manually" please?  I mean: ho did
> you got to apply the patches?

I mean literally. ;-)

Open the patch, read it and then open the file, modify it, commit.
Repeat.

Else, I just pipe the message with =E2=80=9Cgit am -3s=E2=80=9D.

Cheers,
simon





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 19 Sep 2023 06:51:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 19 02:51:29 2023
Received: from localhost ([127.0.0.1]:55208 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qiUa0-0000zh-KK
	for submit <at> debbugs.gnu.org; Tue, 19 Sep 2023 02:51:28 -0400
Received: from 5.mo581.mail-out.ovh.net ([178.32.120.239]:57605)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ngraves@HIDDEN>) id 1qiUZu-0000zU-Pm
 for 62202 <at> debbugs.gnu.org; Tue, 19 Sep 2023 02:51:26 -0400
Received: from director10.ghost.mail-out.ovh.net (unknown [10.109.156.41])
 by mo581.mail-out.ovh.net (Postfix) with ESMTP id 83C6125BE8
 for <62202 <at> debbugs.gnu.org>; Tue, 19 Sep 2023 06:51:12 +0000 (UTC)
Received: from ghost-submission-6684bf9d7b-q6b6x (unknown [10.109.143.63])
 by director10.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 007FE1FD74;
 Tue, 19 Sep 2023 06:51:11 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.105])
 by ghost-submission-6684bf9d7b-q6b6x with ESMTPSA
 id IzzHOd9ECWVzkQQAxx48XA
 (envelope-from <ngraves@HIDDEN>); Tue, 19 Sep 2023 06:51:11 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-105G00600b30b7e-0853-4b31-af9e-4f3b5859300e,
 A8C677103715E5F16B473F025FA02A7A842CA6A0) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 81.67.140.142
From: Nicolas Graves <ngraves@HIDDEN>
To: Simon Tournier <zimon.toutoune@HIDDEN>
Subject: Re: [bug#62202] [PATCH 0/21] Juliahub import script.
In-Reply-To: <87led3qrts.fsf@HIDDEN>
References: <871qlq89kz.fsf@HIDDEN> <87ile69geh.fsf@HIDDEN>
 <87cyzxr1zd.fsf_-_@HIDDEN> <87fs4jf0w6.fsf@HIDDEN>
 <87bke393cn.fsf@HIDDEN> <87pm2j4l5d.fsf@HIDDEN>
 <CAJ3okZ3Nok7UtC-i=nBq+whc_HxWz1UFLBr+L+ydftgPXxbhwA@HIDDEN>
 <87wmwnj095.fsf@HIDDEN> <87led3qrts.fsf@HIDDEN>
Date: Tue, 19 Sep 2023 08:51:11 +0200
Message-ID: <875y46bqqo.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Ovh-Tracer-Id: 4962966792799183583
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: -100
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedviedrudejledguddufecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufgjfhffkfggtgesthdtredttddttdenucfhrhhomheppfhitgholhgrshcuifhrrghvvghsuceonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqeenucggtffrrghtthgvrhhnpeevkeelueejtdehgfffkeelkefhhffftefgvdehkeeluefhheeuleejtdejhfdvgfenucfkphepuddvjedrtddrtddruddpkedurdeijedrudegtddrudegvddpfeejrdehledrudegvddruddtheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqpdhnsggprhgtphhtthhopedupdhrtghpthhtohepiedvvddtvdesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheekuddpmhhouggvpehsmhhtphhouhht
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: Giovanni Biscuolo <g@HIDDEN>,
 Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 62202 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 2023-09-18 20:06, Simon Tournier wrote:

> Hi Nicolas,
>
> On Mon, 18 Sep 2023 at 11:31, Nicolas Graves via Guix-patches via <guix-patches@HIDDEN> wrote:
>
>> Couldn't find time this wkend, but it's on my backlog, I'll try to do
>> that soon.
>
> No worry.  I did it manually. :-)
>
> I have sent v2 which is just your patches applied the top of
> 3d9ebc7b2ed24312fd6a0916c203f7b86d57753d.
>
> My plan is to give a look to the series this week.

Just note that in my experience, the juliahub importer worked quite
well (there was sometimes errors, mainly annoying with recursive imports
when the git repository didn't have any tag IIRC, not sure if I had
fixed that or not). The other annoying thing was that the factorization
broke the go importer IIRC.

But these fixes shouldn't be too hard compared to the initial effort to
make the importer. 

Thanks a lot and good luck, sorry, quite hard to find time recently. 

> Cheers,
> simon

-- 
Best regards,
Nicolas Graves




Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 19 Sep 2023 06:23:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 19 02:23:42 2023
Received: from localhost ([127.0.0.1]:55163 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qiU98-0003Fq-47
	for submit <at> debbugs.gnu.org; Tue, 19 Sep 2023 02:23:42 -0400
Received: from ns13.heimat.it ([46.4.214.66]:54768)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <g@HIDDEN>) id 1qiU95-0003Fb-OI
 for 62202 <at> debbugs.gnu.org; Tue, 19 Sep 2023 02:23:40 -0400
Received: from localhost (ip6-localhost [127.0.0.1])
 by ns13.heimat.it (Postfix) with ESMTP id A18A23009C1;
 Tue, 19 Sep 2023 06:23:24 +0000 (UTC)
X-Virus-Scanned: Debian amavisd-new at ns13.heimat.it
Received: from ns13.heimat.it ([127.0.0.1])
 by localhost (ns13.heimat.it [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id orUAwPHUYt2G; Tue, 19 Sep 2023 06:23:23 +0000 (UTC)
Received: from bourrache.mug.xelera.it (unknown [93.56.171.217])
 (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by ns13.heimat.it (Postfix) with ESMTPSA id 4A3173009C0;
 Tue, 19 Sep 2023 06:23:23 +0000 (UTC)
Received: from roquette.mug.biscuolo.net (roquette [10.38.2.14])
 by bourrache.mug.xelera.it (Postfix) with SMTP id AD65F29E6CD8;
 Tue, 19 Sep 2023 08:23:22 +0200 (CEST)
Received: (nullmailer pid 8927 invoked by uid 1000);
 Tue, 19 Sep 2023 06:23:22 -0000
From: Giovanni Biscuolo <g@HIDDEN>
To: Simon Tournier <zimon.toutoune@HIDDEN>
Subject: Re: [bug#62202] [PATCH 0/21] Juliahub import script.
In-Reply-To: <87led3qrts.fsf@HIDDEN>
Organization: Xelera.eu
References: <871qlq89kz.fsf@HIDDEN> <87ile69geh.fsf@HIDDEN>
 <87cyzxr1zd.fsf_-_@HIDDEN> <87fs4jf0w6.fsf@HIDDEN>
 <87bke393cn.fsf@HIDDEN> <87pm2j4l5d.fsf@HIDDEN>
 <CAJ3okZ3Nok7UtC-i=nBq+whc_HxWz1UFLBr+L+ydftgPXxbhwA@HIDDEN>
 <87wmwnj095.fsf@HIDDEN> <87led3qrts.fsf@HIDDEN>
Date: Tue, 19 Sep 2023 08:23:13 +0200
Message-ID: <87v8c64r72.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>,
 Nicolas Graves <ngraves@HIDDEN>, 62202 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hi Simon,

Simon Tournier <zimon.toutoune@HIDDEN> writes:

[...]

> No worry.  I did it manually. :-)

out of curiosity, what do you mean by "manually" please?  I mean: ho did
you got to apply the patches?

I'm asking because it could be helpful to others

> I have sent v2 which is just your patches applied the top of
> 3d9ebc7b2ed24312fd6a0916c203f7b86d57753d.
>
> My plan is to give a look to the series this week.

thank you!

Happy hacking! Gio'

=2D-=20
Giovanni Biscuolo

Xelera IT Infrastructures

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQJABAEBCgAqFiEERcxjuFJYydVfNLI5030Op87MORIFAmUJPlEMHGdAeGVsZXJh
LmV1AAoJENN9DqfOzDkSYPQQALZLeQUhGIShoxyTtAk6eX/GGcDWoB0y9Ccz131b
LahCl0JX4e9PJ7UdnVarBBVO2l8JM6UwOCooXa1P+d5TJE7TOFkAdYOvzNsy5PGt
efYksTZgeVTV6cpWZkT5Ptq8ITMnyvK5YxFxoa8+29031VA/qWTbF6WRIBkOifVc
rZQqABO8GQd0IiUK2fah+xnzAE4mxzvxQSvkw5XSWd8IoXSbNs47OwH9UOSBUFOD
kZo6KtyZjwWYOSp2KDw5KucB8xnuBSPecqqeVWChgJcHFA5AW1rY2bO8e58nIMuY
izRmcPShuWcXyky1ZeQyVd34Jmm5qq4GWGfWO6587OKeSvxiaef0xmTju1H4Lb3L
BLit4+7ObFe+4CO0vL6tZL7CvRS4udJkpxUKueIheVi9Y5utNHgyz8NEIPM0oC1s
rFiM9IVe5SXFbHHVnlhHW7mQWT/WSECHbjcFkOqUmLl2MmcG2lOV1UJiz6jVU6aI
CB6PNLPuWE9RAMMjjtxMsWw2bLWAU5R+qRwY19LkmJQTwhVRhlbniVMz9tsdkXVF
umIUCmw+o22hKFo4TFXSieQUYUS1k/0hzyySO/S1CBNfZkkdu/98xD0Mf+eBMlNr
FHxvboKccDD7OkIw+ceP+ZWPVdrVvW7K+farvpX8ZYk7X6vbaLbI4iyyedUXaB3O
nPJ6
=P6PQ
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 18 Sep 2023 19:29:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 18 15:29:14 2023
Received: from localhost ([127.0.0.1]:54572 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qiJvm-0004ho-8R
	for submit <at> debbugs.gnu.org; Mon, 18 Sep 2023 15:29:14 -0400
Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:40183)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1qiJvh-0004hV-40
 for 62202 <at> debbugs.gnu.org; Mon, 18 Sep 2023 15:29:12 -0400
Received: by mail-wm1-x32d.google.com with SMTP id
 5b1f17b1804b1-40471c054f9so14540575e9.0
 for <62202 <at> debbugs.gnu.org>; Mon, 18 Sep 2023 12:29:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1695065335; x=1695670135; darn=debbugs.gnu.org;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=ooXeNEqu6dLXjxyHlbFSgV54LfDbcL32vAWHl1XBOOQ=;
 b=S58DaErh3BMCtjWDIL/GtttztHntWawii8o784KDPMsE1mcZZIkrgUvnFxgyiVxV04
 cNiXBTWGGSTdILdB0Dsn1WGaCf2bAYjCyMRIZtcZMp1X3RGABzvOz/Xn9Gh/a1X3KTSZ
 JKz8Zh9Pw9/krf+Uwd+xA1fN0AwU3pCaxfGbs6JJp9OF6vc5gAe7+7dJpx/HUmy+Ms/L
 CtCxJuwBRG8RwH9AFtc5HFIU2nJDnxGuE4sra2kB3AKzg1vyDIVc6fSTWyjhepopQDvB
 IFmMy3y4d/xOZj2eWPwgSIu6hGm3C14AIp+uXgsf+2DBO278WHfGPk9z1a8s7dNKszis
 G2rA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1695065335; x=1695670135;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=ooXeNEqu6dLXjxyHlbFSgV54LfDbcL32vAWHl1XBOOQ=;
 b=fAVtem37lNaTHmdYeL8qN9QsPhBqjG95ZPzRWhog7EsnfKZm86CSUS+J3j8w07roFD
 i5Hoon2Ied+xwbZIIk1dwPzZB3XpEBvQ02QnGOu3dRbf74vw7n8bjFYL2le14uTX4rSL
 +1o4sJUkxilxtYPby3TEhdSpLZlHt5y9qsRqdvztl9suRRkBbgvSUhJkOlpkd9hI03P8
 X5vByorOZEZBC5HM96oZiEUppHb8CT7rBWpRuoItLdr0jeNOEi4YJRg/zi7joJt5Q8EO
 FJ88utNvbKsU1IV7edaAj9MZezuKa6B+sTVebKwER+oDBONqLdvOVSfkWf9nRDmAlNaD
 feSA==
X-Gm-Message-State: AOJu0YwN5B9/MiIfw/bCW/gWzUYztZeI/9UiXKqGO6GTMj+RKKEpzqG9
 DLwqGcMda8GHHSBhBFVpn94+9UO0uGs=
X-Google-Smtp-Source: AGHT+IEQYnErZp5rvBnQgw+2vQkPIUM/sS2uJSt8I2OgqAV3JWBOZESh1b+c+dciK1xFTTa9I98h2Q==
X-Received: by 2002:a05:600c:5103:b0:401:faf5:85c3 with SMTP id
 o3-20020a05600c510300b00401faf585c3mr9711158wms.0.1695065334546; 
 Mon, 18 Sep 2023 12:28:54 -0700 (PDT)
Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id
 26-20020a05600c229a00b003fe17901fcdsm16043206wmf.32.2023.09.18.12.28.53
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 18 Sep 2023 12:28:54 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: Nicolas Graves <ngraves@HIDDEN>
Subject: Re: [bug#62202] [PATCH 0/21] Juliahub import script.
In-Reply-To: <87wmwnj095.fsf@HIDDEN>
References: <871qlq89kz.fsf@HIDDEN> <87ile69geh.fsf@HIDDEN>
 <87cyzxr1zd.fsf_-_@HIDDEN> <87fs4jf0w6.fsf@HIDDEN>
 <87bke393cn.fsf@HIDDEN> <87pm2j4l5d.fsf@HIDDEN>
 <CAJ3okZ3Nok7UtC-i=nBq+whc_HxWz1UFLBr+L+ydftgPXxbhwA@HIDDEN>
 <87wmwnj095.fsf@HIDDEN>
Date: Mon, 18 Sep 2023 20:06:23 +0200
Message-ID: <87led3qrts.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: Giovanni Biscuolo <g@HIDDEN>,
 Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 62202 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Nicolas,

On Mon, 18 Sep 2023 at 11:31, Nicolas Graves via Guix-patches via <guix-patches@HIDDEN> wrote:

> Couldn't find time this wkend, but it's on my backlog, I'll try to do
> that soon.

No worry.  I did it manually. :-)

I have sent v2 which is just your patches applied the top of
3d9ebc7b2ed24312fd6a0916c203f7b86d57753d.

My plan is to give a look to the series this week.

Cheers,
simon




Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 18 Sep 2023 18:04:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 18 14:04:20 2023
Received: from localhost ([127.0.0.1]:54409 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qiIbb-0002KK-KI
	for submit <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:19 -0400
Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:38092)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1qiIbL-0002Ey-C1
 for 62202 <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:08 -0400
Received: by mail-wr1-x435.google.com with SMTP id
 ffacd0b85a97d-31f7c87353eso946134f8f.0
 for <62202 <at> debbugs.gnu.org>; Mon, 18 Sep 2023 11:03:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1695060229; x=1695665029; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=YFCmO8dV8DFWrz0oxqL6li2rEi3rlUfKiz+4CsCSISY=;
 b=lRohZYewHVNjENqT43wYm8rehQWXb3JICiGNrtSEJ+XtCQnYCGAu0xhvv4GhYIezcN
 OgS8o4lAnHi0soX4ZyZAs5SuUMSAV+xZX1Fu4ei7BpayHkbaLoUz8nv4ZGUsQaVSIR8Z
 jbK2fjV3KUvZ2lSNZjIcHVY5f76CHZAhR5VbzCbhqNuP6HSREtuK088gRUp4G+R7KWO/
 B9UcmACEWUjtjLJQdvAVBWeOKqEiBOaPkHRgR42mYtBfAovT5E6h1xKp8XiU+3B1Gnqg
 /64BhXCxHyTvoRMACni/i57w9DlB5DhYivQkK/PLs696m2oeIUK7a4rrgpLT5jdpyIi7
 euVg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1695060229; x=1695665029;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=YFCmO8dV8DFWrz0oxqL6li2rEi3rlUfKiz+4CsCSISY=;
 b=i+QqxJjzcvOUBt5zCbos2JrHpQm9vCnWI6PyayGOWS4mc0qjr/YIIK62OhcAdypigb
 mXlpdCk4vzWE+fh2Su0yPf3scBVVMzI6nWAbFDuuXSOBGKK7oFO83FAO60LcqsvICIbQ
 U27JAjOBYcJRbxy4aEOCU8FprBgj0lZr0szQ0UPvVdNGU5JGy2YZkKt4VoT3Pgafv8K6
 aX/crSpEuY1EHV0oMerXGIqJ5ifKI9SNcg8Qzugm8DsAHlumhyu6OGJDIOxynxF1/zZj
 NgpmVQYmG4MlPrzw2Kny+0DfCVV1MlktUViMmDKn31f79TtQkg02S6KgofwMdEtvUnCd
 rsuA==
X-Gm-Message-State: AOJu0YwiIJkwaxWcQT4hrIY5o/a5GeFJyQqv+OKCK6Urjn/Jy/D8s4nN
 oY1XjGAfq+kM4+1GuFTP9rN9520259g=
X-Google-Smtp-Source: AGHT+IGyQDYZ3LyqQwj0GzmXUwEWlYZdEhdNcs/M4KeZYC4ikYGJPYxR5NaSATkW3zJXvJxBjwhf+A==
X-Received: by 2002:adf:f742:0:b0:31a:e29f:5eab with SMTP id
 z2-20020adff742000000b0031ae29f5eabmr7658707wrp.7.1695060229259; 
 Mon, 18 Sep 2023 11:03:49 -0700 (PDT)
Received: from localhost.localdomain ([193.48.40.241])
 by smtp.gmail.com with ESMTPSA id
 z2-20020adfd0c2000000b0030ada01ca78sm2210465wrh.10.2023.09.18.11.03.48
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 18 Sep 2023 11:03:49 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH v2 19/23] DRAFT import: juliahub: Fix license management.
Date: Mon, 18 Sep 2023 20:03:26 +0200
Message-Id: <80498439f6fb5e349b5e9fc643e6538a361983fd.1695060058.git.zimon.toutoune@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
References: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: Nicolas Graves via Guix-patches via <guix-patches@HIDDEN>,
 Simon Tournier <zimon.toutoune@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

From: Nicolas Graves via Guix-patches via <guix-patches@HIDDEN>

Signed-off-by: Simon Tournier <zimon.toutoune@HIDDEN>
---
 guix/import/juliahub.scm | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index 338f0424414c..e4b26bea340a 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -248,10 +248,10 @@ (define* (juliahub-fetch name #:key (version #f))
     (and=> (json-fetch url) json->juliahub-package)))
 
 (define (make-julia-sexp name source home-page synopsis description
-                         direct-dependencies test-dependencies-names licenses)
+                         direct-dependencies test-dependencies-names license)
   "Return the `package' s-expression for a Julia package with the given NAME,
 VERSION, URI, HASH, HOME-PAGE, DESCRIPTION, DIRECT-DEPENDENCIES,
-TEST-DEPENDENCIES-NAMES and LICENSES."
+TEST-DEPENDENCIES-NAMES and LICENSE."
   `(package
      (name ,(julia-name->guix-name name))
      (version ,version)
@@ -270,10 +270,8 @@ (define (make-julia-sexp name source home-page synopsis description
      (synopsis ,synopsis)
      (description ,description)
      (home-page ,home-page)
-     (license ,(match licenses
-                 (() #f)
-                 ((license) (license->symbol license))
-                 (_ `(list ,@(map license->symbol licenses)))))))
+     (license
+      ,(if license (spdx-string->license license) #f))))
 
 (define* (juliahub->guix-package package-name
                                  #:key version #:allow-other-keys)
@@ -301,9 +299,6 @@ (define* (juliahub->guix-package package-name
                  (dependencies-names
                   (map juliahub-dependency-name
                        direct-dependencies))
-                 (licenses
-                  (map spdx-string->license
-                       (list (juliahub-package-license package))))
                  (test-dependencies-names
                   (if subdir
                       (parse-test-dependencies
@@ -319,7 +314,7 @@ (define* (juliahub->guix-package package-name
                       (juliahub-package-readme package))
                      direct-dependencies
                      test-dependencies-names
-                     licenses)
+                     (juliahub-package-license package))
                     (append dependencies-names test-dependencies-names))))
         (values #f '()))))
 
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 18 Sep 2023 18:04:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 18 14:04:19 2023
Received: from localhost ([127.0.0.1]:54407 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qiIbb-0002KB-AP
	for submit <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:19 -0400
Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:41044)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1qiIbO-0002Fg-3o
 for 62202 <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:06 -0400
Received: by mail-wm1-x336.google.com with SMTP id
 5b1f17b1804b1-40506bfca64so5345975e9.0
 for <62202 <at> debbugs.gnu.org>; Mon, 18 Sep 2023 11:03:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1695060232; x=1695665032; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=Ymgdk1wbzUZliB1FfAolo6a/xkod9pbMDcWo2fzsP0Y=;
 b=GGr7/rYfgVbCUxjaMI64ntr0DUiWEmhFP6/3GExDylfPVpvtqepy+Nt/mskmdsd+6p
 vP42S1UrZvQ105HyKYtrGNZ8FBedyGtXn4i+lqJ5MA3jMO+Kh/t8PyIlVncdhIchmhw/
 TOo9cSTotwcDABBGwwlcG26WPRTU38jO6aMqSxijhaDsKG8eHQyGcPtgDnCXLNElD6St
 gqzI5eom8scIi0PlxlvXQLBvt66XCJSEtCSYH49kgrrabDlAr+lb0KHxORRo/SXIVXt3
 hNb4lMa/vztm869xWgQw0Eo/sEaXiqbHW2EK38PLDAc4keTRlMbJCgfXhfAMno3BpfHT
 ctrA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1695060232; x=1695665032;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=Ymgdk1wbzUZliB1FfAolo6a/xkod9pbMDcWo2fzsP0Y=;
 b=AxmjMO5rebl8+GftJVzjPkRcNCU4yq76GEQiNvLR1No67aELdmvqiU7evAlDCaeaCg
 iM15xf5uuLwTntMTJDnCS1mIlmkI/H87sR++ziroLbBi77pvd3sTjkzzC7nKoiAR243w
 8OGs4ynCCZukASolZobkDimjHhaDNHkZUrxLnDy0RUz8XtcssVx0YunDMx9FgdDNpYtU
 VPTQHhyfM4uqlSr3MboOh5t5QHl3H3C1VOhfTOlqxN3WND26WcueKIhkhiV8Cvl8sFhY
 8GYZwYdrGpYjY3gGzC45ijNKl0LkMRPWjYyCi8aFqROgGefeUBY05/jWdk/vVHoC1J63
 pP5w==
X-Gm-Message-State: AOJu0YyEwRX/0rFWuDUVQxT77+M4ez+sItqI9gNHm6uLBI3GGDdWXHEh
 TjHko0V8zmuOaU+aubmNjRM7R+2z3dY=
X-Google-Smtp-Source: AGHT+IHVsNwTyNScu5FC13OK3Pmof+7+lgSQFMzt0rCjlh2PauKklRvZL7XaJkoTY4BKZbTNxAicew==
X-Received: by 2002:a5d:484a:0:b0:31a:ea18:c516 with SMTP id
 n10-20020a5d484a000000b0031aea18c516mr8307066wrs.3.1695060231655; 
 Mon, 18 Sep 2023 11:03:51 -0700 (PDT)
Received: from localhost.localdomain ([193.48.40.241])
 by smtp.gmail.com with ESMTPSA id
 z2-20020adfd0c2000000b0030ada01ca78sm2210465wrh.10.2023.09.18.11.03.51
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 18 Sep 2023 11:03:51 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH v2 23/23] DRAFT guix: import: julia: Fix beautify.
Date: Mon, 18 Sep 2023 20:03:30 +0200
Message-Id: <a88ae8ef5cf22189cc72ac10aa25b839270be3f8.1695060058.git.zimon.toutoune@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
References: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: Simon Tournier <zimon.toutoune@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

---
 guix/import/juliahub.scm | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index be874b193b28..3e5735b9503f 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -197,10 +197,7 @@ (define %juliahub-beautify-description-rules
     (li           . ,(lambda args
                        `("\n@item" ,@(cdr args))))
     (code         . ,(lambda args
-                       (string-append
-                        "@code{"
-                        (string-join (cdr args) " ")
-                        "}")))
+                       `("@code{" ,@(cdr args) "}")))
     (*text*       . ,(lambda (tag x) x))
     (*default*    . ,(lambda (tag . body)
                        (cons tag body)))))
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 18 Sep 2023 18:04:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 18 14:04:19 2023
Received: from localhost ([127.0.0.1]:54405 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qiIba-0002K4-Tc
	for submit <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:19 -0400
Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:40124)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1qiIbN-0002FO-7G
 for 62202 <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:06 -0400
Received: by mail-wr1-x435.google.com with SMTP id
 ffacd0b85a97d-321617ef967so108857f8f.0
 for <62202 <at> debbugs.gnu.org>; Mon, 18 Sep 2023 11:03:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1695060231; x=1695665031; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=EqW3/WwMCH0YOOdn1Z/onLkIjwF1MHpLg5lKRPl0qXs=;
 b=Ac37X3TSoVlvocdDmuTvvFNRm+6tLyz4P+QYXlWEpVpwrGhxKdhOCpI33ynv5/6Ku3
 SkKbYmTpLyOaXKPEwD8qFXSYl0iHamrWyAr/uZUElyWqf+p3nPSbIJIGt2KH/dd1KXh+
 qRUyTpwfY5A1t+TwlZjYa03jeXnqQUPU+cDfFB/FASjtPoxRGwMgZQL1Kw2FZjkI+SWD
 q07s4ur92YZKEDYP6+KCvesjUo88OgHcEU7Grx7FaYksRkuUtn/YBiK77Iq9ej51fmLt
 cQF+89a+wVVNAshT4IT1sZPnN8H80RhQNDoeRwMeuWWoPNdlUE3ssFG3v1JDKU7C54EK
 Mhmg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1695060231; x=1695665031;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=EqW3/WwMCH0YOOdn1Z/onLkIjwF1MHpLg5lKRPl0qXs=;
 b=Ks9OgYBSnd3vzOenNJW1pLiCwHcuurtqiPYGRWFx4ntpoLxSAi9wfjJsfl8pKcohEr
 7dcEDKJWwmjv63+Jqh1TZdk8NDdtuF8vHm8X5ol7N695AFmmRPfhyfCfqRrl6pXVFH5K
 +rNLi5RAOY9TlVkJb1vJBuK894THN3bFNCgx9uGN6GtwpsPyl2ASUARG5VdizY+Sb7vG
 OlFR5bZB2R8pR3VHnmiltpO+0ezc0q1OQDjNE++TUQcSnAC2KfMxgnuXYJydB7vDwmiu
 2538gkhGyMZ9KlExiXCiktnJpkgPT4f2ZhEarcA3SuWf5B6kSxKKsBDbHbyMAzJhV2M4
 Ts6A==
X-Gm-Message-State: AOJu0YyJgGGR/tNUdAZbGJ/Bbbsm76ME49nLbxaZNN+PEwUjbK8/Trua
 KM+Ew9ou+wqPhBPBJJokmUwCVkD9r7Y=
X-Google-Smtp-Source: AGHT+IEmERH2UkzSS0XXO4igGuOToO9mXKhxU4gELLer+eSqSgOTThnyWyLMaxICs257lCBCpAFPbw==
X-Received: by 2002:adf:e903:0:b0:31a:ed75:75e8 with SMTP id
 f3-20020adfe903000000b0031aed7575e8mr7681632wrm.2.1695060231116; 
 Mon, 18 Sep 2023 11:03:51 -0700 (PDT)
Received: from localhost.localdomain ([193.48.40.241])
 by smtp.gmail.com with ESMTPSA id
 z2-20020adfd0c2000000b0030ada01ca78sm2210465wrh.10.2023.09.18.11.03.50
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 18 Sep 2023 11:03:50 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH v2 22/23] DRAFT import: juliahub: output package names as
 symbols.
Date: Mon, 18 Sep 2023 20:03:29 +0200
Message-Id: <11807ccb1ff39f04a76a62e37556c9c5727b36a2.1695060058.git.zimon.toutoune@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
References: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: Nicolas Graves via Guix-patches via <guix-patches@HIDDEN>,
 Simon Tournier <zimon.toutoune@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

From: Nicolas Graves via Guix-patches via <guix-patches@HIDDEN>

Signed-off-by: Simon Tournier <zimon.toutoune@HIDDEN>
---
 guix/import/juliahub.scm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index 06574db724fe..be874b193b28 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -261,12 +261,15 @@ (define (make-julia-sexp name version source home-page synopsis description
            '()
            `((propagated-inputs
               (list
-               ,@(map (compose julia-name->guix-name juliahub-dependency-name)
+               ,@(map (compose string->symbol
+                               julia-name->guix-name
+                               juliahub-dependency-name)
                       direct-dependencies)))))
      ,@(if (null? test-dependencies-names)
            '()
            `((native-inputs
-              (list ,@(map julia-name->guix-name test-dependencies-names)))))
+              (list ,@(map (compose string->symbol julia-name->guix-name)
+                           test-dependencies-names)))))
      (synopsis ,synopsis)
      (description ,description)
      (home-page ,home-page)
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 18 Sep 2023 18:04:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 18 14:04:18 2023
Received: from localhost ([127.0.0.1]:54403 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qiIba-0002Jv-FD
	for submit <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:18 -0400
Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:40118)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1qiIbK-0002Ex-QR
 for 62202 <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:05 -0400
Received: by mail-wm1-x32b.google.com with SMTP id
 5b1f17b1804b1-40471c054f9so14350905e9.0
 for <62202 <at> debbugs.gnu.org>; Mon, 18 Sep 2023 11:03:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1695060229; x=1695665029; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=+V8mAgQnV80VBwmubrhWWZdiRKsOpmwZCKgdLsNinEA=;
 b=g6W6kAiPuQszLEX/0TMVkfzs6rBfAqv+B2uVVeYy1W++EaoBlJVSraoQLfIKzYNSe3
 BvuH0jXkdosK9Qulvntz2baiqERrhDpiEtrSCO0cK2Wqwf1vQxmRnSulV3KoXzK2VLv9
 Nnl9khKMAxpeIVNiEeH5u8t7Drp7kCHrfr64K/j7Jf14mC2yYnfBtEYl77dwXdZdlQtt
 ph2rC7oTcHI4P9lvPlbs6cUK5kNI8KKT8/eteUJShWWjTsl7zLkkRjm1CxdoTItvP5+8
 7GGL5yJrmb0sd4PJ4gVIJEsfKOWjKDMOr/GfS8hUgAaFt5G2X5ajLVQYfZ+UpksKl8cn
 EzJQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1695060229; x=1695665029;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=+V8mAgQnV80VBwmubrhWWZdiRKsOpmwZCKgdLsNinEA=;
 b=iDyYUCEASya0Gn90wLC7tJp9EH1F5EW6CBM8gCsuVNO1docrBTKvDLOiLJGIBUNQIF
 6Nx6lDp65YoGkS1OGVjpzNLPPwRnQVTyUiHZDvhp34bmkUyfq1AX9AyWqoMpKwNW0jVW
 CXJv5LGwsr2XE5oB4gutxt2hA7L4GbRdOYll4i6FUKpi+XqjL4Ly2k18MPNTS1wymbdv
 M4D8yARXYJzQzua9VDx5K/RBEYa5Z8PCWEFcdCXwTPSM5FkpwpbDXC7MmrJ6dbbIFZH6
 dvNQghXh0cnK6JnLPlMleO0mJxk2V1pz62llVRO1cFPCXZR1KRQleCxGKNbJwIvoLjzX
 kq7A==
X-Gm-Message-State: AOJu0YxR0rrqcpfxKP4ile8zUeR5j6JIUVzgzT4j0SfdeZMO+8qPWB46
 wyY3CKNibm2puVktEZHMXiAphgtx80I=
X-Google-Smtp-Source: AGHT+IHVRevR7p6J+iiE15IGIXyXC2TlCBoh6GqtOIb9L5A34ZcF7YTbO6C6qMezc72Zp+/3gdDxaQ==
X-Received: by 2002:adf:e903:0:b0:31a:ed75:75e8 with SMTP id
 f3-20020adfe903000000b0031aed7575e8mr7681532wrm.2.1695060228730; 
 Mon, 18 Sep 2023 11:03:48 -0700 (PDT)
Received: from localhost.localdomain ([193.48.40.241])
 by smtp.gmail.com with ESMTPSA id
 z2-20020adfd0c2000000b0030ada01ca78sm2210465wrh.10.2023.09.18.11.03.48
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 18 Sep 2023 11:03:48 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH v2 18/23] DRAFT import: juliahub: Beautify description.
Date: Mon, 18 Sep 2023 20:03:25 +0200
Message-Id: <378987b3ca7040ffbc2f8f665651e8efee4238ae.1695060058.git.zimon.toutoune@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
References: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: Nicolas Graves via Guix-patches via <guix-patches@HIDDEN>,
 Simon Tournier <zimon.toutoune@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

From: Nicolas Graves via Guix-patches via <guix-patches@HIDDEN>

Signed-off-by: Simon Tournier <zimon.toutoune@HIDDEN>
---
 guix/import/juliahub.scm | 60 +++++++++++++++++++++++++++++++++++++---
 1 file changed, 56 insertions(+), 4 deletions(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index 3985d8d0be44..338f0424414c 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -32,8 +32,10 @@ (define-module (guix import juliahub)
   #:use-module (guix base32)
   #:use-module (guix packages)
   #:use-module (guix upstream)
-  #:use-module (json)
   #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (json)
+  #:use-module (htmlprag)
+  #:use-module (sxml transform)
 
   #:export (juliahub->guix-package
             %juliahub-updater
@@ -164,6 +166,53 @@ (define (parse-test-dependencies directory)
     (filter (lambda (x) (not (member x %julia-stdlibs)))
             (string-split (string-drop (string-drop-right pure 1) 7) #\,))))
 
+(define %juliahub-beautify-description-rules
+  `((h1 *preorder*   . ,(lambda args #f))
+    (h2 *preorder*   . ,(lambda args #f))
+    (h3 *preorder*   . ,(lambda args #f))
+    (h4 *preorder*   . ,(lambda args #f))
+    (hr *preorder*   . ,(lambda args #f))
+    (span *preorder* . ,(lambda args #f))
+    (img *preorder*  . ,(lambda args #f))
+    (pre *preorder*  . ,(lambda args #f))
+    (div *preorder*  . ,(lambda args #f))
+    (table *preorder* . ,(lambda args #f))
+    (imgalt *preorder* . ,(lambda args #f))
+    (@ *preorder* . ,(lambda args #f))
+    (*TOP*        . ,(lambda args (cdr args)))
+    (p            . ,(lambda args (cdr args)))
+    (em           . ,(lambda args (cdr args)))
+    (strong       . ,(lambda args (cdr args)))
+    (a            . ,(lambda args
+                       (match args
+                         ((tag link ref)
+                          (if ref ref #f))
+                         (_ #f))))
+    (ul           . ,(lambda args
+                       `("@itemize" ,@(cdr args) "\n@end itemize")))
+    (ol           . ,(lambda args
+                       `("@enumerate" ,@(cdr args) "@end enumerate")))
+    (blockquote   . ,(lambda args
+                       `("@quotation" ,@(cdr args) "@end quotation")))
+    (li           . ,(lambda args
+                       `("\n@item" ,@(cdr args))))
+    (code         . ,(lambda args
+                       (string-append
+                        "@code{"
+                        (string-join (cdr args) " ")
+                        "}")))
+    (*text*       . ,(lambda (tag x) x))
+    (*default*    . ,(lambda (tag . body)
+                       (cons tag body)))))
+
+(define (juliahub-beautify-description description)
+  (string-join
+   (filter (lambda (x) (if (equal? x " ") #f x))
+           (flatten
+            (pre-post-order (html->sxml description)
+                            %juliahub-beautify-description-rules)))
+   " "))
+
 ;; Julia package.
 (define-json-mapping <juliahub-package> make-juliahub-package juliahub-package?
   json->juliahub-package
@@ -211,8 +260,9 @@ (define (make-julia-sexp name source home-page synopsis description
      ,@(if (null? direct-dependencies)
            '()
            `((propagated-inputs
-              (list ,@(map (compose julia-name->guix-name juliahub-dependency-name)
-                           direct-dependencies)))))
+              (list
+               ,@(map (compose julia-name->guix-name juliahub-dependency-name)
+                      direct-dependencies)))))
      ,@(if (null? test-dependencies-names)
            '()
            `((native-inputs
@@ -264,7 +314,9 @@ (define* (juliahub->guix-package package-name
                      source
                      (juliahub-package-homepage package)
                      (juliahub-package-description package)
-                     (beautify-description (juliahub-package-readme package))
+                     ((compose beautify-description
+                               juliahub-beautify-description)
+                      (juliahub-package-readme package))
                      direct-dependencies
                      test-dependencies-names
                      licenses)
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 18 Sep 2023 18:04:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 18 14:04:18 2023
Received: from localhost ([127.0.0.1]:54401 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qiIba-0002Jn-33
	for submit <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:18 -0400
Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:40269)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1qiIbM-0002FK-HU
 for 62202 <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:05 -0400
Received: by mail-wm1-x32e.google.com with SMTP id
 5b1f17b1804b1-4046f7d49a9so14569055e9.1
 for <62202 <at> debbugs.gnu.org>; Mon, 18 Sep 2023 11:03:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1695060230; x=1695665030; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=uYY/AJQQhuW7T2+fKC7eAUbXPlE/u76pG53r/cysRkw=;
 b=Lvtw5rKscfP4xXTchFKH8m4KTPms6N8Zm+8PRGIfjqlElwJjSXEHsSn3lB3A7TCBKP
 i+y6MH6bg6iUCt114tYgD/cx5TiPhydh+Y8vUMXnt8yCN3MYF//tXBzebqrmcb3VEBqq
 jmFVG0oqIx0Zlkds+QukBATaKzSLK7bdLNEwEbI6RcCgUf8NTtwQoWab6cmgpTGXdSp+
 KSFAiHmswgZ/vNOWN4cTrfdOt5wSnqKFqpPK71A2T7btQuD77sAOuvYj4x1580Cr1mNh
 jvyFz6rJ397oA+SQ2gs9acsHSYvAGtdbG/hupCNEKqtrwshqgkSR5yAXf14WkKV1yBcS
 uPwA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1695060230; x=1695665030;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=uYY/AJQQhuW7T2+fKC7eAUbXPlE/u76pG53r/cysRkw=;
 b=D8eCf4LP5NCzPB7Bjb8mqF0k+dnUEdsmDpWnvWzWwl1D2xh4LPbaiNk+MWd+2cDRbh
 YPFK0FIiBmb74RrVHi7ERGK4WnFPALaZ2FDXlvVL67PjqCPnvFZTQlcbgV+mAGeTrvzB
 0ibu6pt/uy52MP394Z/VP3YfgXO56k6eErJ4hzIVAPp5xbs5Fq/GKfZS1uH9ZAIe/0mX
 UbipI6XmIWEEuFPZM7WLgbrc3VHzQKZnAC6H2bgxcMDR3LMz2MhExEgCqCO5OtZ08c2b
 BBBYFUW0i1k+q/eGutjC35C03CxgP3FO5BKekBCHMktGuoVfkRvPaEES3BQnpZrj6JJj
 SCEw==
X-Gm-Message-State: AOJu0Yx4k+Cny+KdqCmZuRasUMrqES4PVIvxQPmKjJeYwbq3OvnSQYCE
 EXkHRZWstC8rVCNNIiVQ8OeQ6Tz3bIs=
X-Google-Smtp-Source: AGHT+IE6eQseNiqfFi/Ezv3j0C1Ycd3JlAzoZG9EyzKvCy56J/FK4ShX4i6We0w+oAHpac8K51qnUQ==
X-Received: by 2002:a05:6000:1047:b0:31f:a096:6e18 with SMTP id
 c7-20020a056000104700b0031fa0966e18mr7724055wrx.6.1695060230342; 
 Mon, 18 Sep 2023 11:03:50 -0700 (PDT)
Received: from localhost.localdomain ([193.48.40.241])
 by smtp.gmail.com with ESMTPSA id
 z2-20020adfd0c2000000b0030ada01ca78sm2210465wrh.10.2023.09.18.11.03.49
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 18 Sep 2023 11:03:50 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH v2 21/23] DRAFT import: juliahub: Fix undefined homepages.
Date: Mon, 18 Sep 2023 20:03:28 +0200
Message-Id: <a45fc1b1d0c059678123d67cfc221f60f6c15afd.1695060058.git.zimon.toutoune@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
References: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: Nicolas Graves via Guix-patches via <guix-patches@HIDDEN>,
 Simon Tournier <zimon.toutoune@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

From: Nicolas Graves via Guix-patches via <guix-patches@HIDDEN>

Signed-off-by: Simon Tournier <zimon.toutoune@HIDDEN>
---
 guix/import/juliahub.scm | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index 94d4ae823334..06574db724fe 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -303,12 +303,16 @@ (define* (juliahub->guix-package package-name
                   (if subdir
                       (parse-test-dependencies
                        (string-append subdir "/" directory))
-                      (parse-test-dependencies directory))))
+                      (parse-test-dependencies directory)))
+                 (homepage (juliahub-package-homepage package)))
             (values (make-julia-sexp
                      package-name
                      (juliahub-package-version package)
                      source
-                     (juliahub-package-homepage package)
+                     (match homepage
+                       ("" (juliahub-package-url package))
+                       ((? string?) homepage)
+                       (_ (juliahub-package-url package)))
                      (juliahub-package-description package)
                      ((compose beautify-description
                                juliahub-beautify-description)
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 18 Sep 2023 18:04:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 18 14:04:18 2023
Received: from localhost ([127.0.0.1]:54399 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qiIbZ-0002Jf-Nh
	for submit <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:18 -0400
Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:40393)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1qiIbL-0002F8-S7
 for 62202 <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:05 -0400
Received: by mail-wr1-x434.google.com with SMTP id
 ffacd0b85a97d-32163c3ece5so66565f8f.1
 for <62202 <at> debbugs.gnu.org>; Mon, 18 Sep 2023 11:03:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1695060230; x=1695665030; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=4N4QKA7RklXE6U1toUcmtASBk6gneV5LxZor47MdXFw=;
 b=Dwr9OJkldWerW+eKFLf2Is4s0EeKyyMLLw2UXntU2NqSgDhHA8dG905fvOFCUlXQVh
 GCLMvtiD7r24WbUuwBQwWWk5gQzUWMgSFBYuQfwmF1W/5KdlNH6fQtDXsEmts9hdEcDS
 VQt4JPR2Rmo+TI0aJyvgo+FWxjnFi5pJHyxRY2TpLiVcFnHbyII5pxb6Y9ppvU7B0zQO
 SPbq5C9z2WFxkF3AvVULHmNxsW7Bxxtq5uJGtoWtmkLTeqsa3p15AiJrYpLdEq2Dssz8
 37g3B+WeD1RDE5pmYKdb693ZUwF8MPWwe/9XV5lX0L3Cg0/YFHGRFgM9elvGUR7tupFQ
 Pt/A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1695060230; x=1695665030;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=4N4QKA7RklXE6U1toUcmtASBk6gneV5LxZor47MdXFw=;
 b=HlVMilKNBA8d75/a/GdQFjb9ljdtHacFqshqAPLogn0N+5fuVjE/e5vpzKyWC1Q+sQ
 WdBvS4onqcI0JWyq1V6H9aHcUYveOFATgR4YsYZU9w7O4HaWjtQUAbQYhdF+Sfka7pw5
 neyjcaMuwvM6qV+7ewGRqfK9Ploafu9fouhV8dsnh8YDgfi2wsX4IOdbQLssmdtdqoCY
 eQZjdwKMDY7fUXND1ZSseonh2oJsahwF3GS9P+crMbv58iM7llyvqOpNmjSuwE6KpAvu
 JkzksSfuAijdy9qn6LP7d8QW3NY39iJeVCeKGhrSR5LNs87ko2w1qDJpIX+YTicHIaTt
 TAPA==
X-Gm-Message-State: AOJu0Yz4o37dUdRG6JJ04UYt3tvU8kH5gZXCd5hzW8YKHVVBFg+IgGT9
 j81KTUV/D3CjmGvxw/+AYu8hGxTkv6U=
X-Google-Smtp-Source: AGHT+IFQRNV9GQyLvfnLjcsm5O5wESTlJe8zNCA4a0Qxzvt2oToKGCfN2V3DKeXG/h3NxPnIkS3hnw==
X-Received: by 2002:adf:ecc7:0:b0:31f:899b:a47 with SMTP id
 s7-20020adfecc7000000b0031f899b0a47mr7944134wro.4.1695060229829; 
 Mon, 18 Sep 2023 11:03:49 -0700 (PDT)
Received: from localhost.localdomain ([193.48.40.241])
 by smtp.gmail.com with ESMTPSA id
 z2-20020adfd0c2000000b0030ada01ca78sm2210465wrh.10.2023.09.18.11.03.49
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 18 Sep 2023 11:03:49 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH v2 20/23] DRAFT import: juliahub: Fix version management.
Date: Mon, 18 Sep 2023 20:03:27 +0200
Message-Id: <d842837030aa42b7e6b2094e4639a458a63be3b6.1695060058.git.zimon.toutoune@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
References: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: Nicolas Graves via Guix-patches via <guix-patches@HIDDEN>,
 Simon Tournier <zimon.toutoune@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

From: Nicolas Graves via Guix-patches via <guix-patches@HIDDEN>

Signed-off-by: Simon Tournier <zimon.toutoune@HIDDEN>
---
 guix/import/juliahub.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index e4b26bea340a..94d4ae823334 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -247,10 +247,10 @@ (define* (juliahub-fetch name #:key (version #f))
                  (string-append (juliahub-url name) "pkg.json"))))
     (and=> (json-fetch url) json->juliahub-package)))
 
-(define (make-julia-sexp name source home-page synopsis description
+(define (make-julia-sexp name version source home-page synopsis description
                          direct-dependencies test-dependencies-names license)
   "Return the `package' s-expression for a Julia package with the given NAME,
-VERSION, URI, HASH, HOME-PAGE, DESCRIPTION, DIRECT-DEPENDENCIES,
+VERSION, SOURCE, HOME-PAGE, DESCRIPTION, DIRECT-DEPENDENCIES,
 TEST-DEPENDENCIES-NAMES and LICENSE."
   `(package
      (name ,(julia-name->guix-name name))
@@ -306,6 +306,7 @@ (define* (juliahub->guix-package package-name
                       (parse-test-dependencies directory))))
             (values (make-julia-sexp
                      package-name
+                     (juliahub-package-version package)
                      source
                      (juliahub-package-homepage package)
                      (juliahub-package-description package)
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 18 Sep 2023 18:04:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 18 14:04:17 2023
Received: from localhost ([127.0.0.1]:54397 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qiIbZ-0002JV-8q
	for submit <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:17 -0400
Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:40117)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1qiIbK-0002Ev-CJ
 for 62202 <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:05 -0400
Received: by mail-wm1-x32a.google.com with SMTP id
 5b1f17b1804b1-40471c054f9so14350875e9.0
 for <62202 <at> debbugs.gnu.org>; Mon, 18 Sep 2023 11:03:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1695060228; x=1695665028; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=l6ds5f6DEk3FeZ0Lm1KcNpISCKwkAffzc7l5DbjMozE=;
 b=k8EGb53u9WSV3wbIaFHN+ouC9eFVA2r1Petd71IcFc5/+qxlBhHD5F4ZzdoblD3BSQ
 euTmf0deD1WmLCXJ5kN+L8vVvAYBmNkIkbKCrkleB8ba7XaamMT519UXOwVMLdEG7T3H
 ZSMKVJxVHCOMlJpFB5t0e8aFexuP4PnKm8ASp2Mn40FCktvKPlEDBNebGYvEHMzBbZ2T
 rNVsP8SOmFp0mh/YrZb2blQRy3HJwVBqyL1fhrwlt+PHvU5poWmE6OnJ0X5gQXalWXxD
 BBO0mFWslFfUWk1C6M1qsPCdqmvloj2wfqa4R4jPiXyfqdQFmvuVKRICmbJcNVRjvIlm
 0nzQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1695060228; x=1695665028;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=l6ds5f6DEk3FeZ0Lm1KcNpISCKwkAffzc7l5DbjMozE=;
 b=Sb9W5MuhE1wBZwobuGJivkWVOrNUncNQWkp2olpkclZk/JxH8RfctgfSjhnaAZxFlO
 q3HkEFrCfUzp+nio8z0Vs1p9ikFn9NbCt/ZeBBiENcIwG9YMjuHQnu/RAniZXNQTkDwf
 VoaM2eB+hgXDu3NBNoo3yXw24vbbvbObpsRlXkVkQ41U9kdpyaggGOPIYkaS8P+PH754
 5ESOjf+ORboQLv2IQFwrl95UT/dJGOKra8wzqL8BHOMhb+z2vTB6IPbPLV4Ygd17KRjg
 gJ0lzeQijPH60msWJ3rEVD6FS9j2TlcY87tvIU3kV7l9zbS8GazIwrDRrK1w5nIBi3Dm
 xD+A==
X-Gm-Message-State: AOJu0YzSdcpjcN3G7zBJ1TbD4Ja+hsIomzgbyuQTXoJfYiQPGI7D5i33
 BStM4TbB9MCoeMn3FIyrO2PQmjRvWS8=
X-Google-Smtp-Source: AGHT+IF4kTuAJoABY54CyrdGUgJ47h498CDUG2y8c4+8rHho08nZ8YgHh4MiLdXUL93PNZTY+3oQ1w==
X-Received: by 2002:adf:ef88:0:b0:317:3d36:b2c1 with SMTP id
 d8-20020adfef88000000b003173d36b2c1mr8050632wro.7.1695060228022; 
 Mon, 18 Sep 2023 11:03:48 -0700 (PDT)
Received: from localhost.localdomain ([193.48.40.241])
 by smtp.gmail.com with ESMTPSA id
 z2-20020adfd0c2000000b0030ada01ca78sm2210465wrh.10.2023.09.18.11.03.47
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 18 Sep 2023 11:03:47 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH v2 17/23] DRAFT import: juliahub: More robust toml regex
 parser.
Date: Mon, 18 Sep 2023 20:03:24 +0200
Message-Id: <2423ea8dafa29faa49e75da40a480873531e5126.1695060058.git.zimon.toutoune@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
References: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: Nicolas Graves via Guix-patches via <guix-patches@HIDDEN>,
 Simon Tournier <zimon.toutoune@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

From: Nicolas Graves via Guix-patches via <guix-patches@HIDDEN>

Signed-off-by: Simon Tournier <zimon.toutoune@HIDDEN>
---
 guix/import/juliahub.scm | 29 ++++++++---------------------
 1 file changed, 8 insertions(+), 21 deletions(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index 1c7b02929634..3985d8d0be44 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -154,28 +154,15 @@ (define (json->juliahub-dependencies vector)
                #f)))
        (vector->list vector))))
 
-(define (ini-list->test-dependencies lst)
-  (match lst
-    (('test '= ooo ...)
-     `(,(caar ooo) ,@(test-list->test-dependencies (cdar ooo))))
-    ((value ooo ...)
-     (ini-list->test-dependencies ooo))
-    ('()
-      '())))
-
-(define (test-list->test-dependencies lst)
-  (match lst
-    ((('unquote value) ooo ...)
-     `(,value ,@(test-list->test-dependencies ooo)))
-    ('()
-      '())))
-
 (define (parse-test-dependencies directory)
   (let* ((port (open-input-file (string-append directory "/Project.toml")))
-         (ini-list (stream->list (port->stream port read))))
+         (project.toml (get-string-all port))
+         (regex "\ntest = \\[.*\\]")
+         (deps (match:substring (string-match regex project.toml)))
+         (pure (string-delete (list->char-set (list #\" #\ )) deps)))
     (close-port port)
     (filter (lambda (x) (not (member x %julia-stdlibs)))
-            (ini-list->test-dependencies ini-list))))
+            (string-split (string-drop (string-drop-right pure 1) 7) #\,))))
 
 ;; Julia package.
 (define-json-mapping <juliahub-package> make-juliahub-package juliahub-package?
@@ -243,9 +230,9 @@ (define* (juliahub->guix-package package-name
   "Fetch the metadata for PACKAGE-NAME from juliahub.org, and return the
 `package' s-expression corresponding to that package, or #f on failure.
 Optionally include a VERSION string to fetch a specific version juliahub."
-  (let* ((package-toml (ini-fetch (general-url package-name "Package.toml")))
-         (subdir (assoc-ref package-toml 'subdir))
-         (tag (latest-git-tag (assoc-ref package-toml 'repo)))
+  (let* ((package.toml (ini-fetch (general-url package-name "Package.toml")))
+         (subdir (assoc-ref package.toml 'subdir))
+         (tag (latest-git-tag (assoc-ref package.toml 'repo)))
          (package (if version
                       (juliahub-fetch package-name #:version version)
                       (if tag
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 18 Sep 2023 18:04:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 18 14:04:17 2023
Received: from localhost ([127.0.0.1]:54395 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qiIbY-0002JO-RD
	for submit <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:17 -0400
Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:38975)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1qiIbJ-0002Es-3U
 for 62202 <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:04 -0400
Received: by mail-wm1-x331.google.com with SMTP id
 5b1f17b1804b1-404800222d2so8773835e9.0
 for <62202 <at> debbugs.gnu.org>; Mon, 18 Sep 2023 11:03:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1695060227; x=1695665027; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=X6y7F263pQ9DetoUxcmjgz6mDWXsO5xe8gxWGITXaR8=;
 b=HAaPW2nag7f0ZAhqk3i7vgGpj+96vICdiKpfjLSxmPaq8MLvdvsXpZSnXUZ1jsXoc1
 rpFV/aRK8j/vRsjMBtT9p3MWhOaKrvH2FDX2h3g2H9xLkMgyK2hnK+OperGadkceLf+U
 JkJpmij8Jy+a5KF25rfLbbeq0Pp7gbzcTf8kHAQo2GnQ8GKmVlKptxRN71WbH4KJQUJM
 YsT8nmVp9nINQX8z/6oSKZxcTKl3wRt518U/Q2EKaHnlsu+JBH1w17J992jJb+16vxXL
 +dOz326OxnG/tOyiL2FJbn6bl4CKQQkeMSteed1sxu0hghkWaQva3EaGf08GyhCviPVX
 H0tA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1695060227; x=1695665027;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=X6y7F263pQ9DetoUxcmjgz6mDWXsO5xe8gxWGITXaR8=;
 b=wOmUf/qgBDw6rsKvQXykNPIDVLLQWvK6OSMGyb+oHY1JKv5lo9IsTn+GjDmS6E7Fw7
 sxBySXxj+sv9YwoPiGdEY57FM5S/x3kC32QM3l1E+PH/Qa6wy7/VlhBhbu6t0esHnybD
 qeS2WZfA5qTkLuKoQcNoK7LNPO7Y8VdKhSEcRRkxzNbBGyRimNbxmekKiNRHAXOVZj0F
 zch9SjTCDNpygCwI+9t21Sfl7/jgNib3b59AoNfgQRfP/qB586vlvaAZxibYb2ZtwS3z
 yBbSdjzV5H3wHbUz2D5MYPAw524fLQ/cNd+Gsfygs3lM1Hov4z+s3oVmMNJJDuzJQFDU
 5+mA==
X-Gm-Message-State: AOJu0YwWMVMMFhH7d0BSuubYudQkc1DfDHOs7x4G5QvWZhdtkCDSg9uJ
 0zNCKhKkrpBFDzUR1PeYfUTRyvIH7uw=
X-Google-Smtp-Source: AGHT+IEpycZYk8lE6bBUr+8ABxBDIacvi6yhbFtVuK87B/LXxq+PSX+xp5PdkARV4OKxZPgjUxpPzQ==
X-Received: by 2002:a5d:508e:0:b0:317:73e3:cf41 with SMTP id
 a14-20020a5d508e000000b0031773e3cf41mr7498521wrt.1.1695060226980; 
 Mon, 18 Sep 2023 11:03:46 -0700 (PDT)
Received: from localhost.localdomain ([193.48.40.241])
 by smtp.gmail.com with ESMTPSA id
 z2-20020adfd0c2000000b0030ada01ca78sm2210465wrh.10.2023.09.18.11.03.46
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 18 Sep 2023 11:03:46 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH v2 15/23] DRAFT import: juliahub: Add support for versions for
 juliahub-fetch.
Date: Mon, 18 Sep 2023 20:03:22 +0200
Message-Id: <1fef7a18856fd9670be3746e6f3579a8be39163e.1695060058.git.zimon.toutoune@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
References: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: Nicolas Graves via Guix-patches via <guix-patches@HIDDEN>,
 Simon Tournier <zimon.toutoune@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

From: Nicolas Graves via Guix-patches via <guix-patches@HIDDEN>

Signed-off-by: Simon Tournier <zimon.toutoune@HIDDEN>
---
 guix/import/juliahub.scm | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index b646f9329562..6ce0487dba38 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -122,7 +122,7 @@ (define %julia-stdlibs
         "Pkg"
         "LazyArtifacts"))
 
-(define (juliahub-uri name)
+(define (juliahub-redirect-uri name)
   (let* ((url (string-append "https://docs.juliahub.com/" name "/"))
          (port (http-fetch url #:text? #t))
          (_ (get-line port))
@@ -134,11 +134,11 @@ (define (juliahub-uri name)
 
 (define (juliahub-url name)
   (let* ((url (string-append "https://docs.juliahub.com/" name "/"))
-         (uri (juliahub-uri name)))
+         (uri (juliahub-redirect-uri name)))
     (string-append url uri "/")))
 
-(define (juliahub-slug-version name)
-  (let* ((uri (juliahub-uri name))
+(define (juliahub-slug+version name)
+  (let* ((uri (juliahub-redirect-uri name))
          (slug (string-take uri 5))
          (latest-version (string-drop uri 6)))
     `(,slug ,latest-version)))
@@ -203,8 +203,12 @@ (define (julia-name->guix-name name)
 
 (define* (juliahub-fetch name #:key (version #f))
   "Return a <juliahub-package> record for package NAME, or #f on failure."
-  (and=> (json-fetch (string-append (juliahub-url name) "pkg.json"))
-         json->juliahub-package))
+  (let ((url (if version
+                 (string-append "https://docs.juliahub.com/" name "/"
+                                (car (juliahub-slug+version name)) "/"
+                                version "/pkg.json")
+                 (string-append (juliahub-url name) "pkg.json"))))
+    (and=> (json-fetch url) json->juliahub-package)))
 
 (define (make-julia-sexp name source home-page synopsis description
                          direct-dependencies test-dependencies-names licenses)
@@ -242,9 +246,9 @@ (define* (juliahub->guix-package package-name
          (subdir (assoc-ref package-toml 'subdir))
          (tag (latest-git-tag (assoc-ref package-toml 'repo)))
          (package (if version
-                      (juliahub-fetch package-name version)
+                      (juliahub-fetch package-name #:version version)
                       (if tag
-                          (juliahub-fetch package-name tag)
+                          (juliahub-fetch package-name #:version tag)
                           (juliahub-fetch package-name)))))
     (if package
         (let-values (((source directory)
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 18 Sep 2023 18:04:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 18 14:04:16 2023
Received: from localhost ([127.0.0.1]:54393 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qiIbY-0002JG-7r
	for submit <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:16 -0400
Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:40127)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1qiIbH-0002Eo-KZ
 for 62202 <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:04 -0400
Received: by mail-wm1-x335.google.com with SMTP id
 5b1f17b1804b1-40471c054f9so14350515e9.0
 for <62202 <at> debbugs.gnu.org>; Mon, 18 Sep 2023 11:03:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1695060225; x=1695665025; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=naePonU76gTGTfpRR8tIbQvC/x6wxVESjDneXTICeZ0=;
 b=I9rp2BDaxnl+0HJPhzTE26DzMfHHf8FVuLl0xZPaa83Gki1f/6OkXzvLp+He9VMmip
 yWLm+AtSu1E/BglBzU1GqJuz4MqE3uQ6wSow6Pqk2h10zAr5jha6STUfynZSxgUF9r6p
 +E+Y4KTm8CZ+IuAgkR8g6cLRRMcibzoXHYiekMQIHZ8keoqk23lll6guwopRpZ7oz2YJ
 0/Vzsbdhua7pUy9Q3v1TysjqxTBEAce9JXVXJJQ/QWz3WZBgkLLl+/STJonm/mKAUIFz
 FH7g0GrWmK+TRaXz/vfMOM0uWWpPIAbYI7VSEpboJ14juE4Lw4HZltCfW+gKGP2lXLES
 J44A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1695060225; x=1695665025;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=naePonU76gTGTfpRR8tIbQvC/x6wxVESjDneXTICeZ0=;
 b=UKhYf3Ys1jQ5eZF99EdV5VcI0EQSRhtUTBp2/MKmcftmQG4ezGBP2YJ9AXpTbJl4xt
 IfhIs+9c/DmB1edVSyJBOvSMyFm/Us+adMPxPXCg3z5/0lgr6LikH0HPbb/iiIhFCdio
 V5Zlu2Kr4seFkoiK24h+XCQZ3vgn8kTBTFTkylEKw1XZrRAI+M20eLv/rq0R8vFe8mm2
 gRYVtImcRDCvaejtPINOqrgsAVNaXQAhnzdgBu3UvrUnzl7VtfJIXQJUBoNr5ev+dALK
 YFG7wAS6ZhJr2xiB+slWeVulVl4OVI0oheeH/kf2ZACSps9w6u8NcWrRAz7zLLHPoN1J
 QwMw==
X-Gm-Message-State: AOJu0Yxii844+3THq0A1EsGChhnimi5sJtuXT65jzCgd24hFBsAVUts9
 VBKXsFo9XDeeGOTCAOsUMqTptGMJNN4=
X-Google-Smtp-Source: AGHT+IELLI9+EqhFGs/m2GoRd8GSftNhN7iYJqP9e6nqsk98K9forq+ChwIxCQuTWCWoxBiUiZXvKQ==
X-Received: by 2002:adf:ecc7:0:b0:31f:899b:a47 with SMTP id
 s7-20020adfecc7000000b0031f899b0a47mr7943960wro.4.1695060225415; 
 Mon, 18 Sep 2023 11:03:45 -0700 (PDT)
Received: from localhost.localdomain ([193.48.40.241])
 by smtp.gmail.com with ESMTPSA id
 z2-20020adfd0c2000000b0030ada01ca78sm2210465wrh.10.2023.09.18.11.03.44
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 18 Sep 2023 11:03:45 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH v2 12/23] DRAFT import: juliahub: Add functions to parse the
 git repo for a git tag.
Date: Mon, 18 Sep 2023 20:03:19 +0200
Message-Id: <e42032f4db1c8b76ff5ba94805deba47992a7c39.1695060058.git.zimon.toutoune@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
References: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: Nicolas Graves via Guix-patches via <guix-patches@HIDDEN>,
 Simon Tournier <zimon.toutoune@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

From: Nicolas Graves via Guix-patches via <guix-patches@HIDDEN>

Signed-off-by: Simon Tournier <zimon.toutoune@HIDDEN>
---
 guix/import/juliahub.scm | 62 ++++++++++++++++++++++++++++++++++++----
 1 file changed, 56 insertions(+), 6 deletions(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index fc25ba1d4220..5327e923251d 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -26,6 +26,7 @@ (define-module (guix import juliahub)
   #:use-module (srfi srfi-9)
   #:use-module (srfi srfi-11)
   #:use-module (guix http-client)
+  #:use-module (guix git)
   #:use-module (guix import utils)
   #:use-module (guix import json)
   #:use-module (guix base32)
@@ -38,6 +39,48 @@ (define-module (guix import juliahub)
             %juliahub-updater
             juliahub-recursive-import))
 
+;; Juliahub may be more up-to-date than the General registry or the actual git
+;; tag (it seems around 6 hours pass between the time a commit is supplied to
+;; JuliaRegistrator as a release, and the time Julia TagBot Github Action makes
+;; the git tag). We have no simple way to get the commit of the latest-version.
+;; Thus the best simple thing we can do is get the latest-git-version, and
+;; import this version instead. We do this by parsing Package.toml in the General
+;; registry, and then getting the refs of the git repo supplied by this
+;; file. Parsing this file is also necessary if the package is in a subdir of a
+;; git repository, because the information isn't present in Juliahub.
+;; There's a last case where some Julia packages are not based on a particular
+;; git tag, and where looking for the commit is tedious and artificial. In these
+;; cases, we introduce the tree-commit which is available in the Versions.toml
+;; file in the General repository. This is equivalent to a commit, since we have
+;; a unique hash of the listing of files and directories, thus it can be used to
+;; identify the state of a repository.
+
+(define %general-base-url
+  "https://raw.githubusercontent.com/JuliaRegistries/General/master/")
+
+(define (general-url package-name file)
+  (let ((folder (string-capitalize (string-take package-name 1))))
+    (string-append
+     %general-base-url folder "/" package-name "/" file)))
+
+(define (ini-list->alist lst)
+  (match lst
+    ((attribute '= value ooo ...)
+     `((,attribute . ,value) ,@(ini-list->alist ooo)))
+    ('()
+     '())))
+
+(define (ini-fetch url)
+  (let* ((port (http-fetch url #:text? #t))
+         (ini-list (stream->list (port->stream port read))))
+    (close-port port)
+    (ini-list->alist ini-list)))
+
+(define (latest-git-tag repo)
+  (let* ((last-ref (last (remote-refs repo #:tags? #t)))
+         (last-git-tag (last (string-split last-ref #\/))))
+    (string-drop last-git-tag 1)))
+
 ;; To update, see file sysimg.jl
 (define %julia-stdlibs
   (list "julia"
@@ -194,14 +237,21 @@ (define (make-julia-sexp name source home-page synopsis description
                  ((license) (license->symbol license))
                  (_ `(list ,@(map license->symbol licenses)))))))
 
+;; TODO handle subdir case properly.
+
 (define* (juliahub->guix-package package-name
                                  #:key version #:allow-other-keys)
   "Fetch the metadata for PACKAGE-NAME from juliahub.org, and return the
 `package' s-expression corresponding to that package, or #f on failure.
 Optionally include a VERSION string to fetch a specific version juliahub."
-  (let ((package (if version
-                     (juliahub-fetch package-name version)
-                     (juliahub-fetch package-name))))
+  (let* ((package-toml (ini-fetch (general-url name "Package.toml")))
+         (subdir (assoc-ref package-toml 'subdir))
+         (tag (latest-git-tag (assoc-ref package-toml 'repo)))
+         (package (if version
+                      (juliahub-fetch package-name version)
+                      (if tag
+                          (juliahub-fetch package-name tag)
+                          (juliahub-fetch package-name)))))
     (if package
         (let-values (((source directory)
                       (git->origin+dir
@@ -233,13 +283,13 @@ (define* (juliahub->guix-package package-name
 
 (define (guix-package->juliahub-name package)
   (let* ((url (juliahub-package-url package))
-         (git-name (car (last-pair (string-split url #\/))))
+         (git-name (last (string-split url #\/)))
          (ungitted-name (if (string-suffix? ".git" git-name)
                             (string-drop-right git-name 4)
                             git-name))
          (package-name (if (string-suffix? ".jl" ungitted-name)
-                            (string-drop-right ungitted-name 4)
-                            ungitted-name)))
+                           (string-drop-right ungitted-name 4)
+                           ungitted-name)))
     package-name))
 
 (define* (import-release package #:key (version #f))
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 18 Sep 2023 18:04:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 18 14:04:16 2023
Received: from localhost ([127.0.0.1]:54391 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qiIbX-0002JA-U6
	for submit <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:16 -0400
Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:40128)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1qiIbJ-0002Eu-KA
 for 62202 <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:03 -0400
Received: by mail-wm1-x336.google.com with SMTP id
 5b1f17b1804b1-40471c054f9so14350695e9.0
 for <62202 <at> debbugs.gnu.org>; Mon, 18 Sep 2023 11:03:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1695060227; x=1695665027; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=5zUYG2morKqu0VFKsEpv89xQiuk4D+IDiE55bHsZsr4=;
 b=MJd9LdcErLGKassUKkEZTuQFyL7d9VTh0xW7LhKkKkkI40oN/2WpAnVcw/lFJGmoAz
 FnQzSdxFrSzwkcMRCKN9U2lqxEo9e7RyWdL9OjxFOK5fWtmSQWh5dQ/Vo5mQZv3NKU3Z
 i43Usf55tuXs805A0fl5NPvtGEJaNPJz2F0s72uxav/KV3YparIW/wv9d+zvCKapVFu/
 QDRvE50tQ+RRlO5C9wpPRqB9wLFoFsJDUoue4ceCJwPmtgCcfKREgcbS12LOJQz6PWf8
 H64t87fLXtNPpLbR4Cd0W4MYZfvvaQkx1ORZQyzHl9A3TmS65otk/5llnyqYvVaGdpTE
 7Y9g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1695060227; x=1695665027;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=5zUYG2morKqu0VFKsEpv89xQiuk4D+IDiE55bHsZsr4=;
 b=S2XMemBacXQPh2SOflRsVIiXRmyHbMdhtxnAxYyXheYxwbgJjP4IdTQWo3bY13Icho
 +1jJ1XhnKDubJZuQGe6YpH4A3KnlnuHOdRMc7TSiMaHnqQ5e+834TpWs01JjtzClBN0q
 NdaHXvuxbUJ5WNLXJq7H/9ugAGWEV04FMRFYG+J4jEbyZX0uNoM16lal2Ya89d/XOf/P
 SJH46FW/8lyk94Jp2jNdXUxudp4S6bI6po9rw6K6kC3uN9KtJ83TCbVtz7zpdpcWHhCI
 MCqV8BPHH0u1vFzKpuJoHxLwWehN1jAsOH7jUrFmaS5zOI7cdUax+9GTapIs8U3XOnvk
 t4/w==
X-Gm-Message-State: AOJu0YwB0ZWDdiZgKmc2CXnaLLCSSG4YItsa3Mt9rR7/ckVMl09hleFq
 LWZPDDgNZuorL+3bbSON0w+rqo2p18w=
X-Google-Smtp-Source: AGHT+IFFItclXHmnd4APZirB6z60UYv3+2yKnHsqftrMBC4DaAGxkjRDYjtmhitrjxSJCX32ZMfgZA==
X-Received: by 2002:a05:600c:1d04:b0:401:c07f:72bd with SMTP id
 l4-20020a05600c1d0400b00401c07f72bdmr9511481wms.4.1695060227502; 
 Mon, 18 Sep 2023 11:03:47 -0700 (PDT)
Received: from localhost.localdomain ([193.48.40.241])
 by smtp.gmail.com with ESMTPSA id
 z2-20020adfd0c2000000b0030ada01ca78sm2210465wrh.10.2023.09.18.11.03.47
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 18 Sep 2023 11:03:47 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH v2 16/23] DRAFT import: juliahub: Filter out stdlibs from
 test-dependencies.
Date: Mon, 18 Sep 2023 20:03:23 +0200
Message-Id: <a01184089d2ac0d70c56bf0642a3f0c18efdb6f5.1695060058.git.zimon.toutoune@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
References: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: Nicolas Graves via Guix-patches via <guix-patches@HIDDEN>,
 Simon Tournier <zimon.toutoune@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

From: Nicolas Graves via Guix-patches via <guix-patches@HIDDEN>

Signed-off-by: Simon Tournier <zimon.toutoune@HIDDEN>
---
 guix/import/juliahub.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index 6ce0487dba38..1c7b02929634 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -174,7 +174,8 @@ (define (parse-test-dependencies directory)
   (let* ((port (open-input-file (string-append directory "/Project.toml")))
          (ini-list (stream->list (port->stream port read))))
     (close-port port)
-    (ini-list->test-dependencies ini-list)))
+    (filter (lambda (x) (not (member x %julia-stdlibs)))
+            (ini-list->test-dependencies ini-list))))
 
 ;; Julia package.
 (define-json-mapping <juliahub-package> make-juliahub-package juliahub-package?
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 18 Sep 2023 18:04:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 18 14:04:15 2023
Received: from localhost ([127.0.0.1]:54389 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qiIbX-0002Iz-EK
	for submit <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:15 -0400
Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:39251)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1qiIbI-0002Ep-0A
 for 62202 <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:03 -0400
Received: by mail-wm1-x330.google.com with SMTP id
 5b1f17b1804b1-404724ec0dcso12479265e9.1
 for <62202 <at> debbugs.gnu.org>; Mon, 18 Sep 2023 11:03:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1695060226; x=1695665026; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=YXqL4K66ytKP24DRIGlGdAvLaLiYuD/871Y6ruKDXqQ=;
 b=gP1VbSN6qRdBCfsIqIyfhAxEwQ/P/W5xIkAQqsN+VfYVClqbQLLTQ+26E+fzo4GhlY
 EtUB27brImWA95lQ5R1oWJNQyRTkunL0HpAgkLxaTbijPTh1jdExEooA71YfenUyxJyH
 losNPL1AcMB3yeE0T33Evg0qDHYSiTSAeR7oF2G5AydmjZDJWxDlNszyCZIEJju34CwY
 1uc5XvLGqBnv6HikXyb5RuJoh1rghr9q9NGXNIwJF2jhBOPQ1uBrhIFx5fLAlRfdqw3j
 nnrRV3vHR1PclZKvLop+TSqrHXUuwXWCDGFwVfTrVOjQJQ22q9tK+vDHUbjLyDSWT4I3
 U4Fg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1695060226; x=1695665026;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=YXqL4K66ytKP24DRIGlGdAvLaLiYuD/871Y6ruKDXqQ=;
 b=w27NTB22jb/nv+9G79ocKmnHNXw/kiyETvOtSpktpzLYB2U7ZSOzAl96d6wNAtFOxk
 fWv0YizHD/A+MMExpBbYvmrH1QoLZW/d/csVGdKZmREMUFMuNjY+tRsCPS9/cGSTc15t
 U8/ONTqC/ERR+URu7Hj9WCULjJa1+ZkJqN0ZXztmot+TQ/Uf2Eijsy6tSZU7ViIqmni7
 FYwAkMBDD5NGxxOh0z9KWOtY7+V3u2pe7V/B9eJzO5Q/Zrgf/ATQBjhhz//0dC3j6lp/
 B04KkLz2ngp1GyMq6uuyya9b/1CbPcHy1ltCwL8KXHhYsOH+d3/c5gc+mFwU8A3pM6uT
 r/VQ==
X-Gm-Message-State: AOJu0YyMK0/izs3VgwsnnQtzmQv9z22xq5VibmVqT4idU+jB65ITEehr
 BJz+9idB6Q958f8SfNxkSFmo/M0q1x8=
X-Google-Smtp-Source: AGHT+IEQ1arr7j2r1YrsSfB+aA/7qxSqZoaNVcdHY5PC+lM01DE8qRa8ZAwPXzkg5T0JiMuf3eQogg==
X-Received: by 2002:a05:600c:3d89:b0:401:c717:ec69 with SMTP id
 bi9-20020a05600c3d8900b00401c717ec69mr8974386wmb.4.1695060225959; 
 Mon, 18 Sep 2023 11:03:45 -0700 (PDT)
Received: from localhost.localdomain ([193.48.40.241])
 by smtp.gmail.com with ESMTPSA id
 z2-20020adfd0c2000000b0030ada01ca78sm2210465wrh.10.2023.09.18.11.03.45
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 18 Sep 2023 11:03:45 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH v2 13/23] DRAFT import: juliahub: Improve test dependencies
 parsing.
Date: Mon, 18 Sep 2023 20:03:20 +0200
Message-Id: <f48f3d3027eacc1834b627f2b4e6a5903d53314c.1695060058.git.zimon.toutoune@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
References: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: Nicolas Graves via Guix-patches via <guix-patches@HIDDEN>,
 Simon Tournier <zimon.toutoune@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

From: Nicolas Graves via Guix-patches via <guix-patches@HIDDEN>

Signed-off-by: Simon Tournier <zimon.toutoune@HIDDEN>
---
 guix/import/juliahub.scm | 30 +++++++++++++-----------------
 1 file changed, 13 insertions(+), 17 deletions(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index 5327e923251d..2ea461b72aba 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -154,31 +154,27 @@ (define (json->juliahub-dependencies vector)
                #f)))
        (vector->list vector))))
 
-(define (ini-list->extra-dependencies lst)
+(define (ini-list->test-dependencies lst)
   (match lst
-    (('(extras) ooo ...)
-     (extra-list->extra-dependencies ooo))
-    (((tag) ooo ...)
-     (ini-list->extra-dependencies ooo))
-    ((attribute '= value ooo ...)
-     (ini-list->extra-dependencies ooo))
+    (('test '= ooo ...)
+     `(,(caar ooo) ,@(test-list->test-dependencies (cdar ooo))))
+    ((value ooo ...)
+     (ini-list->test-dependencies ooo))
     ('()
-     '())))
+      '())))
 
-(define (extra-list->extra-dependencies lst)
+(define (test-list->test-dependencies lst)
   (match lst
-    ((attribute '= value ooo ...)
-     `(,(symbol->string attribute) ,@(extra-list->extra-dependencies ooo)))
-    (((tag) ooo ...)
-     '())
+    ((('unquote value) ooo ...)
+     `(,value ,@(test-list->test-dependencies ooo)))
     ('()
-     '())))
+      '())))
 
-(define (parse-extra-dependencies directory)
+(define (parse-test-dependencies directory)
   (let* ((port (open-input-file (string-append directory "/Project.toml")))
          (ini-list (stream->list (port->stream port read))))
     (close-port port)
-    (ini-list->extra-dependencies ini-list)))
+    (ini-list->test-dependencies ini-list)))
 
 ;; Julia package.
 (define-json-mapping <juliahub-package> make-juliahub-package juliahub-package?
@@ -268,7 +264,7 @@ (define* (juliahub->guix-package package-name
                  (licenses
                   (map spdx-string->license
                        (list (juliahub-package-license package))))
-                 (test-dependencies-names (parse-extra-dependencies directory)))
+                 (test-dependencies-names (parse-test-dependencies directory)))
             (values (make-julia-sexp
                      package-name
                      source
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 18 Sep 2023 18:04:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 18 14:04:15 2023
Received: from localhost ([127.0.0.1]:54387 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qiIbX-0002Ir-1g
	for submit <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:15 -0400
Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:38973)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1qiIbI-0002Er-HE
 for 62202 <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:03 -0400
Received: by mail-wm1-x32f.google.com with SMTP id
 5b1f17b1804b1-404800222d2so8773805e9.0
 for <62202 <at> debbugs.gnu.org>; Mon, 18 Sep 2023 11:03:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1695060226; x=1695665026; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=FsytTF8Caie6A56At2ZABSqNJEQNDhWP9sVMRnfj1cM=;
 b=jlf3HXk3uwMitxiwJ96vK1wlWUoRm1ZdkpT/ICUDS1yaFAzosgUTcQRpo3sZMbRbzX
 2IuClWF0k3XUHoo2V9stZ6xoU1KovAhcEBLdUfA7P5QwmFzVSqPghmrfcilJAgaVXc81
 CN8ghZSmZRqNCKoEXsRYMNkVduNfxFxtwC4gTyljR+7DNfIGHcWOnv3uhRSyHWFVD7+6
 Dbfi2hU2CpA53s1ix9mc1345DArg+ww4CO+FzSvua5bSRVf3mmo1w50QU6x+Yo1PFdjK
 dz/jiLDRFy5TmtB7RGfWeFA1exGGP8nWQNwolGiAmU9ubFS9dWHoVrDciqQ/WQCfiojK
 i3Vg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1695060226; x=1695665026;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=FsytTF8Caie6A56At2ZABSqNJEQNDhWP9sVMRnfj1cM=;
 b=BwYBFBqT/5kAsn8/ZIvhn7y0sgHO1/fYT1DX79G+ukwA2lAj42rYZIqewL0BTud8ad
 2fTpYN8tlkY3ahl+EG5WjjLWkAzHzVeQXFHFrLKP4B5UL0M6NyrGnEm7t+oIlYr4QmUw
 RyXQA0YDuOoCYF1yPe1A0Fe+jKJ2Yq1jtWTOwFO51w1iGJS2Co39VoQycU2pBNHHHCi+
 /Hnhjc91mELG8kQ95k4eC/ZcqE3bRNNQnVMbQGw94himsULNCmNMQAzS6hjKkBwGcfLB
 rCyvMrg6nRAjU65D/J3GJ1ZEi00wdXY3sp0OG87nox6jUOKSVbcGZGXLnkXl2BOFGMF7
 yEHQ==
X-Gm-Message-State: AOJu0YzgwIxpzgldgkjctHHwtQQfEGA0Y/4QR6ivO727yuM750D9em/l
 29tJ2I5LjvgfME/La7HHkhXlLG5VAp8=
X-Google-Smtp-Source: AGHT+IHWp46vXEqDj1X35ItbaGVF4yPpvqV7RZ8HDNv0DesrujyiKzBnEIxlTBmsuDl8h80Kvv1jxA==
X-Received: by 2002:a05:600c:5106:b0:3fe:d637:7b25 with SMTP id
 o6-20020a05600c510600b003fed6377b25mr9023230wms.0.1695060226474; 
 Mon, 18 Sep 2023 11:03:46 -0700 (PDT)
Received: from localhost.localdomain ([193.48.40.241])
 by smtp.gmail.com with ESMTPSA id
 z2-20020adfd0c2000000b0030ada01ca78sm2210465wrh.10.2023.09.18.11.03.46
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 18 Sep 2023 11:03:46 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH v2 14/23] DRAFT import: juliahub: Handle the case where we
 have a subdirectory.
Date: Mon, 18 Sep 2023 20:03:21 +0200
Message-Id: <cfb939c1da2ab7c3997297e91dd69712d715d2af.1695060058.git.zimon.toutoune@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
References: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: Nicolas Graves via Guix-patches via <guix-patches@HIDDEN>,
 Simon Tournier <zimon.toutoune@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

From: Nicolas Graves via Guix-patches via <guix-patches@HIDDEN>

Signed-off-by: Simon Tournier <zimon.toutoune@HIDDEN>
---
 guix/import/juliahub.scm | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index 2ea461b72aba..b646f9329562 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -233,14 +233,12 @@ (define (make-julia-sexp name source home-page synopsis description
                  ((license) (license->symbol license))
                  (_ `(list ,@(map license->symbol licenses)))))))
 
-;; TODO handle subdir case properly.
-
 (define* (juliahub->guix-package package-name
                                  #:key version #:allow-other-keys)
   "Fetch the metadata for PACKAGE-NAME from juliahub.org, and return the
 `package' s-expression corresponding to that package, or #f on failure.
 Optionally include a VERSION string to fetch a specific version juliahub."
-  (let* ((package-toml (ini-fetch (general-url name "Package.toml")))
+  (let* ((package-toml (ini-fetch (general-url package-name "Package.toml")))
          (subdir (assoc-ref package-toml 'subdir))
          (tag (latest-git-tag (assoc-ref package-toml 'repo)))
          (package (if version
@@ -264,7 +262,11 @@ (define* (juliahub->guix-package package-name
                  (licenses
                   (map spdx-string->license
                        (list (juliahub-package-license package))))
-                 (test-dependencies-names (parse-test-dependencies directory)))
+                 (test-dependencies-names
+                  (if subdir
+                      (parse-test-dependencies
+                       (string-append subdir "/" directory))
+                      (parse-test-dependencies directory))))
             (values (make-julia-sexp
                      package-name
                      source
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 18 Sep 2023 18:04:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 18 14:04:15 2023
Received: from localhost ([127.0.0.1]:54385 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qiIbW-0002Ik-KO
	for submit <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:15 -0400
Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:40990)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1qiIbH-0002El-0Z
 for 62202 <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:02 -0400
Received: by mail-wr1-x429.google.com with SMTP id
 ffacd0b85a97d-3200b181b67so96160f8f.0
 for <62202 <at> debbugs.gnu.org>; Mon, 18 Sep 2023 11:03:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1695060225; x=1695665025; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=qM+SVoQB9toi6PC+m9jnwY9o5wFqpZW9jHiqrI8o5XA=;
 b=JWOeSmFaFKDfT2OFJyO6hsrhQPSG4ClVr8Q6Cs6xYuKoBufRqJcLsC5eZcMZ0wDBkS
 BG+ZYHxPDyf8NHG2FUx9vml+BvnocFr5f2ZaDXlhxeLbdNVCy9mmDfn5EBzBHaxcJqfh
 BhfAzTJDgTIJabxzYOQTxDEFIcL/1DZ577rnmE8ZPFU7Lg3ets2vorC6ZEr4duB64RV8
 /yK4AB2mts/8O8mQAJCQwLuZeGXqAwzOJaIi/7CEYmrjQKEGXsFfCv8vAT6p+LbeXCRE
 X3XSXF/nUdEqwY8+2lUIkTNDah0TujjY3nPttWs9sZhfheq7lcHtVoc3Uf4WDR9zRx7D
 W1uQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1695060225; x=1695665025;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=qM+SVoQB9toi6PC+m9jnwY9o5wFqpZW9jHiqrI8o5XA=;
 b=AT/wsnUu3tIfG+ndqkObLFSK1kO2yTCn+mzD+PbGuHW4ZyXOLmvXyEggc4FyPzwF9t
 TGhW81/95jz+bvyDsxj4L4enTw51pW32UUzaKV7cz4lOeZH9yVHLP/7dRZom6G8APsuc
 rgN2+0DM+vbkf3lXHHvlB8LWmKxiWmPKG/T/44SAlj+Q4JqWc8TKLI5/d+yYaBULaqmp
 IJlJKhgVF7sTLnKllVen29mTreqok4iGhRLRQzIDYQLWjnwLjFfGwezqmEmnA853myk7
 rdZ0dGYoNkKR/NkxjDxk/nS1O1ekIE4IFPua7YiHApvxujS+ucZ8u81TbQC8qK6sWa6H
 j6Yg==
X-Gm-Message-State: AOJu0YwOYTnuNoouN3zl45mo++mATTSqbapu13uujbBz2u95dnWBiWz1
 CHFn9d14SklpbAcjxVljRFIE/qVtsuc=
X-Google-Smtp-Source: AGHT+IH4OIOewHKT4Nf9ssrE49TpirRUfigR1o2uHDImUBPu1yKTaCvO8fipQM4ypDeGNb9Oioqy4A==
X-Received: by 2002:a5d:484a:0:b0:31a:ea18:c516 with SMTP id
 n10-20020a5d484a000000b0031aea18c516mr8306778wrs.3.1695060224905; 
 Mon, 18 Sep 2023 11:03:44 -0700 (PDT)
Received: from localhost.localdomain ([193.48.40.241])
 by smtp.gmail.com with ESMTPSA id
 z2-20020adfd0c2000000b0030ada01ca78sm2210465wrh.10.2023.09.18.11.03.44
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 18 Sep 2023 11:03:44 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH v2 11/23] DRAFT import: juliahub: Improve dependency
 management.
Date: Mon, 18 Sep 2023 20:03:18 +0200
Message-Id: <9c97220836376a2e6de87f52b4a7b842581225ed.1695060058.git.zimon.toutoune@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
References: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: Nicolas Graves via Guix-patches via <guix-patches@HIDDEN>,
 Simon Tournier <zimon.toutoune@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

From: Nicolas Graves via Guix-patches via <guix-patches@HIDDEN>

Signed-off-by: Simon Tournier <zimon.toutoune@HIDDEN>
---
 guix/import/juliahub.scm | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index b1eeb736a824..fc25ba1d4220 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -168,22 +168,20 @@ (define* (juliahub-fetch name #:key (version #f))
          json->juliahub-package))
 
 (define (make-julia-sexp name source home-page synopsis description
-                         dependencies test-dependencies-names licenses)
+                         direct-dependencies test-dependencies-names licenses)
   "Return the `package' s-expression for a Julia package with the given NAME,
-VERSION, URI, HASH, HOME-PAGE, DESCRIPTION, DEPENDENCIES,
+VERSION, URI, HASH, HOME-PAGE, DESCRIPTION, DIRECT-DEPENDENCIES,
 TEST-DEPENDENCIES-NAMES and LICENSES."
   `(package
      (name ,(julia-name->guix-name name))
      (version ,version)
      (source ,source)
      (build-system julia-build-system)
-     ,@(let ((direct-dependencies
-              (filter julia-dependency-direct? dependencies)))
-         (if (null? direct-dependencies)
-             '()
-             `((propagated-inputs
-                (list ,@(map (compose julia-name->guix-name juliahub-dependency-name)
-                             direct-dependencies))))))
+     ,@(if (null? direct-dependencies)
+           '()
+           `((propagated-inputs
+              (list ,@(map (compose julia-name->guix-name juliahub-dependency-name)
+                           direct-dependencies)))))
      ,@(if (null? test-dependencies-names)
            '()
            `((native-inputs
@@ -211,9 +209,12 @@ (define* (juliahub->guix-package package-name
                        `(tag-or-commit
                          . ,(string-append
                              "v" (juliahub-package-version package))))))
-          (let* ((dependencies-names
+          (let* ((direct-dependencies
+                  (filter juliahub-dependency-direct?
+                          (juliahub-package-dependencies package)))
+                 (dependencies-names
                   (map juliahub-dependency-name
-                       (juliahub-package-direct-dependencies package)))
+                       direct-dependencies))
                  (licenses
                   (map spdx-string->license
                        (list (juliahub-package-license package))))
@@ -224,7 +225,7 @@ (define* (juliahub->guix-package package-name
                      (juliahub-package-homepage package)
                      (juliahub-package-description package)
                      (beautify-description (juliahub-package-readme package))
-                     (juliahub-package-direct-dependencies package)
+                     direct-dependencies
                      test-dependencies-names
                      licenses)
                     (append dependencies-names test-dependencies-names))))
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 18 Sep 2023 18:04:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 18 14:04:14 2023
Received: from localhost ([127.0.0.1]:54383 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qiIbW-0002Ib-3Y
	for submit <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:14 -0400
Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:40390)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1qiIbG-0002Ek-Pg
 for 62202 <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:02 -0400
Received: by mail-wr1-x431.google.com with SMTP id
 ffacd0b85a97d-32163c3ece5so66542f8f.1
 for <62202 <at> debbugs.gnu.org>; Mon, 18 Sep 2023 11:03:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1695060225; x=1695665025; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=11mUEohHcrH+QNTVAs5Uln5kD6Ej1y2o4Jf0is9mgJM=;
 b=LexqcImSn4TrCB9eiT5s6A/lW9Wipcky5jfibMqzqzbzbImnc+YJQKP5YIpFMfVl+y
 dJU9sQ+VKx1q0ELLkc+E5tp1lsn4T/cjAXB2IIQOTjbcaskUHFP8G6wOBcfdfbeEcyV+
 A8oxfwIIxJHxY2cGcF+4jpJVpaKE0vUxUWl0PXxro1E1J9dL1rURusOESXiGdFu6I4Pi
 SMHBOhe9KAJL2tJ9zojKEk6v67xV+JG7zwAejdCPJ7VrQo5UgA8JGZM1/jlpZqibFQAb
 c1Fz62MNVu/T9L8IB3qcz5N/YfFjjz4pkKP2YgQDgqkSn07Px6mrZ1PXgwbfh9fytf8Q
 3gPQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1695060225; x=1695665025;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=11mUEohHcrH+QNTVAs5Uln5kD6Ej1y2o4Jf0is9mgJM=;
 b=lFAjcppjyJw97n+mbHidqHntyewE8I8RG5M7kVNDaodhBZ9ENKhm888bNVM27zok1n
 sagcX5pG+bfDC+7Ey/WodF79X/hy4IaX9Qz74i2vAUPD1lWOPGke0vkiZtPVmZmoJpTB
 SF70pr7Hd7ZzQCAdt9gHydM3v3ms0GXInhLP/bj9VSM8uxCSOS6mTGbcE1MD5rGKQ6UU
 bo77Zg6P4EQ0tYeptwGC/GrRSMlx7jfooTgt1Cz1SB2u2cARV5WpHg3qnHSlZROQYhMZ
 ownOEae8BLVhi1aA6d7/fDXyovryyv6kHCu5xYFjYtLoJQEyYDr+pcbWdGYmyVpXY7P0
 AlRw==
X-Gm-Message-State: AOJu0Yw7KS2cvnePFTEqLX7xpFB5ht+Y/gPr4FzLqFJH91qct534OACH
 5nutwc8cd63g5VQVr+57owejAWkgczg=
X-Google-Smtp-Source: AGHT+IHOMZp0/QSXZeD+sEgNq/N/ASaY17Wre5gIqIlTpo7kpcUxjCIYWu6l8mCXVGDTnDzqqjAljQ==
X-Received: by 2002:a05:6000:1047:b0:31f:a096:6e18 with SMTP id
 c7-20020a056000104700b0031fa0966e18mr7723857wrx.6.1695060224406; 
 Mon, 18 Sep 2023 11:03:44 -0700 (PDT)
Received: from localhost.localdomain ([193.48.40.241])
 by smtp.gmail.com with ESMTPSA id
 z2-20020adfd0c2000000b0030ada01ca78sm2210465wrh.10.2023.09.18.11.03.43
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 18 Sep 2023 11:03:44 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH v2 10/23] DRAFT import: juliahub: Simplify juliahub dependency
 management.
Date: Mon, 18 Sep 2023 20:03:17 +0200
Message-Id: <d21d6314221dd876b598a86a655b658821c3334f.1695060058.git.zimon.toutoune@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
References: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: Nicolas Graves via Guix-patches via <guix-patches@HIDDEN>,
 Simon Tournier <zimon.toutoune@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

From: Nicolas Graves via Guix-patches via <guix-patches@HIDDEN>

Signed-off-by: Simon Tournier <zimon.toutoune@HIDDEN>
---
 guix/import/juliahub.scm | 42 ++++++++++++++--------------------------
 1 file changed, 14 insertions(+), 28 deletions(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index af08f3d698d0..b1eeb736a824 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -100,26 +100,13 @@ (define (juliahub-slug-version name)
          (latest-version (string-drop uri 6)))
     `(,slug ,latest-version)))
 
-(define (json->juliahub-direct-dependencies vector)
+(define (json->juliahub-dependencies vector)
   (if (vector? vector)
       (filter-map
        (lambda (el)
          (let ((dep (json->juliahub-dependency el)))
-           (if (and (juliahub-dependency-direct? dep)
-                    (not (member (juliahub-dependency-name dep)
-                                 %julia-stdlibs)))
-               dep
-               #f)))
-       (vector->list vector))))
-
-(define (json->juliahub-indirect-dependencies vector)
-  (if (vector? vector)
-      (filter-map
-       (lambda (el)
-         (let ((dep (json->juliahub-dependency el)))
-           (if (and (not (juliahub-dependency-direct? dep))
-                    (not (member (juliahub-dependency-name dep)
-                                 %julia-stdlibs)))
+           (if (not (member (juliahub-dependency-name dep)
+                            %julia-stdlibs))
                dep
                #f)))
        (vector->list vector))))
@@ -157,12 +144,9 @@ (define-json-mapping <juliahub-package> make-juliahub-package juliahub-package?
   (readme juliahub-package-readme) ;string
   (version juliahub-package-version) ;string
   (description juliahub-package-description) ;string
-  (direct-dependencies
-   juliahub-package-direct-dependencies "deps"
-   json->juliahub-direct-dependencies) ;list of <juliahub-dependency>
-  (indirect-dependencies
-   juliahub-package-indirect-dependencies "deps"
-   json->juliahub-indirect-dependencies) ;list of <juliahub-dependency>
+  (dependencies
+   juliahub-package-dependencies "deps"
+   json->juliahub-dependencies) ;list of <juliahub-dependency>
   (url juliahub-package-url) ;string
   (uuid juliahub-package-uuid) ;string
   (license juliahub-package-license)) ;string
@@ -184,7 +168,7 @@ (define* (juliahub-fetch name #:key (version #f))
          json->juliahub-package))
 
 (define (make-julia-sexp name source home-page synopsis description
-                         direct-dependencies test-dependencies-names licenses)
+                         dependencies test-dependencies-names licenses)
   "Return the `package' s-expression for a Julia package with the given NAME,
 VERSION, URI, HASH, HOME-PAGE, DESCRIPTION, DEPENDENCIES,
 TEST-DEPENDENCIES-NAMES and LICENSES."
@@ -193,11 +177,13 @@ (define (make-julia-sexp name source home-page synopsis description
      (version ,version)
      (source ,source)
      (build-system julia-build-system)
-     ,@(if (null? direct-dependencies)
-           '()
-           `((propagated-inputs
-              (list ,@(map (compose julia-name->guix-name juliahub-dependency-name)
-                           direct-dependencies)))))
+     ,@(let ((direct-dependencies
+              (filter julia-dependency-direct? dependencies)))
+         (if (null? direct-dependencies)
+             '()
+             `((propagated-inputs
+                (list ,@(map (compose julia-name->guix-name juliahub-dependency-name)
+                             direct-dependencies))))))
      ,@(if (null? test-dependencies-names)
            '()
            `((native-inputs
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 18 Sep 2023 18:04:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 18 14:04:14 2023
Received: from localhost ([127.0.0.1]:54381 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qiIbV-0002IR-2G
	for submit <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:14 -0400
Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:41340)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1qiIbD-0002Eb-9C
 for 62202 <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:01 -0400
Received: by mail-wm1-x32d.google.com with SMTP id
 5b1f17b1804b1-405101a02bcso2535315e9.1
 for <62202 <at> debbugs.gnu.org>; Mon, 18 Sep 2023 11:03:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1695060221; x=1695665021; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=OtMvS4o2GJtrUNPCHXTF/xY25oPgYVlB7vGaIpQ+6eY=;
 b=Ly8lD1fOUE3hVcrCZItwWKBZuELc9P4XmZ2ISUgToDnolnf8NxLWExX2BxtaGAdQoD
 uEB+6wjSdZpXVixZpXIgvetMtKZFCdi8XuSLpicvstQ9f4RtHcjfMOTyUCl11Kqintaq
 ADFsRO6QRP8Dl1oAoOkf9hJsC+hjx4xhsAhMEmpjy+R75nx/nlRIbpDfyMnrjXJapaai
 v3muAv5QF9dmDPyStVzi5MxxD3e8tew+3Kl+oh5mhr/rxtzlJtt9NVsHepvEpeASprS4
 KK6W8CSleUgncnX+QDh5h1/lYXgNGZhXdL9vctbnq8P2TN18Z5AfybMH9EsjyzSSR/JB
 TfeQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1695060221; x=1695665021;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=OtMvS4o2GJtrUNPCHXTF/xY25oPgYVlB7vGaIpQ+6eY=;
 b=X9OI7bboi9dE+vbrmnsfbqT41cOuDrsu6fFvQa7hZJMW3kWEhdOSQmXxFgQXtksFXo
 /t2UAkV575vUsBJjHSkPrcXNQqHEZJtuhjD145Wwk8ItUnGudfcRxCjMQ1ABK4GmofqB
 3nm12gwDxhPmEcUDQqBx4pjBB10zAgCeRyEL5pjqKY8EW0wz7dQR7BjPxzNyxqbudBW+
 5SQzMQd2x9QRUnOsieRiBruARQSx2PZTwl1LOAE00oC+xx7yu7v662RHidPs4eaB164X
 ImqcKOJA0EIZanVy6vuedju+OK8gJpHIV9mC/x1wlB8jlxOpyeRlD2F7udhNuVT6daMs
 uw+w==
X-Gm-Message-State: AOJu0Yx5AKbcF0oNh1T92d6neQkYZ5Rzjwa1EuE1XzUHohHG96tSjieA
 OEAJeiltcs67pL3mA52XFMVjlOB093M=
X-Google-Smtp-Source: AGHT+IGsyIL6haThWtXtMy3gAFva9TAiiCi/dRlT88aurR35Dx3Gs+6xhguVGr1QoEPApmZrkDYHMg==
X-Received: by 2002:adf:ec4f:0:b0:317:5f08:32a3 with SMTP id
 w15-20020adfec4f000000b003175f0832a3mr7672957wrn.6.1695060221038; 
 Mon, 18 Sep 2023 11:03:41 -0700 (PDT)
Received: from localhost.localdomain ([193.48.40.241])
 by smtp.gmail.com with ESMTPSA id
 z2-20020adfd0c2000000b0030ada01ca78sm2210465wrh.10.2023.09.18.11.03.40
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 18 Sep 2023 11:03:40 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH v2 04/23] DRAFT import: Add julia.
Date: Mon, 18 Sep 2023 20:03:11 +0200
Message-Id: <cc098ba63817ae293b4c0ba5d72bc61c11057f22.1695060058.git.zimon.toutoune@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
References: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: Simon Tournier <zimon.toutoune@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* guix/scripts/import.scm (importers): Add juliahub.
* guix/import/juliahub.scm: New file.
* guix/scripts/import/juliahub.scm: New file.
* Makefile.am: Add them.
---
 Makefile.am                      |   2 +
 guix/import/juliahub.scm         | 183 +++++++++++++++++++++++++++++++
 guix/scripts/import.scm          |   2 +-
 guix/scripts/import/juliahub.scm | 107 ++++++++++++++++++
 4 files changed, 293 insertions(+), 1 deletion(-)
 create mode 100644 guix/import/juliahub.scm
 create mode 100644 guix/scripts/import/juliahub.scm

diff --git a/Makefile.am b/Makefile.am
index 922913355c45..70b06c1a793f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -289,6 +289,7 @@ MODULES =					\
   guix/import/hackage.scm			\
   guix/import/hexpm.scm				\
   guix/import/json.scm				\
+  guix/import/juliahub.scm			\
   guix/import/kde.scm				\
   guix/import/launchpad.scm   			\
   guix/import/minetest.scm   			\
@@ -344,6 +345,7 @@ MODULES =					\
   guix/scripts/import/hackage.scm		\
   guix/scripts/import/hexpm.scm			\
   guix/scripts/import/json.scm  		\
+  guix/scripts/import/juliahub.scm  		\
   guix/scripts/import/minetest.scm  		\
   guix/scripts/import/opam.scm			\
   guix/scripts/import/pypi.scm			\
diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
new file mode 100644
index 000000000000..efe6abbb2481
--- /dev/null
+++ b/guix/import/juliahub.scm
@@ -0,0 +1,183 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2023 Nicolas Graves <ngraves@HIDDEN>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (guix import juliahub)
+  #:use-module (ice-9 textual-ports)
+  #:use-module (ice-9 regex)
+  #:use-module (ice-9 match)
+  #:use-module (ice-9 string-fun)
+  #:use-module (srfi srfi-9)
+  #:use-module (srfi srfi-1)
+  #:use-module (guix http-client)
+  #:use-module (guix import utils)
+  #:use-module (guix import json)
+  #:use-module (guix base16)
+  #:use-module (guix base32)
+  #:use-module (guix packages)
+  #:use-module (guix upstream)
+  #:use-module (json)
+  #:use-module ((guix licenses) #:prefix license:)
+
+  #:export (juliahub->guix-package))
+
+(define (juliahub-uri name)
+  (let* ((url (string-append "https://docs.juliahub.com/" name "/"))
+         (port (http-fetch url #:text? #t))
+         (_ (get-line port))
+         (meta (get-line port))
+         (regex "url=[a-zA-Z0-9]{5}\\/[0-9\\.]*")
+         (redirect (match:substring (string-match regex meta))))
+    (close-port port)
+    (string-drop redirect 4)))
+
+(define (juliahub-url name)
+  (let* ((url (string-append "https://docs.juliahub.com/" name "/"))
+         (uri (juliahub-uri name)))
+    (string-append url uri "/")))
+
+(define (juliahub-slug-version name)
+  (let* ((uri (juliahub-uri name))
+         (slug (string-take uri 5))
+         (latest-version (string-drop uri 6)))
+    `(,slug ,latest-version)))
+
+(define (json->juliahub-direct-dependencies vector)
+  (if (vector? vector)
+      (filter-map
+       (lambda (el)
+         (let ((dep (json->juliahub-dependency el)))
+           (if (juliahub-dependency-direct? dep)
+               dep
+               #f)))
+       (vector->list vector))))
+
+;; Julia package.
+(define-json-mapping <juliahub-package> make-juliahub-package juliahub-package?
+  json->juliahub-package
+  (homepage juliahub-package-homepage) ;string
+  (readme juliahub-package-readme) ;string
+  ;; (slug juliahub-package-slug) ;string
+  (version juliahub-package-version) ;string
+  (description juliahub-package-description) ;string
+  (dependencies
+   juliahub-package-dependencies "deps"
+   json->juliahub-direct-dependencies) ;list of <juliahub-dependency>
+   ;; (lambda (vector)
+     ;; (map json->juliahub-dependency (vector->list vector))))
+  (url juliahub-package-url) ;string
+  (uuid juliahub-package-uuid) ;string
+  (license juliahub-package-license)) ;string
+
+(define-json-mapping <juliahub-dependency>
+  make-juliahub-dependency juliahub-dependency?
+  json->juliahub-dependency
+  (direct? juliahub-dependency-direct? "direct") ;boolean
+  (name juliahub-dependency-name) ;string
+  (uuid juliahub-dependency-uuid) ;string
+  (versions juliahub-dependency-versions "versions" vector->list)) ;list of strings
+  ;; (slug juliahub-dependency-slug) ;string
+
+(define (julia-name->guix-name name)
+  (string-append "julia-" (snake-case name)))
+
+(define* (juliahub-fetch name #:key (version #f))
+  "Return a <juliahub-package> record for package NAME, or #f on failure."
+  (and=> (json-fetch (string-append (juliahub-url name) "pkg.json"))
+         json->juliahub-package))
+
+(define (make-julia-sexp name version uri hash home-page synopsis description
+                         dependencies licenses)
+  "Return the `package' s-expression for a Julia package with the given NAME,
+VERSION, URI, HASH, HOME-PAGE, DESCRIPTION, DEPENDENCIES, and LICENSES."
+  `(package
+     (name ,(julia-name->guix-name name))
+     (version ,version)
+     (source (origin
+               (method url-fetch)
+               (uri ,uri)
+               (sha256
+                (base32
+                 "0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5"
+                 ;; ,(bytevector->nix-base32-string hash)
+                 ))))
+     (build-system julia-build-system)
+     ,@(if (null? dependencies)
+           '()
+           `((inputs
+              (list ,@(map (compose julia-name->guix-name juliahub-dependency-name)
+                           dependencies)))))
+     (synopsis ,synopsis)
+     (description ,description)
+     (home-page ,home-page)
+     (license ,(match licenses
+                 (() #f)
+                 ((license) (license->symbol license))
+                 (_ `(list ,@(map license->symbol licenses)))))))
+
+(define* (juliahub->guix-package package-name
+                                 #:key version #:allow-other-keys)
+  "Fetch the metadata for PACKAGE-NAME from juliahub.org, and return the
+`package' s-expression corresponding to that package, or #f on failure.
+Optionally include a VERSION string to fetch a specific version juliahub."
+  (let ((package (if version
+                      (juliahub-fetch package-name version)
+                      (juliahub-fetch package-name))))
+    (if package
+        (let* ((dependencies-names
+                (map juliahub-dependency-name
+                     (juliahub-package-dependencies package)))
+               (licenses
+                (map spdx-string->license
+                     (list (juliahub-package-license package)))))
+          (values (make-julia-sexp
+                   package-name
+                   (juliahub-package-version package)
+                   (juliahub-package-url package)
+                   "0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5"
+                   (juliahub-package-homepage package)
+                   (juliahub-package-description package)
+                   (beautify-description (juliahub-package-readme package))
+                   (juliahub-package-dependencies package)
+                   licenses)
+                  dependencies-names))
+        (values #f '()))))
+
+(define* (import-release package #:key (version #f))
+  "Return an <upstream-source> for the latest release of PACKAGE."
+  (let* ((package-name (guix-package->juliahub-name package))
+         (package      (juliahub-fetch package-name))
+         (version  (or version (juliahub-version gem)))
+         (url      (rubyjuliahubs-uri gem-name version)))
+    (upstream-source
+     (package (package-name package))
+     (version version)
+     (urls (list url)))))
+
+(define %juliahub-updater
+  (upstream-updater
+   (name 'juliahub)
+   (description "Updater for Juliahub packages")
+   (pred juliahub-package?)
+   (import import-release)))
+
+(define* (juliahub-recursive-import package-name #:optional version)
+  (recursive-import package-name
+                    #:repo '()
+                    #:repo->guix-package juliahub->guix-package
+                    #:guix-name ruby-package-name
+                    #:version version))
diff --git a/guix/scripts/import.scm b/guix/scripts/import.scm
index 4ddd8d46a121..74c26e347335 100644
--- a/guix/scripts/import.scm
+++ b/guix/scripts/import.scm
@@ -47,7 +47,7 @@ (define %standard-import-options '())
 
 (define importers '("gnu" "pypi" "cpan" "hackage" "stackage" "egg" "elpa"
                     "gem" "go" "cran" "crate" "texlive" "json" "opam"
-                    "minetest" "elm" "hexpm"))
+                    "minetest" "elm" "hexpm" "juliahub"))
 
 (define (resolve-importer name)
   (let ((module (resolve-interface
diff --git a/guix/scripts/import/juliahub.scm b/guix/scripts/import/juliahub.scm
new file mode 100644
index 000000000000..1317c67aa342
--- /dev/null
+++ b/guix/scripts/import/juliahub.scm
@@ -0,0 +1,107 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2023 Nicolas Graves <ngraves@HIDDEN>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (guix scripts import juliahub)
+  #:use-module (guix ui)
+  #:use-module (guix utils)
+  #:use-module (guix scripts)
+  #:use-module (guix import juliahub)
+  #:use-module (guix scripts import)
+  #:use-module (srfi srfi-1)
+  #:use-module (srfi srfi-11)
+  #:use-module (srfi srfi-37)
+  #:use-module (ice-9 match)
+  #:use-module (ice-9 format)
+  #:use-module (ice-9 receive)
+  #:export (guix-import-juliahub))
+
+
+;;;
+;;; Command-line options.
+;;;
+
+(define %default-options
+  '())
+
+(define (show-help)
+  (display (G_ "Usage: guix import juliahub PACKAGE-NAME[@VERSION] Import and
+convert the Julia package for PACKAGE-NAME.  Optionally, a version can be
+specified after the at-sign (@) character.\n"))
+  (display (G_ "
+  -h, --help             display this help and exit"))
+  (display (G_ "
+  -V, --version          display version information and exit"))
+  (display (G_ "
+  -r, --recursive        generate package expressions for all Gem packages\
+ that are not yet in Guix"))
+  (newline)
+  (show-bug-report-information))
+
+(define %options
+  ;; Specification of the command-line options.
+  (cons* (option '(#\h "help") #f #f
+                 (lambda args
+                   (show-help)
+                   (exit 0)))
+         (option '(#\V "version") #f #f
+                 (lambda args
+                   (show-version-and-exit "guix import gem")))
+         (option '(#\r "recursive") #f #f
+                 (lambda (opt name arg result)
+                   (alist-cons 'recursive #t result)))
+         %standard-import-options))
+
+
+;;;
+;;; Entry point.
+;;;
+
+(define (guix-import-juliahub . args)
+  (define (parse-options)
+    ;; Return the alist of option values.
+    (parse-command-line args %options (list %default-options)
+                        #:build-options? #f))
+
+  (let* ((opts (parse-options))
+         (args (filter-map (match-lambda
+                             (('argument . value)
+                              value)
+                             (_ #f))
+                           (reverse opts))))
+    (match args
+      ((spec)
+       (receive (package-name package-version)
+           (package-name->name+version spec)
+         (let ((code (if (assoc-ref opts 'recursive)
+                         (map (match-lambda
+                                ((and ('package ('name name) . rest) pkg)
+                                 `(define-public ,(string->symbol name)
+                                    ,pkg))
+                                (_ #f))
+                              (juliahub-recursive-import package-name package-version))
+                         (let ((sexp (juliahub->guix-package package-name #:version package-version)))
+                           (if sexp sexp #f)))))
+           (match code
+             ((or #f '(#f))
+              (leave (G_ "failed to download meta-data for package '~a'~%")
+                     package-name))
+             (_ code)))))
+      (()
+       (leave (G_ "too few arguments~%")))
+      ((many ...)
+       (leave (G_ "too many arguments~%"))))))
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 18 Sep 2023 18:04:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 18 14:04:13 2023
Received: from localhost ([127.0.0.1]:54379 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qiIbU-0002IK-Kc
	for submit <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:13 -0400
Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:41001)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1qiIbG-0002Ei-2v
 for 62202 <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:01 -0400
Received: by mail-wr1-x435.google.com with SMTP id
 ffacd0b85a97d-3200b181b67so96155f8f.0
 for <62202 <at> debbugs.gnu.org>; Mon, 18 Sep 2023 11:03:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1695060224; x=1695665024; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=OaQN5db89UTvsdYmpAsDFBxhyD2sfWmK9wAwHYRwHzo=;
 b=GzICWzFLx9PgzRpDfKbj2Dq28uY8m+pkGhlt+p8h667HnYMAoCvtnW4Ahs3R+IVz4y
 9Ac0Fj/0xYPTSJb7wB9TQzGe3nfqfWffIu95JJa9ouK+MxheCQudVvZS4LUoX+jiLIXa
 NiQfmPbJ1o59KoR7dXpxlF6l4wjKbVqPd9bnJirD2VEC6E6sYwX8W3AJGiJW1f0QfS7i
 6//qrs6YUze9tnXGlVCEU0S4dwglp9CloELhaVdratZDT9Ug6Kbr/N/14iMJQagdZ5Op
 kE6wN0mU53GxCb+oanOcWbS/8VYZgdFRcKV1rvdjpRcAHuILyiO/rutgg3ZpxWHTjA38
 OTAg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1695060224; x=1695665024;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=OaQN5db89UTvsdYmpAsDFBxhyD2sfWmK9wAwHYRwHzo=;
 b=mRkXQOY423AGZ1okHBMTV9aoywA7qM7bRzV+H0rg2i26Zs307R6+rLsoe3pCgD7lN9
 u9YXnRp/jEn5RmPz3+uTTykKMljULTXDzvMWyvxcJX29Cq1bRRWNd1wsIRQklda/2K6O
 EugmZcBRLrWIpN7dZXfzH/t82092/zGriDSv7+WBLnQtPvG3aapymueius8/wJVfSQnv
 /MCmRL1f/TE+LTSCnamRUsVklM++Q6jpoHswy9cjL8BA0zGiezpnGZ1W2foVLLTxliQ9
 V9k/WdJBv7RzMcz9SS8TQS7Gw3eB2dDVeZy/m06bXUN7lmsJW/okyy0BU52+L6+YUdbE
 2ajw==
X-Gm-Message-State: AOJu0Yyc3cCV6EuuTMxYXJYpZi2U1Ru0BtXJQQ04R9LEExjm5u43xY74
 ZduTHdCJ6L5H61J+lVMLLVhwvr455qY=
X-Google-Smtp-Source: AGHT+IFoD4xvGhf9ebg6bcBiFQKTjEepHVoOVNrDiB/qnYg8QoTX8GybyanzjGfgABzALvQDv03DXQ==
X-Received: by 2002:a5d:4451:0:b0:317:3a23:4855 with SMTP id
 x17-20020a5d4451000000b003173a234855mr7574455wrr.2.1695060223873; 
 Mon, 18 Sep 2023 11:03:43 -0700 (PDT)
Received: from localhost.localdomain ([193.48.40.241])
 by smtp.gmail.com with ESMTPSA id
 z2-20020adfd0c2000000b0030ada01ca78sm2210465wrh.10.2023.09.18.11.03.43
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 18 Sep 2023 11:03:43 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH v2 09/23] DRAFT import: juliahub: Filter out julia stdlibs.
Date: Mon, 18 Sep 2023 20:03:16 +0200
Message-Id: <be0f04de20abad380175b8f9509fed461e15690f.1695060058.git.zimon.toutoune@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
References: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: Nicolas Graves via Guix-patches via <guix-patches@HIDDEN>,
 Simon Tournier <zimon.toutoune@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

From: Nicolas Graves via Guix-patches via <guix-patches@HIDDEN>

Signed-off-by: Simon Tournier <zimon.toutoune@HIDDEN>
---
 guix/import/juliahub.scm | 49 ++++++++++++++++++++++++++++++++++++++--
 1 file changed, 47 insertions(+), 2 deletions(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index c38c830caaa0..af08f3d698d0 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -38,6 +38,47 @@ (define-module (guix import juliahub)
             %juliahub-updater
             juliahub-recursive-import))
 
+;; To update, see file sysimg.jl
+(define %julia-stdlibs
+  (list "julia"
+        "ArgTools"
+        "Artifacts"
+        "Base64"
+        "CRC32c"
+        "FileWatching"
+        "Libdl"
+        "Logging"
+        "Mmap"
+        "NetworkOptions"
+        "SHA"
+        "Serialization"
+        "Sockets"
+        "Unicode"
+        "DelimitedFiles"
+        "LinearAlgebra"
+        "Markdown"
+        "Printf"
+        "Random"
+        "Tar"
+        "Dates"
+        "Distributed"
+        "Future"
+        "InteractiveUtils"
+        "LibGit2"
+        "Profile"
+        "SparseArrays"
+        "UUIDs"
+        "REPL"
+        "SharedArrays"
+        "Statistics"
+        "SuiteSparse"
+        "TOML"
+        "Test"
+        "LibCURL"
+        "Downloads"
+        "Pkg"
+        "LazyArtifacts"))
+
 (define (juliahub-uri name)
   (let* ((url (string-append "https://docs.juliahub.com/" name "/"))
          (port (http-fetch url #:text? #t))
@@ -64,7 +105,9 @@ (define (json->juliahub-direct-dependencies vector)
       (filter-map
        (lambda (el)
          (let ((dep (json->juliahub-dependency el)))
-           (if (juliahub-dependency-direct? dep)
+           (if (and (juliahub-dependency-direct? dep)
+                    (not (member (juliahub-dependency-name dep)
+                                 %julia-stdlibs)))
                dep
                #f)))
        (vector->list vector))))
@@ -74,7 +117,9 @@ (define (json->juliahub-indirect-dependencies vector)
       (filter-map
        (lambda (el)
          (let ((dep (json->juliahub-dependency el)))
-           (if (not (juliahub-dependency-direct? dep))
+           (if (and (not (juliahub-dependency-direct? dep))
+                    (not (member (juliahub-dependency-name dep)
+                                 %julia-stdlibs)))
                dep
                #f)))
        (vector->list vector))))
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 18 Sep 2023 18:04:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 18 14:04:12 2023
Received: from localhost ([127.0.0.1]:54377 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qiIbU-0002IF-2D
	for submit <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:12 -0400
Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:41469)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1qiIbF-0002Eh-Hj
 for 62202 <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:00 -0400
Received: by mail-wr1-x436.google.com with SMTP id
 ffacd0b85a97d-31ff6420f73so224682f8f.1
 for <62202 <at> debbugs.gnu.org>; Mon, 18 Sep 2023 11:03:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1695060223; x=1695665023; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=ztz1RPjEh+K0rOlxYL3bQHgKm/dUmaijlCwTDzOT3tM=;
 b=iK4f44BLctUmDqsnmj9e4IbGC0g9AB9YWoW83S163we5bQtLfk9+IkJZN6gt5zqv7X
 mDsgUd72U3GBiCrXDJJXoUZcfDlZYy+iIYmx+8IBPTrGE7aJqG0lVDzMloH0R9TgNeC1
 0WMFEVpEp9rDECGb4ku0+Bod29s3bzkJpJEYqdImx1um0A+q5m+ZKbk+gtvLerDxzB48
 w1Gi3Z+/av5QffY8DiweaP7LQX2K5zPUTt6wXB6V0JpUrBuxPBQXeanBkNDy6y4miszY
 sxTb7/yX4iFJRhtWAr2kAeMu6oQKKK2ypCOIFMujekdX84tYyzcx9fOiVwyteJAAR7rF
 gLMw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1695060223; x=1695665023;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=ztz1RPjEh+K0rOlxYL3bQHgKm/dUmaijlCwTDzOT3tM=;
 b=LRo4R0hmU6ku1OjeCNW9nQNjAOMrCk6JtMX6gMP1JO6exdxnLwY2ElEjvxKFjf0huI
 jjI0BJelNNwweSAzBPwIKjGdxWZSnIpehELAOQYCfRVPp0FnPaxbMdXdD8T0epzF2zLi
 mHAoCp2hvB/Y23v96kSynQDSS62GHd5EOg8Ua2ZZciGAUUXcY3qU3x2d5eaPmUc8rzlm
 +wZRlSDd5DbbiVK/X72EY97Gth7rwtp8JEs5w4hoSt/H/UFogaKnMLBljpm0jUj6nJaz
 BaIOdRD5pUTPlUE9blxGQGFsxIciHJaf5uLzf+t0fkuL+S499C3hzJzZEJdnguXAt8k8
 wJ2A==
X-Gm-Message-State: AOJu0Yx7oCZ4veEod8MsI4+Ohf0j7ZukbbdLjLp/Q0cUgZXYay0CRk1G
 FdfkOSIrluQNJQ5wSC1aNzTYuq6CI5Y=
X-Google-Smtp-Source: AGHT+IGiFPozZpqXMIotFMG19AF6UYfY3K9JM2w+Vg5Ej5mTVBniW7i+weOKu/4Jhd2ju0ndIfcYSQ==
X-Received: by 2002:a5d:420c:0:b0:317:8fd:f01a with SMTP id
 n12-20020a5d420c000000b0031708fdf01amr8214053wrq.7.1695060223343; 
 Mon, 18 Sep 2023 11:03:43 -0700 (PDT)
Received: from localhost.localdomain ([193.48.40.241])
 by smtp.gmail.com with ESMTPSA id
 z2-20020adfd0c2000000b0030ada01ca78sm2210465wrh.10.2023.09.18.11.03.42
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 18 Sep 2023 11:03:43 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH v2 08/23] DRAFT import: juliahub: Add updater and
 recursive-importer.
Date: Mon, 18 Sep 2023 20:03:15 +0200
Message-Id: <26c9a5ca41ad1697225de11b5513fcfe04d26f71.1695060058.git.zimon.toutoune@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
References: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: Nicolas Graves via Guix-patches via <guix-patches@HIDDEN>,
 Simon Tournier <zimon.toutoune@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

From: Nicolas Graves via Guix-patches via <guix-patches@HIDDEN>

Signed-off-by: Simon Tournier <zimon.toutoune@HIDDEN>
---
 guix/import/juliahub.scm | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index fb361a004435..c38c830caaa0 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -34,7 +34,9 @@ (define-module (guix import juliahub)
   #:use-module (json)
   #:use-module ((guix licenses) #:prefix license:)
 
-  #:export (juliahub->guix-package))
+  #:export (juliahub->guix-package
+            %juliahub-updater
+            juliahub-recursive-import))
 
 (define (juliahub-uri name)
   (let* ((url (string-append "https://docs.juliahub.com/" name "/"))
@@ -197,16 +199,26 @@ (define* (juliahub->guix-package package-name
                     (append dependencies-names test-dependencies-names))))
         (values #f '()))))
 
+(define (guix-package->juliahub-name package)
+  (let* ((url (juliahub-package-url package))
+         (git-name (car (last-pair (string-split url #\/))))
+         (ungitted-name (if (string-suffix? ".git" git-name)
+                            (string-drop-right git-name 4)
+                            git-name))
+         (package-name (if (string-suffix? ".jl" ungitted-name)
+                            (string-drop-right ungitted-name 4)
+                            ungitted-name)))
+    package-name))
+
 (define* (import-release package #:key (version #f))
   "Return an <upstream-source> for the latest release of PACKAGE."
   (let* ((package-name (guix-package->juliahub-name package))
          (package      (juliahub-fetch package-name))
-         (version  (or version (juliahub-version gem)))
-         (url      (rubyjuliahubs-uri gem-name version)))
+         (version  (or version (juliahub-package-version package))))
     (upstream-source
      (package (package-name package))
      (version version)
-     (urls (list url)))))
+     (urls (list (juliahub-package-url package))))))
 
 (define %juliahub-updater
   (upstream-updater
@@ -219,5 +231,5 @@ (define* (juliahub-recursive-import package-name #:optional version)
   (recursive-import package-name
                     #:repo '()
                     #:repo->guix-package juliahub->guix-package
-                    #:guix-name ruby-package-name
+                    #:guix-name julia-name->guix-name
                     #:version version))
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 18 Sep 2023 18:04:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 18 14:04:12 2023
Received: from localhost ([127.0.0.1]:54375 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qiIbT-0002I7-B5
	for submit <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:11 -0400
Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:38091)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1qiIbE-0002Ef-UR
 for 62202 <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:00 -0400
Received: by mail-wr1-x434.google.com with SMTP id
 ffacd0b85a97d-31f7c87353eso946119f8f.0
 for <62202 <at> debbugs.gnu.org>; Mon, 18 Sep 2023 11:03:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1695060223; x=1695665023; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=skJOf1DBllhMdwi8a7KPjGXvCMcceEa6MzsLzGA6xQM=;
 b=mJVEEKoAxG8tpyfS37GPP2In9AFj4K77MuRxkDjhTAkQRRR/LNlCeM9nugTNdE9vn9
 SDTBVFCwsZkZru91dSE6KTDO6Z/OXgrFj5Wtb2zHAySvDKvi1dJqL7DfNAOc1ahUtKkL
 C11PWSQqratNENbQIVE3N7XOhzdWWyd0rwojUOvHlF3IuNxX3R+miSWkmzkY5tVMUhWZ
 J2mMaQ7SWzTf1DPyxPVKi2yGb+Xd8PHYPUmS2pZpDsS6q+dKl37EtKlWhQUz6oqnB5+S
 gPtecIAGYaVs+jBZRLNge2WsP+8Xn8JvbaIlsg1G5za1AAvoo32MdoqoATbUzu7WDjvm
 slug==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1695060223; x=1695665023;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=skJOf1DBllhMdwi8a7KPjGXvCMcceEa6MzsLzGA6xQM=;
 b=GXJSRSEw8fIratO5tZiD0TYJTPgqRNdjxPO2F5BxuAiO9WIMlhnQkZlnYneTyR9Ynu
 wavdeqyC93nhARfA9m+5mVtgROktLcSegWDlImWa8z/7UrDWFIRbCiQYKFcqNSNiH+lw
 8Xavo8WsFxS9cqmtbG0n0S2/KIZmuqP0gKPmaG1poCZHXV/OKtd9XuxKMEYjpoG4r1Wt
 P1JEWSQs4c80kLd/DdBgBa8eSlkF0Njpu68SEU75AA8OpFKLt91DFRuxCJMR/6NJjgWD
 Gwa5WRaGFA+pZqCip4CW2I0NGYEIz9wn2WFtQeQleCgAZdKRJ3C4VqECpdCUL8jktehg
 Kz1A==
X-Gm-Message-State: AOJu0YyjAviTRPT3Jcljq2HuSGLAFtMflY0KhT5qwZdnCY/D7c+uzksi
 H1dfA+W8clVSUSDMky0bEI2qv1Ks08E=
X-Google-Smtp-Source: AGHT+IG38G6yAu8JWH8NqVqdmdowLZTl4+N/W5o3WEMSCbWHIPWG6wU0Id90/z4csPst1GtZzn1Bfg==
X-Received: by 2002:a5d:43c3:0:b0:31f:84c9:d75f with SMTP id
 v3-20020a5d43c3000000b0031f84c9d75fmr7786907wrr.4.1695060222784; 
 Mon, 18 Sep 2023 11:03:42 -0700 (PDT)
Received: from localhost.localdomain ([193.48.40.241])
 by smtp.gmail.com with ESMTPSA id
 z2-20020adfd0c2000000b0030ada01ca78sm2210465wrh.10.2023.09.18.11.03.42
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 18 Sep 2023 11:03:42 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH v2 07/23] DRAFT import: juliahub: Add indirect dependencies.
Date: Mon, 18 Sep 2023 20:03:14 +0200
Message-Id: <9582ebba5df585ec5c71e008e71aaefafc036753.1695060058.git.zimon.toutoune@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
References: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: Nicolas Graves via Guix-patches via <guix-patches@HIDDEN>,
 Simon Tournier <zimon.toutoune@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

From: Nicolas Graves via Guix-patches via <guix-patches@HIDDEN>

Signed-off-by: Simon Tournier <zimon.toutoune@HIDDEN>
---
 guix/import/juliahub.scm | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index 4c3ceed10904..fb361a004435 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -67,6 +67,16 @@ (define (json->juliahub-direct-dependencies vector)
                #f)))
        (vector->list vector))))
 
+(define (json->juliahub-indirect-dependencies vector)
+  (if (vector? vector)
+      (filter-map
+       (lambda (el)
+         (let ((dep (json->juliahub-dependency el)))
+           (if (not (juliahub-dependency-direct? dep))
+               dep
+               #f)))
+       (vector->list vector))))
+
 (define (ini-list->extra-dependencies lst)
   (match lst
     (('(extras) ooo ...)
@@ -103,6 +113,9 @@ (define-json-mapping <juliahub-package> make-juliahub-package juliahub-package?
   (direct-dependencies
    juliahub-package-direct-dependencies "deps"
    json->juliahub-direct-dependencies) ;list of <juliahub-dependency>
+  (indirect-dependencies
+   juliahub-package-indirect-dependencies "deps"
+   json->juliahub-indirect-dependencies) ;list of <juliahub-dependency>
   (url juliahub-package-url) ;string
   (uuid juliahub-package-uuid) ;string
   (license juliahub-package-license)) ;string
@@ -181,7 +194,7 @@ (define* (juliahub->guix-package package-name
                      (juliahub-package-direct-dependencies package)
                      test-dependencies-names
                      licenses)
-                    (append dependencies-names test-dependencies))))
+                    (append dependencies-names test-dependencies-names))))
         (values #f '()))))
 
 (define* (import-release package #:key (version #f))
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 18 Sep 2023 18:04:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 18 14:04:11 2023
Received: from localhost ([127.0.0.1]:54373 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qiIbS-0002Hz-K2
	for submit <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:11 -0400
Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:40388)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1qiIbE-0002Ee-E2
 for 62202 <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:00 -0400
Received: by mail-wr1-x42f.google.com with SMTP id
 ffacd0b85a97d-32163c3ece5so66534f8f.1
 for <62202 <at> debbugs.gnu.org>; Mon, 18 Sep 2023 11:03:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1695060222; x=1695665022; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=eGZ8My+gyfK2zXtMMVyRPNUYXEnyXSsvJiEKKIH0DX4=;
 b=TESYCP6C4wof9wT5Gaa06kLLdt+vyvg8mo6sAqEWYJUo0jyqbNDiI/yU/V6BACa48O
 Ln/mpWhLTRvRZh8iAORd2MZnvBoxEAEaphRbZQTBzqoHj16LZYOYZ5rhVeEq3bF5wgcB
 Weqk81UOFrr3DF4ChEKViKFL+XYnAevHSi1UshiB9M7UZ6lbigrN0WXn5T54In+lIYJF
 WMlZbPs+sexp4VEbMeDOhLTyUb711p4Hi2GsZOA8j0VuKXs3Kr9aVfmP7QyGwblkC9go
 UIe+OIQkrfaiudM5EsqheNJg2/LRt+HnuaRMEYSyfLdWVBSPcbFca7cPOSfljoFdXZqV
 aoPg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1695060222; x=1695665022;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=eGZ8My+gyfK2zXtMMVyRPNUYXEnyXSsvJiEKKIH0DX4=;
 b=QBZBqOc4prcff9323TisNOoSa1TY0QOWEruLEyOYw4sbKBKn/lL1YCTu0YNETb9hl7
 HCgJDEHztDRM/72+QohSYqApEt6ssCjuTWsf+ecL1I6apK7fCV/BoNI8kl62enTWKjBb
 48piHtsOUrsrUP3o4nDTt+0tkRoyV2L5Mj0lGT4XudFvznhHbBisY/iEXL/TGnKeYkoA
 c6XIEy6XInvUILDUkjREv26Oluar7KZ/luA9m87P0l/uA/2gJ/BAd+EYe5vSjjI8JPM7
 uhhhMiLF/FLQB5/Lq68ZYyq1nlGccWhKRXAVZSXswrin5KsZ7H5W/9Ti7ibJcCxifl8Y
 6dRg==
X-Gm-Message-State: AOJu0YzMj/85Q7r/5TlyVbiFPkbZwb8kb5uL4VFw3+7u3+DfjCV2TXSV
 WPnkR7HzMVMT3ZNxus2UF4YCp1guHaM=
X-Google-Smtp-Source: AGHT+IGEfBU8dRJ6U+GfCxlLTlTGfBsQtmVY8nkdbeT7jEB/UVGmuIdr/cuTXI11FSsloxZ5qSXUCQ==
X-Received: by 2002:a5d:484a:0:b0:316:ef5f:7d8f with SMTP id
 n10-20020a5d484a000000b00316ef5f7d8fmr7767505wrs.3.1695060222245; 
 Mon, 18 Sep 2023 11:03:42 -0700 (PDT)
Received: from localhost.localdomain ([193.48.40.241])
 by smtp.gmail.com with ESMTPSA id
 z2-20020adfd0c2000000b0030ada01ca78sm2210465wrh.10.2023.09.18.11.03.41
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 18 Sep 2023 11:03:42 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH v2 06/23] DRAFT import: juliahub: Correct source parsing.
Date: Mon, 18 Sep 2023 20:03:13 +0200
Message-Id: <14e997a8b389bb18d62e00178a68fc5434869da2.1695060058.git.zimon.toutoune@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
References: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: Nicolas Graves via Guix-patches via <guix-patches@HIDDEN>,
 Simon Tournier <zimon.toutoune@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

From: Nicolas Graves via Guix-patches via <guix-patches@HIDDEN>

Signed-off-by: Simon Tournier <zimon.toutoune@HIDDEN>
---
 guix/import/juliahub.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index 4544dee98016..4c3ceed10904 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -160,7 +160,11 @@ (define* (juliahub->guix-package package-name
                      (juliahub-fetch package-name))))
     (if package
         (let-values (((source directory)
-                     (git->origin+dir url `(tag-or-commit . ,package-version))))
+                      (git->origin+dir
+                       (juliahub-package-url package)
+                       `(tag-or-commit
+                         . ,(string-append
+                             "v" (juliahub-package-version package))))))
           (let* ((dependencies-names
                   (map juliahub-dependency-name
                        (juliahub-package-direct-dependencies package)))
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 18 Sep 2023 18:04:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 18 14:04:10 2023
Received: from localhost ([127.0.0.1]:54371 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qiIbS-0002Hp-0X
	for submit <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:10 -0400
Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:39214)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1qiIbD-0002Ed-TF
 for 62202 <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:00 -0400
Received: by mail-wr1-x436.google.com with SMTP id
 ffacd0b85a97d-3175e1bb38cso663495f8f.1
 for <62202 <at> debbugs.gnu.org>; Mon, 18 Sep 2023 11:03:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1695060222; x=1695665022; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=pUwfyNhRnqWCM1lX3AZ3mporZaHjg2ab0aRjRiR2Z/4=;
 b=Kg9Iv4ekBQE7k3eqVRY785yLPX7w5Hwfp6HuD76oePKbppBCrdycbv4fWfxBcqEoJb
 mg3MbJwUMulf68Wi2yHHYKeJkxsCbmd4AzqHPEHR9e39db/ovtHt9bOUCjmi0sPTfAuk
 kju9cpq7p1XKnA38ij9x/eqfFQGhA9jkpJ1bX4J/2XVE10PJ8CApB2MStLEd9BOs8dMW
 zZCxCn4fodgf7O20IpOBwWxbcrYWbZFNoXize3gZsKWqYfx3X3o2owEx947GJh0uXtXg
 N+3pcZW6Rt1cynn4eG2AbgMRyfmVJCPujOLvYjjv8LsQyd5Qoh/CR74jY/rDuvb/CWP3
 UPyw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1695060222; x=1695665022;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=pUwfyNhRnqWCM1lX3AZ3mporZaHjg2ab0aRjRiR2Z/4=;
 b=hVr9RNdU3BltaVeAP8yNWHTYjyhevKkuvFpocnRBZEpF/iF6uB0/6+lZ2lohO3LYnX
 jlf9qLGIpGi71esdiO8lWoH8TcJIBF+6Pct26bGlA27imkDJLZ2WNaK0wSuP7R5Usiti
 mWSuqgOsI1cHw90YGrDX/iU6jVWF86RTUxifzZ6+vGP2X+wpwbcRtmHh7DCAslqOQ6V8
 0v1mPw80wAUi7dYsuSLkj1PEZ8QpS6xrZAf1RtgfusltCk4yS+9EAk52hAFuYb9ivWB7
 04qmZ1lbrJmhFxPW98SRKkjPs+U80sjSVYOEW1A4EkaAc2gO52hDt5W4cU3FRfcQg087
 zqLw==
X-Gm-Message-State: AOJu0Yzx6MLMGeMD6oIEbOoiL7UQ33+fZUmQsysUKyR2rnCt3AvGvFnQ
 HtF9ItVUkdMlE+dK3bPQCxflBrwV5Rc=
X-Google-Smtp-Source: AGHT+IHA9dJxZsHSpnwzDPRlIQKYNbbfGVWrNDVIvKxhl6OZNa4uC/tz0qT2H1n/Gnx6HbKueQcLdQ==
X-Received: by 2002:a05:6000:1f9c:b0:320:b1e:7e6c with SMTP id
 bw28-20020a0560001f9c00b003200b1e7e6cmr4411813wrb.3.1695060221715; 
 Mon, 18 Sep 2023 11:03:41 -0700 (PDT)
Received: from localhost.localdomain ([193.48.40.241])
 by smtp.gmail.com with ESMTPSA id
 z2-20020adfd0c2000000b0030ada01ca78sm2210465wrh.10.2023.09.18.11.03.41
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 18 Sep 2023 11:03:41 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH v2 05/23] DRAFT import: juliahub: Add support for
 native-inputs.
Date: Mon, 18 Sep 2023 20:03:12 +0200
Message-Id: <57feddb288135a1d5953340fcc5bfe9e3159e372.1695060058.git.zimon.toutoune@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
References: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: Nicolas Graves via Guix-patches via <guix-patches@HIDDEN>,
 Simon Tournier <zimon.toutoune@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

From: Nicolas Graves via Guix-patches via <guix-patches@HIDDEN>

Signed-off-by: Simon Tournier <zimon.toutoune@HIDDEN>
---
 guix/import/juliahub.scm | 105 ++++++++++++++++++++++++---------------
 1 file changed, 64 insertions(+), 41 deletions(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index efe6abbb2481..4544dee98016 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -20,13 +20,14 @@ (define-module (guix import juliahub)
   #:use-module (ice-9 textual-ports)
   #:use-module (ice-9 regex)
   #:use-module (ice-9 match)
+  #:use-module (ice-9 streams)
   #:use-module (ice-9 string-fun)
-  #:use-module (srfi srfi-9)
   #:use-module (srfi srfi-1)
+  #:use-module (srfi srfi-9)
+  #:use-module (srfi srfi-11)
   #:use-module (guix http-client)
   #:use-module (guix import utils)
   #:use-module (guix import json)
-  #:use-module (guix base16)
   #:use-module (guix base32)
   #:use-module (guix packages)
   #:use-module (guix upstream)
@@ -66,19 +67,42 @@ (define (json->juliahub-direct-dependencies vector)
                #f)))
        (vector->list vector))))
 
+(define (ini-list->extra-dependencies lst)
+  (match lst
+    (('(extras) ooo ...)
+     (extra-list->extra-dependencies ooo))
+    (((tag) ooo ...)
+     (ini-list->extra-dependencies ooo))
+    ((attribute '= value ooo ...)
+     (ini-list->extra-dependencies ooo))
+    ('()
+     '())))
+
+(define (extra-list->extra-dependencies lst)
+  (match lst
+    ((attribute '= value ooo ...)
+     `(,(symbol->string attribute) ,@(extra-list->extra-dependencies ooo)))
+    (((tag) ooo ...)
+     '())
+    ('()
+     '())))
+
+(define (parse-extra-dependencies directory)
+  (let* ((port (open-input-file (string-append directory "/Project.toml")))
+         (ini-list (stream->list (port->stream port read))))
+    (close-port port)
+    (ini-list->extra-dependencies ini-list)))
+
 ;; Julia package.
 (define-json-mapping <juliahub-package> make-juliahub-package juliahub-package?
   json->juliahub-package
   (homepage juliahub-package-homepage) ;string
   (readme juliahub-package-readme) ;string
-  ;; (slug juliahub-package-slug) ;string
   (version juliahub-package-version) ;string
   (description juliahub-package-description) ;string
-  (dependencies
-   juliahub-package-dependencies "deps"
+  (direct-dependencies
+   juliahub-package-direct-dependencies "deps"
    json->juliahub-direct-dependencies) ;list of <juliahub-dependency>
-   ;; (lambda (vector)
-     ;; (map json->juliahub-dependency (vector->list vector))))
   (url juliahub-package-url) ;string
   (uuid juliahub-package-uuid) ;string
   (license juliahub-package-license)) ;string
@@ -90,7 +114,6 @@ (define-json-mapping <juliahub-dependency>
   (name juliahub-dependency-name) ;string
   (uuid juliahub-dependency-uuid) ;string
   (versions juliahub-dependency-versions "versions" vector->list)) ;list of strings
-  ;; (slug juliahub-dependency-slug) ;string
 
 (define (julia-name->guix-name name)
   (string-append "julia-" (snake-case name)))
@@ -100,27 +123,25 @@ (define* (juliahub-fetch name #:key (version #f))
   (and=> (json-fetch (string-append (juliahub-url name) "pkg.json"))
          json->juliahub-package))
 
-(define (make-julia-sexp name version uri hash home-page synopsis description
-                         dependencies licenses)
+(define (make-julia-sexp name source home-page synopsis description
+                         direct-dependencies test-dependencies-names licenses)
   "Return the `package' s-expression for a Julia package with the given NAME,
-VERSION, URI, HASH, HOME-PAGE, DESCRIPTION, DEPENDENCIES, and LICENSES."
+VERSION, URI, HASH, HOME-PAGE, DESCRIPTION, DEPENDENCIES,
+TEST-DEPENDENCIES-NAMES and LICENSES."
   `(package
      (name ,(julia-name->guix-name name))
      (version ,version)
-     (source (origin
-               (method url-fetch)
-               (uri ,uri)
-               (sha256
-                (base32
-                 "0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5"
-                 ;; ,(bytevector->nix-base32-string hash)
-                 ))))
+     (source ,source)
      (build-system julia-build-system)
-     ,@(if (null? dependencies)
+     ,@(if (null? direct-dependencies)
            '()
-           `((inputs
+           `((propagated-inputs
               (list ,@(map (compose julia-name->guix-name juliahub-dependency-name)
-                           dependencies)))))
+                           direct-dependencies)))))
+     ,@(if (null? test-dependencies-names)
+           '()
+           `((native-inputs
+              (list ,@(map julia-name->guix-name test-dependencies-names)))))
      (synopsis ,synopsis)
      (description ,description)
      (home-page ,home-page)
@@ -135,26 +156,28 @@ (define* (juliahub->guix-package package-name
 `package' s-expression corresponding to that package, or #f on failure.
 Optionally include a VERSION string to fetch a specific version juliahub."
   (let ((package (if version
-                      (juliahub-fetch package-name version)
-                      (juliahub-fetch package-name))))
+                     (juliahub-fetch package-name version)
+                     (juliahub-fetch package-name))))
     (if package
-        (let* ((dependencies-names
-                (map juliahub-dependency-name
-                     (juliahub-package-dependencies package)))
-               (licenses
-                (map spdx-string->license
-                     (list (juliahub-package-license package)))))
-          (values (make-julia-sexp
-                   package-name
-                   (juliahub-package-version package)
-                   (juliahub-package-url package)
-                   "0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5"
-                   (juliahub-package-homepage package)
-                   (juliahub-package-description package)
-                   (beautify-description (juliahub-package-readme package))
-                   (juliahub-package-dependencies package)
-                   licenses)
-                  dependencies-names))
+        (let-values (((source directory)
+                     (git->origin+dir url `(tag-or-commit . ,package-version))))
+          (let* ((dependencies-names
+                  (map juliahub-dependency-name
+                       (juliahub-package-direct-dependencies package)))
+                 (licenses
+                  (map spdx-string->license
+                       (list (juliahub-package-license package))))
+                 (test-dependencies-names (parse-extra-dependencies directory)))
+            (values (make-julia-sexp
+                     package-name
+                     source
+                     (juliahub-package-homepage package)
+                     (juliahub-package-description package)
+                     (beautify-description (juliahub-package-readme package))
+                     (juliahub-package-direct-dependencies package)
+                     test-dependencies-names
+                     licenses)
+                    (append dependencies-names test-dependencies))))
         (values #f '()))))
 
 (define* (import-release package #:key (version #f))
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 18 Sep 2023 18:04:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 18 14:04:10 2023
Received: from localhost ([127.0.0.1]:54369 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qiIbR-0002Hg-Mk
	for submit <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:09 -0400
Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:40125)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1qiIbC-0002EZ-JG
 for 62202 <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:03:59 -0400
Received: by mail-wm1-x333.google.com with SMTP id
 5b1f17b1804b1-40471c054f9so14350245e9.0
 for <62202 <at> debbugs.gnu.org>; Mon, 18 Sep 2023 11:03:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1695060220; x=1695665020; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=ueh5ikMbN0g6E70JfTC3OyqsVG5FrnI5fdWXn/Jwc+8=;
 b=CZaCVTSaocLHlgN7snCvziyRVk/1OQKNwWLsusfHeE10lw22ts0e0etihCexsAPyrH
 3/f9FdarWRwmPQgIxkwT3VB7gU83XNcwbQ/biBAqoNF7fgElMC1b5UpFsOENZ6yKpe8/
 ZU3odyq88kjvWY1nlIJQ5cvfcG2O4J3/HTriWuPXhoet5ghkyAdi9ob4SyPG6mM5G3bX
 dn55FLFHAXE7MA5NKy2E9xGtE/4WleukmDt/7FNGZn4JdwJHWbmNb8LzgkYUduQDxLBH
 2RM8vT7Ki3cAh23iGjz4ysCzao4Vzy/1jtBrtEJ04YrRyLuZ0Qhek4f0zqboNAHJ/pmO
 MHsg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1695060220; x=1695665020;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=ueh5ikMbN0g6E70JfTC3OyqsVG5FrnI5fdWXn/Jwc+8=;
 b=P0HOmuMe2cGubAO6YdkqnegKd2l8rIZQxt8PRrY0Z9CigG6iKyVYm3YBvGeTH1YGeg
 BA1VRSJH3KjeL8tDhCJoJMfkiWIllaeBzDpGZNP8J84yYCt6C1u8KBZ2fAwHDHcS4mXU
 bLrG7s/CQBHC3iWkqAx3ve2pnd9BOUykq94KbINwLTdsZfJq0i6j5jqKLW9id1rND5+s
 GE4XdBzR0WoYTuTJvD9WGOO9/zrPxAeTlUzT5Ax8nqrydEpZeDVpO9EYKvoyWPZKw0IT
 FU88LQgfTIZQhlPl+OOJn3q0hxoH6nvub14LVucvrtlmEF7ByF78kmrdfw0EGdu/4LXO
 /Bsg==
X-Gm-Message-State: AOJu0Yxf5sIgK3g0pd4g/AYyMX0Tk5xT7/hh3cTGT1LeELDgaIweRJB+
 Uvan7gyBMeeOJa+362ApcjM8YhkK2os=
X-Google-Smtp-Source: AGHT+IFm9wA6MmOUqTtG/G0JKVS977NG4S/TtFi6QFz2AHOsCr9Rm40m5kn9e0+Pmt1F/qmOvB5r1g==
X-Received: by 2002:adf:ecc7:0:b0:31f:899b:a47 with SMTP id
 s7-20020adfecc7000000b0031f899b0a47mr7943771wro.4.1695060220470; 
 Mon, 18 Sep 2023 11:03:40 -0700 (PDT)
Received: from localhost.localdomain ([193.48.40.241])
 by smtp.gmail.com with ESMTPSA id
 z2-20020adfd0c2000000b0030ada01ca78sm2210465wrh.10.2023.09.18.11.03.39
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 18 Sep 2023 11:03:40 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH v2 03/23] DRAFT TODO: guix: import: utils: Fix corner cases
 beautify-descritption.
Date: Mon, 18 Sep 2023 20:03:10 +0200
Message-Id: <58ed3520a130805887d797300094637ba16ef0a7.1695060058.git.zimon.toutoune@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
References: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: Simon Tournier <zimon.toutoune@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* guix/import/utils.scm (beautify-descritption): Fix.
---
 guix/import/utils.scm | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index 189facfcf823..01d9861f279c 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -339,6 +339,16 @@ (define* (beautify-description description #:optional (length 80))
                    ;; Escape single @ to prevent it from being understood as
                    ;; invalid Texinfo syntax.
                    (cut regexp-substitute/global #f "@" <> 'pre "@@" 'post)
+
+                   ;; Remove cut above
+                   ;; (lambda (word)
+                   ;;   (if
+                   ;;    (member word '("@itemize" "@item" "@end" "@quotation"
+                   ;;                   "@enumerate" "@code" "@code{"))
+                   ;;    word
+                   ;;    ((cut regexp-substitute/global
+                   ;;          #f "@" <> 'pre "@@" 'post) word)))))))
+
                    ;; Wrap camelCase or PascalCase words in @code{...}.
                    (lambda (word)
                      (let ((pattern (make-regexp "([A-Z][a-z]+[A-Z]|[a-z]+[A-Z])")))
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 18 Sep 2023 18:04:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 18 14:04:09 2023
Received: from localhost ([127.0.0.1]:54367 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qiIbR-0002He-DI
	for submit <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:09 -0400
Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:38287)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1qiIbC-0002EY-BZ
 for 62202 <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:03:58 -0400
Received: by mail-wr1-x433.google.com with SMTP id
 ffacd0b85a97d-3159b524c56so939530f8f.1
 for <62202 <at> debbugs.gnu.org>; Mon, 18 Sep 2023 11:03:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1695060220; x=1695665020; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=wYlltEDgnbWojzXh8dw9khKqud4ng1Mj5GHvY71RTVI=;
 b=RC3nzPwahtrWNhALKMFyqOCtw53cTbRh4rHCUx8rlzgOvLFDDk5oLdYfcxHXQgy4CR
 RoxGgz5uz536sffysdSud7AsvO+QYt5PPdiYw7jEhL9L9V22v8rj4NDw2CoPirxaFqBj
 bjOCGdci1b+ZGYHyvpUISdyOfl3bD8PjKj7mVGVQXr9NpP1wElO+04LfTLk5qxGmHBaq
 k52sts8SoFVkp02IyXYdk8WPmsNevYbA1elRamBL1hP1N2r15JqIZ//P8DJa8KK/V41n
 kzwOCHAaLYXS3q8Xz2sNaxhkYBh2G2DcXfucOq5WG8T4nPQ3vgiWc4K0RDSTlSTduzi2
 viNA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1695060220; x=1695665020;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=wYlltEDgnbWojzXh8dw9khKqud4ng1Mj5GHvY71RTVI=;
 b=Y80ANGT5sPbN9z5wTnqlKpbJpypDMZ2PUxrGuCenHX3Iwfo38ASrpXCJ1hA4HG+qih
 TsmNa2p07CIEBNndr9Q+Tj2CkHqL6P/Mafj4KucvP0EtwyayQQHFAe5Dgxa/kpKvplf0
 ihhd904N/0Qoj8GdtHkBPun05x7ySdCnz+uaTIJIb1VuLXwe8nVrL4IaSRBx2xhO8amt
 9/zjqRcFKaUREcEceBKQDKmxL3yuBHGoW1thyBeaoX1X9WS5bzoOkR/yAQldcinWlX6L
 2sTxYFzMUmDF41uVkWAeU+J/NmSx9Ke5fIvcS3RerJr9n+yg8umapYF7OSTQeKo2j15A
 PKfA==
X-Gm-Message-State: AOJu0YwyeuHypK8cQ+AxjkZ2hSN9ZDptQAjSwDghRTrF7Ylmb2WsTtFt
 krDx0IYIvs2gwZ3vQ38Uqu5bvBWgIZ0=
X-Google-Smtp-Source: AGHT+IHZqOmHEGMR2x3+mqFJk3XcUy1A5NIb1Saygl9gL2siFDQQa9t58J7gkylRjw2mRt80tMcn5A==
X-Received: by 2002:adf:e184:0:b0:321:547b:f060 with SMTP id
 az4-20020adfe184000000b00321547bf060mr2589325wrb.1.1695060219823; 
 Mon, 18 Sep 2023 11:03:39 -0700 (PDT)
Received: from localhost.localdomain ([193.48.40.241])
 by smtp.gmail.com with ESMTPSA id
 z2-20020adfd0c2000000b0030ada01ca78sm2210465wrh.10.2023.09.18.11.03.39
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 18 Sep 2023 11:03:39 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH v2 02/23] DRAFT TODO guix: import: utils: Add git->origin+dir.
Date: Mon, 18 Sep 2023 20:03:09 +0200
Message-Id: <119a9c3cf93b5b5df0daf917bdddde9863051d09.1695060058.git.zimon.toutoune@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
References: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: Simon Tournier <zimon.toutoune@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

---
 guix/import/utils.scm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index 0cf52cdbde73..189facfcf823 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -63,6 +63,8 @@ (define-module (guix import utils)
 
             url-fetch
             guix-hash-url
+            git->origin+dir
+            ;; git->origin
 
             package-names->package-inputs
             maybe-inputs
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 18 Sep 2023 18:04:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 18 14:04:02 2023
Received: from localhost ([127.0.0.1]:54353 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qiIbH-0002FL-H5
	for submit <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:04:02 -0400
Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:37999)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1qiIbB-0002EX-Lf
 for 62202 <at> debbugs.gnu.org; Mon, 18 Sep 2023 14:03:58 -0400
Received: by mail-wm1-x330.google.com with SMTP id
 5b1f17b1804b1-40472fef044so9656235e9.0
 for <62202 <at> debbugs.gnu.org>; Mon, 18 Sep 2023 11:03:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1695060219; x=1695665019; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:message-id:date:subject:cc
 :to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=xQSsVdSHcM3gwZqis4JCNsrNGnIhomgqrJxYnYdIMwE=;
 b=IpqtXwjB0v2QIpnxx37e5315sU7ktUbEFMW1BRrpDNpIP5tlichxzKalXnriUAA13Z
 JgTBEnibi+YoIyDnfoCBNMcUGAGggj27WIXfxN7e/3fXWGKOjReztf+wgnQG/S1Fz/PK
 cycxg/oVu6DwU73FTkfyMB+1MUbFgTJMNMFKpTMDaBm07jvF41jENJ58WW06bdTZhuU5
 0gX34HwwF1fjAncNwDrtlF0H4do98vhirNwl+3OyyDZ9SRvdht4s69mLPyJSb515tgCm
 P/3VG08GE1uDdJZB/MwnhGBnFOYrKj++euxJRDCQg9uhJd7OTLt/SvgI3pLc/kStNP2p
 7CUQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1695060219; x=1695665019;
 h=content-transfer-encoding:mime-version:message-id:date:subject:cc
 :to:from:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=xQSsVdSHcM3gwZqis4JCNsrNGnIhomgqrJxYnYdIMwE=;
 b=RQYbdTtDoHXR3e4KSrYTAdkHcSgZV2H+gAYRfm90xso1Qjqztax9ybP0/aBZDybfDm
 MIwZovswliashh2mGGRyeAWmgiVTTEeugdCWV5tts546375Hf271THW+OjxQxjBQeUdu
 x8Rh7WVNw9svF3k7I3HuO8TqGwTZH0CqypQoUk/OheLZvAQLcg9/Y9cUO15bkF4VDS+P
 QJU6EadaMbn4SjL9Zauj7kfZZfeix4lsw2HoVyZ1FdstSejY4eiG5MevQ+L8eQXFbmjY
 f/QTLDFG/NEB1dBNcHQiSlrAvR0r0zr+QAEtxxWhOTLHp5W3nO6yjZArDcaBRUGijoax
 OZeA==
X-Gm-Message-State: AOJu0YwwPRDHzdbNxrrcGp9fchC6YQpx/Yvo7JO2RqVUVR4hSuBEEagQ
 Gxb/6Yf6k13TH0wsyZWhDhORb9jjdBI=
X-Google-Smtp-Source: AGHT+IEauQnItXNdOc2/qfBvH/IzvwxEwW0I8XNocueB1YuJeDtDzN+AUBT+opNTebdneMMpuue89g==
X-Received: by 2002:adf:ec4f:0:b0:31f:a717:f1cc with SMTP id
 w15-20020adfec4f000000b0031fa717f1ccmr7643716wrn.5.1695060219326; 
 Mon, 18 Sep 2023 11:03:39 -0700 (PDT)
Received: from localhost.localdomain ([193.48.40.241])
 by smtp.gmail.com with ESMTPSA id
 z2-20020adfd0c2000000b0030ada01ca78sm2210465wrh.10.2023.09.18.11.03.38
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 18 Sep 2023 11:03:38 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH v2 01/23] DRAFT guix: import: go: Add optional
 transform-version to vcs->origin.
Date: Mon, 18 Sep 2023 20:03:08 +0200
Message-Id: <c50c63bce62fc13aca5b51aaddf4158d2108c8ee.1695060058.git.zimon.toutoune@HIDDEN>
X-Mailer: git-send-email 2.39.2
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: Simon Tournier <zimon.toutoune@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

---
 guix/import/go.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/guix/import/go.scm b/guix/import/go.scm
index 0357e6a1ebe7..d1c6f68d9c9a 100644
--- a/guix/import/go.scm
+++ b/guix/import/go.scm
@@ -513,7 +513,8 @@ (define* (git-checkout-hash url reference algorithm)
                                           `(tag-or-commit . ,reference)))))
     (file-hash* checkout #:algorithm algorithm #:recursive? #true)))
 
-(define (vcs->origin vcs-type vcs-repo-url version)
+(define* (vcs->origin vcs-type vcs-repo-url version
+                      #:optional transform-version)
   "Generate the `origin' block of a package depending on what type of source
 control system is being used."
   (case vcs-type

base-commit: 3d9ebc7b2ed24312fd6a0916c203f7b86d57753d
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 18 Sep 2023 09:31:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 18 05:31:49 2023
Received: from localhost ([127.0.0.1]:52102 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qiAbd-00035e-Ct
	for submit <at> debbugs.gnu.org; Mon, 18 Sep 2023 05:31:49 -0400
Received: from 5.mo583.mail-out.ovh.net ([87.98.173.103]:53997)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ngraves@HIDDEN>) id 1qiAba-00035U-1h
 for 62202 <at> debbugs.gnu.org; Mon, 18 Sep 2023 05:31:47 -0400
Received: from director11.ghost.mail-out.ovh.net (unknown [10.108.20.16])
 by mo583.mail-out.ovh.net (Postfix) with ESMTP id ECAB426335
 for <62202 <at> debbugs.gnu.org>; Mon, 18 Sep 2023 09:31:35 +0000 (UTC)
Received: from ghost-submission-6684bf9d7b-vkx5x (unknown [10.110.103.34])
 by director11.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 8BC871FEB1;
 Mon, 18 Sep 2023 09:31:35 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.99])
 by ghost-submission-6684bf9d7b-vkx5x with ESMTPSA
 id Wi75IPcYCGXiXAAAo+zZag
 (envelope-from <ngraves@HIDDEN>); Mon, 18 Sep 2023 09:31:35 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-99G003d3e88474-c12e-4174-9229-d060aaa60302,
 D0885593E3C865F1F254A4566660226856E55021) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 81.67.140.142
From: Nicolas Graves <ngraves@HIDDEN>
To: Simon Tournier <zimon.toutoune@HIDDEN>
Subject: Re: [bug#62202] [PATCH 0/21] Juliahub import script.
In-Reply-To: <CAJ3okZ3Nok7UtC-i=nBq+whc_HxWz1UFLBr+L+ydftgPXxbhwA@HIDDEN>
References: <871qlq89kz.fsf@HIDDEN> <87ile69geh.fsf@HIDDEN>
 <87cyzxr1zd.fsf_-_@HIDDEN> <87fs4jf0w6.fsf@HIDDEN>
 <87bke393cn.fsf@HIDDEN> <87pm2j4l5d.fsf@HIDDEN>
 <CAJ3okZ3Nok7UtC-i=nBq+whc_HxWz1UFLBr+L+ydftgPXxbhwA@HIDDEN>
Date: Mon, 18 Sep 2023 11:31:34 +0200
Message-ID: <87wmwnj095.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Ovh-Tracer-Id: 1798906580155687645
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: -100
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedviedrudejkedgudeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefujghffffkgggtsehttdertddttddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepveekleeujedthefgffekleekhffhffetgfdvheekleeuhfehueeljedtjefhvdfgnecukfhppeduvdejrddtrddtrddupdekuddrieejrddugedtrddugedvpdefjedrheelrddugedvrdelleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqpdhnsggprhgtphhtthhopedupdhrtghpthhtohepiedvvddtvdesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheekfedpmhhouggvpehsmhhtphhouhht
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: Giovanni Biscuolo <g@HIDDEN>,
 Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 62202 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 2023-09-15 16:01, Simon Tournier wrote:

> Hi Nicolas,
>
> On Fri, 15 Sept 2023 at 15:32, Nicolas Graves <ngraves@HIDDEN> wrote:
>
>> Sorry for the lack of work to get this merged. I must still have this
>> branch locally, I'll try to output a V2.
>
> Oh, thank you.  I am really sorry for the burden.
>
>> I'll try to work on that this weekend, thanks for asking.
>
> Previously, I have asked too and you have probably missed it. :-)  And
> I was in the mood to go via some boring manual work this week.  I am
> very happy if it can be avoided and you are able to find some v2.
>
> Have a nice week-end.

Couldn't find time this wkend, but it's on my backlog, I'll try to do
that soon. 
>
> Cheers,
> simon

-- 
Best regards,
Nicolas Graves




Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 15 Sep 2023 14:02:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 15 10:02:13 2023
Received: from localhost ([127.0.0.1]:44387 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qh9Oe-0001Gc-OP
	for submit <at> debbugs.gnu.org; Fri, 15 Sep 2023 10:02:13 -0400
Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]:39120)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1qh9OZ-0001GI-Tf
 for 62202 <at> debbugs.gnu.org; Fri, 15 Sep 2023 10:02:10 -0400
Received: by mail-lj1-x22f.google.com with SMTP id
 38308e7fff4ca-2be4bc1ae53so7202801fa.0
 for <62202 <at> debbugs.gnu.org>; Fri, 15 Sep 2023 07:02:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1694786515; x=1695391315; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=I2EXNbFt0jYrpq+GpXRQRTaFlFv0JMr51FOZu3HDzLY=;
 b=DhNBpbLTwNKuhegNfiJ1dvjR4hcawqSh58Z12WwjClvg7hCuKTljZaS6z9A+jh+S7R
 2yen1toIPF7el3KhgT1RvyIRln5Dabz7Ktubw3YegNad389GgiaY5HJNpk1QehHbc2RB
 9/HiyXLpd4lPXcU4nJJg1wJKIQUbHgtneUy/aQFOGsqZd9sWtn8relD2wBApGRndpIyj
 y5Br+1kvafu/EWlaxxFY2rYudFgBbuqZnCK7siS6ZUpTz+qOpLc+Kci5+eUx1x1jPxW4
 Vt4B/nQPeQFMvKe4fQh/zODu+qfqOqzkV8XBfN67VefGuhI763Axr313MN7UK/ERtqm0
 aQKA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1694786515; x=1695391315;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=I2EXNbFt0jYrpq+GpXRQRTaFlFv0JMr51FOZu3HDzLY=;
 b=nWMpwYGu8Xr0p/sCOMAJWeVEIpH3RZ0HQjyLQSnpseFer0JM9OrpwHWPYPw7df4qXR
 azkj9JAwDm+A0QlCNJtinQbGIRUp8Bf/9skyxJaHwZLgzp6VXMMsQml6Be1UDTR9LnTZ
 0WsHFDWplE2mDTiSchNA6xbOMot07vbnSKfwrSud69fMPAbcWg+I9al6+6T6Q38P0VB9
 HNAsMEdrZqv9wPGTdi9N7wawreH1mSHLFNsyApOH8qoPt5ic/fTGArug6k72EoKYfHSg
 a1JeZ4R+QM9pC9l2/nycd1ais8tWHQBPpbtlKopNIMUCm8x9sMJJQGEffUTH/OrqyL7+
 i4ww==
X-Gm-Message-State: AOJu0Yw792bWNAslUguV8PdWVnPH84khk84PCW56dpsm4Czip7kAIWyP
 JrudHVs/lGbg+4LovX/pzQ+AlStCZnCsNFNWScY=
X-Google-Smtp-Source: AGHT+IEZ699+5iIUsgX39r7BpqidznACHU/BBPdthLw+v01Y3XoFPWYpPrqW+adHzuSeT3X3Ub5k4S0PnWOUFM46Szs=
X-Received: by 2002:a2e:818b:0:b0:2bb:7710:1cea with SMTP id
 e11-20020a2e818b000000b002bb77101ceamr1241750ljg.0.1694786515044; Fri, 15 Sep
 2023 07:01:55 -0700 (PDT)
MIME-Version: 1.0
References: <871qlq89kz.fsf@HIDDEN> <87ile69geh.fsf@HIDDEN>
 <87cyzxr1zd.fsf_-_@HIDDEN> <87fs4jf0w6.fsf@HIDDEN>
 <87bke393cn.fsf@HIDDEN> <87pm2j4l5d.fsf@HIDDEN>
In-Reply-To: <87pm2j4l5d.fsf@HIDDEN>
From: Simon Tournier <zimon.toutoune@HIDDEN>
Date: Fri, 15 Sep 2023 16:01:43 +0200
Message-ID: <CAJ3okZ3Nok7UtC-i=nBq+whc_HxWz1UFLBr+L+ydftgPXxbhwA@HIDDEN>
Subject: Re: [bug#62202] [PATCH 0/21] Juliahub import script.
To: Nicolas Graves <ngraves@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: Giovanni Biscuolo <g@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>, 62202 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Nicolas,

On Fri, 15 Sept 2023 at 15:32, Nicolas Graves <ngraves@HIDDEN> wrote:

> Sorry for the lack of work to get this merged. I must still have this
> branch locally, I'll try to output a V2.

Oh, thank you.  I am really sorry for the burden.

> I'll try to work on that this weekend, thanks for asking.

Previously, I have asked too and you have probably missed it. :-)  And
I was in the mood to go via some boring manual work this week.  I am
very happy if it can be avoided and you are able to find some v2.

Have a nice week-end.

Cheers,
simon




Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 15 Sep 2023 13:32:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 15 09:32:45 2023
Received: from localhost ([127.0.0.1]:42436 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qh8w8-0008R2-Sz
	for submit <at> debbugs.gnu.org; Fri, 15 Sep 2023 09:32:45 -0400
Received: from 4.mo561.mail-out.ovh.net ([178.33.46.10]:60047)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ngraves@HIDDEN>) id 1qh8w4-0008Qq-6a
 for 62202 <at> debbugs.gnu.org; Fri, 15 Sep 2023 09:32:42 -0400
Received: from director7.ghost.mail-out.ovh.net (unknown [10.108.20.39])
 by mo561.mail-out.ovh.net (Postfix) with ESMTP id 25F4E26DBB
 for <62202 <at> debbugs.gnu.org>; Fri, 15 Sep 2023 13:32:32 +0000 (UTC)
Received: from ghost-submission-6684bf9d7b-kw6kq (unknown [10.110.208.233])
 by director7.ghost.mail-out.ovh.net (Postfix) with ESMTPS id A39201FD43;
 Fri, 15 Sep 2023 13:32:31 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.98])
 by ghost-submission-6684bf9d7b-kw6kq with ESMTPSA
 id 1tniJO9cBGXj+wAAUSjgWA
 (envelope-from <ngraves@HIDDEN>); Fri, 15 Sep 2023 13:32:31 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-98R0021d1be2fd-9e5a-4cbe-8c10-410fcc776b46,
 AE9E4C9A9621124ED0562FE76BD0B6B30DDACD98) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 90.110.2.223
From: Nicolas Graves <ngraves@HIDDEN>
To: Giovanni Biscuolo <g@HIDDEN>
Subject: Re: [bug#62202] [PATCH 0/21] Juliahub import script.
In-Reply-To: <87bke393cn.fsf@HIDDEN>
References: <871qlq89kz.fsf@HIDDEN> <87ile69geh.fsf@HIDDEN>
 <87cyzxr1zd.fsf_-_@HIDDEN> <87fs4jf0w6.fsf@HIDDEN>
 <87bke393cn.fsf@HIDDEN>
Date: Fri, 15 Sep 2023 15:32:30 +0200
Message-ID: <87pm2j4l5d.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Ovh-Tracer-Id: 6696571173158904541
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: -100
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedviedrudejvddgieefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefujghffffkgggtgfesthhqredttddtjeenucfhrhhomheppfhitgholhgrshcuifhrrghvvghsuceonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqeenucggtffrrghtthgvrhhnpeffudetteelhfefgedvffeiudelheevjeelieeutedugfdtteekudevffejkeeuteenucffohhmrghinhephihhvghtihhlrdhorhhgnecukfhppeduvdejrddtrddtrddupdeltddruddutddrvddrvddvfedpfeejrdehledrudegvddrleeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqedpnhgspghrtghpthhtohepuddprhgtphhtthhopeeivddvtddvseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehiedupdhmohguvgepshhmthhpohhuth
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>,
 Simon Tournier <zimon.toutoune@HIDDEN>, 62202 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 2023-09-15 11:45, Giovanni Biscuolo wrote:

> Hello Nicolas,
>
> Simon Tournier <zimon.toutoune@HIDDEN> writes:
>
> [...]
>
>> Yeah, it looks nice.  As I said [1], =E2=80=9CI am not able to apply the
>> series.=E2=80=9D  And since the series is 21 patches, I have been lazy.
>
> I just want to add that on 2023-09-13 Simon explained failed attempts to
> apply this patch series in a message to guix-devel [1] (starting from
> the string "I am not speaking on the vacuum of an hypothetical
> problem").
>
> I quote some output Simon got:
>
>>> Using the usual =E2=80=9Cgit am -3s=E2=80=9D from Emacs Debbugs, then I=
 get:
>>>=20
>>> --8<---------------cut here---------------start------------->8---
>>> Applying: import: juliahub: first script draft.
>>> error: sha1 information is lacking or useless (guix/import/go.scm).
>>> error: could not build fake ancestor
>>> hint: Use 'git am --show-current-patch=3Ddiff' to see the failed patch
>>> Patch failed at 0001 import: juliahub: first script draft.
>>> When you have resolved this problem, run "git am --continue".
>>> If you prefer to skip this patch, run "git am --skip" instead.
>>> To restore the original branch and stop patching, run "git am --abort".
>>> --8<---------------cut here---------------end--------------->8---
>
> Please see the original message [1] for details.
>
> Sorry I can't help resolving this problem right now and/or send an
> updated patch series.
>
> Nicolas could you please try to apply it yourself to see if you are
> succeful and eventually send a V2 patch series?

Hi Giovanni,

Sorry for the lack of work to get this merged. I must still have this
branch locally, I'll try to output a V2.

The issue I had with the use is that my factorization of some functions
broke the Go importer, so either I have to fix that or drop the
factorization and duplicate the code in the juliahub importer.

I'll try to work on that this weekend, thanks for asking.

Nicolas=20
>
> Thanks! Gio'
>
>
> [1] id:874jjzfhx0.fsf@HIDDEN https://yhetil.org/guix/874jjzfhx0.fsf@gm=
ail.com/

--=20
Best regards,
Nicolas Graves




Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 15 Sep 2023 09:46:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 15 05:46:05 2023
Received: from localhost ([127.0.0.1]:42118 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qh5On-0002Mk-AI
	for submit <at> debbugs.gnu.org; Fri, 15 Sep 2023 05:46:05 -0400
Received: from ns13.heimat.it ([46.4.214.66]:34140)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <g@HIDDEN>) id 1qh5Oh-0002MC-Vr
 for 62202 <at> debbugs.gnu.org; Fri, 15 Sep 2023 05:46:03 -0400
Received: from localhost (ip6-localhost [127.0.0.1])
 by ns13.heimat.it (Postfix) with ESMTP id A4ECB3009C0;
 Fri, 15 Sep 2023 09:45:47 +0000 (UTC)
X-Virus-Scanned: Debian amavisd-new at ns13.heimat.it
Received: from ns13.heimat.it ([127.0.0.1])
 by localhost (ns13.heimat.it [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id zW2jpyaOkTwq; Fri, 15 Sep 2023 09:45:46 +0000 (UTC)
Received: from bourrache.mug.xelera.it (unknown [93.56.171.217])
 (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by ns13.heimat.it (Postfix) with ESMTPSA id E42E230022D;
 Fri, 15 Sep 2023 09:45:45 +0000 (UTC)
Received: from roquette.mug.biscuolo.net (roquette [10.38.2.14])
 by bourrache.mug.xelera.it (Postfix) with SMTP id 60CA629C8BB0;
 Fri, 15 Sep 2023 11:45:45 +0200 (CEST)
Received: (nullmailer pid 30702 invoked by uid 1000);
 Fri, 15 Sep 2023 09:45:44 -0000
From: Giovanni Biscuolo <g@HIDDEN>
To: Nicolas Graves <ngraves@HIDDEN>
Subject: Re: [bug#62202] [PATCH 0/21] Juliahub import script.
In-Reply-To: <87fs4jf0w6.fsf@HIDDEN>
Organization: Xelera.eu
References: <871qlq89kz.fsf@HIDDEN> <87ile69geh.fsf@HIDDEN>
 <87cyzxr1zd.fsf_-_@HIDDEN> <87fs4jf0w6.fsf@HIDDEN>
Date: Fri, 15 Sep 2023 11:45:44 +0200
Message-ID: <87bke393cn.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>,
 Simon Tournier <zimon.toutoune@HIDDEN>, 62202 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hello Nicolas,

Simon Tournier <zimon.toutoune@HIDDEN> writes:

[...]

> Yeah, it looks nice.  As I said [1], =E2=80=9CI am not able to apply the
> series.=E2=80=9D  And since the series is 21 patches, I have been lazy.

I just want to add that on 2023-09-13 Simon explained failed attempts to
apply this patch series in a message to guix-devel [1] (starting from
the string "I am not speaking on the vacuum of an hypothetical
problem").

I quote some output Simon got:

>> Using the usual =E2=80=9Cgit am -3s=E2=80=9D from Emacs Debbugs, then I =
get:
>>=20
>> --8<---------------cut here---------------start------------->8---
>> Applying: import: juliahub: first script draft.
>> error: sha1 information is lacking or useless (guix/import/go.scm).
>> error: could not build fake ancestor
>> hint: Use 'git am --show-current-patch=3Ddiff' to see the failed patch
>> Patch failed at 0001 import: juliahub: first script draft.
>> When you have resolved this problem, run "git am --continue".
>> If you prefer to skip this patch, run "git am --skip" instead.
>> To restore the original branch and stop patching, run "git am --abort".
>> --8<---------------cut here---------------end--------------->8---

Please see the original message [1] for details.

Sorry I can't help resolving this problem right now and/or send an
updated patch series.

Nicolas could you please try to apply it yourself to see if you are
succeful and eventually send a V2 patch series?

Thanks! Gio'


[1] id:874jjzfhx0.fsf@HIDDEN https://yhetil.org/guix/874jjzfhx0.fsf@gmai=
l.com/

=2D-=20
Giovanni Biscuolo

Xelera IT Infrastructures

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQJABAEBCgAqFiEERcxjuFJYydVfNLI5030Op87MORIFAmUEJ8gMHGdAeGVsZXJh
LmV1AAoJENN9DqfOzDkSKf8P/3Zc1nmBjDbRLxGEOFBXFCrVEtc8iHkLIV+71ZkX
Tys4erk17kobBvU6/0UCLnHzj2S1MgK14KRizeKYKJXTs5vbZEaqpMTfZKZo/3aO
RViaysRN12KNBCuNamJxMQUpQJwdylOBdHxa6/dkUP6CAtMGnhREEJHVIiPcO6IX
HoYSfc+q5Zcx7lwGvOvgQs5fhwgON6XQsaFu8EteS7kIJbrHnoG2NZH08u9rSlMG
k1wWAxw1G5w2vkfgbQjwdUtzZ+Cj4wzvJePPgnBIGOkqmXk+8v4DxNDC6J2e3Z8c
n4epu3pj3XnChWeM7ok0rYVe4mVqB/5U4Wgcx9nmtLx2kTdVHIWnhlviuH3Zk6Nz
R4BUtofgo4MDHkjlcaEWAZCc3ZhHxTFdllf2+4eHDarr6i05ON6h6tq/T90UsVau
nP7ApWNtlmPzJ9F8C6McKCO49e+FJYx/V/s6LhOJBCG5Xk6fb3fioD/Mk4szLxcv
mqifzF5F+ahQbADr6X0CsNBneKartP5IodnUua9Jk07/bTOIdzZw+jpUm/L08R5M
1v3eKpnvVXUqTrGeYAoi/dvk+SsfQ+A4WW72fYyOhmwGEjKv9qbQWY6kZ4EfnlBX
BRJXvWYkDTPGv5mLYqmKtDqNbNa3jghI4SHvJsxm4y6q0LMes0M/dmhPjzG7f9e1
QvKF
=OEPM
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 16 Aug 2023 17:11:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 16 13:11:57 2023
Received: from localhost ([127.0.0.1]:41948 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qWK3o-0005PN-Rz
	for submit <at> debbugs.gnu.org; Wed, 16 Aug 2023 13:11:57 -0400
Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:41313)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1qWK3f-0005Mx-UL
 for 62202 <at> debbugs.gnu.org; Wed, 16 Aug 2023 13:11:48 -0400
Received: by mail-wm1-x331.google.com with SMTP id
 5b1f17b1804b1-3fe3194d21dso12423775e9.1
 for <62202 <at> debbugs.gnu.org>; Wed, 16 Aug 2023 10:11:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1692205902; x=1692810702;
 h=content-transfer-encoding:mime-version:message-id:date:references
 :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id
 :reply-to; bh=UhqoDlLjK1Pk4JMujgszXGPlBjF0ryHQHihrMbTv2vg=;
 b=lHj1gMklbw7J69jHokEPXPAJGCG7xYh5AmMsKXEV4eUGNrIibADqOzhqaGQ5L66vnv
 L38gWsqm5H8rehVQgQ9PhIZ0mQ34xxxdCk0KFux4qNgs103E89Oh7JqnlZnZKI1ShY4h
 IlFwrJk3mrT9XGMg5qIbgLlf6J/IDbTD8f4eYLc1BGQiLZQTkmcxnfwhfau8EUTDGhY5
 Qkml/tN+K8kRlFWeNKizKkay79ncH6IRnj+tcafijIpzJnS7g6L4IFddWZWdIYXjSsPn
 gNunqZFyKQwP8XtOez7/CqdiWuTnS2a6OedL1rIMpb8I0zc+hBIgsZtBOjFpGwqjd6Vn
 8/mQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1692205902; x=1692810702;
 h=content-transfer-encoding:mime-version:message-id:date:references
 :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=UhqoDlLjK1Pk4JMujgszXGPlBjF0ryHQHihrMbTv2vg=;
 b=GhNz1HK1nCP6heZWTRJn9KYdyMYNQ2amguGXlxuT3frJY8TG3rBQFwbzjhE7tjRv+x
 NsJm1meXF059KywJJXpplXoD43JkstMRIxzrANNwuCaoZ0etzSYUiwS+9LFS5d0tFv8L
 Fu5IgD5tMsfeFVYI7w+jW3nZ2zIDrbIO5lF+dmKAPQJ0WoUr6Xbrj5oivwzrdC6qsinD
 MbLzC/ZOjPLBZ7aVhX09IXL0+PLNpXVNdLvxtxDpEl+OZZUzmY4K04vmwqlBYH/iGHwN
 tz3G2BMCP6BIjfHdhpLd8fD4/8mD/1XYP7dSJxFU65mYGVWbBF1HH6RdPu4UQhSnZt1e
 /nWQ==
X-Gm-Message-State: AOJu0YwhQx8EfglQL5jpJP6Sxtyp82jgW26nVzcVPMb+sH6dL8yLRzL6
 zWfcoZpASc2AQWwKb+303awvePbLIkE=
X-Google-Smtp-Source: AGHT+IEatkBGJjjESXhtKm1caIo5f3D5NKOZPeV/XhP7KlqortuaN4zCPFboYqdXXGOQrzahqdZ/hg==
X-Received: by 2002:a05:600c:511a:b0:3f9:88d:9518 with SMTP id
 o26-20020a05600c511a00b003f9088d9518mr2085659wms.0.1692205902244; 
 Wed, 16 Aug 2023 10:11:42 -0700 (PDT)
Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id
 s10-20020a05600c044a00b003fbc9d178a8sm24773607wmb.4.2023.08.16.10.11.41
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 16 Aug 2023 10:11:41 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Nicolas Graves
 <ngraves@HIDDEN>
Subject: Re: [bug#62202] [PATCH 0/21] Juliahub import script.
In-Reply-To: <87cyzxr1zd.fsf_-_@HIDDEN>
References: <871qlq89kz.fsf@HIDDEN> <87ile69geh.fsf@HIDDEN>
 <87cyzxr1zd.fsf_-_@HIDDEN>
Date: Wed, 16 Aug 2023 17:43:53 +0200
Message-ID: <87fs4jf0w6.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: 62202 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Ludo,

Sorry for the delay, I was again in holidays. :-)

On Tue, 08 Aug 2023 at 17:24, Ludovic Court=C3=A8s <ludo@HIDDEN> wrote:

> What should we do about this importer?  Looks like useful code to me!

Yeah, it looks nice.  As I said [1], =E2=80=9CI am not able to apply the
series.=E2=80=9D  And since the series is 21 patches, I have been lazy.


1: https://yhetil.org/guix/87v8i7k6uv.fsf@HIDDEN


Cheers,
simon




Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 8 Aug 2023 15:24:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 08 11:24:51 2023
Received: from localhost ([127.0.0.1]:37499 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qTOZn-0006m4-0K
	for submit <at> debbugs.gnu.org; Tue, 08 Aug 2023 11:24:51 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:41602)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1qTOZk-0006lr-2K
 for 62202 <at> debbugs.gnu.org; Tue, 08 Aug 2023 11:24:50 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1qTOZd-0003DV-K8; Tue, 08 Aug 2023 11:24:41 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To:
 From; bh=1A/ZCB+8Pwk9lVmzDSjRCtrVgBx9VQjuTWjY8RHM9MM=; b=Ql1iev6P6QKI6Qhg37z9
 UKdZp98aTeOwlQb4TqoqwbDVnU2QS1eMWA07ln/ww6dWPs3mG9m9EPvLdvUpcjKnLtnR1Wd1ZRb84
 q9lC4g7vICREfUyaVqkgPHHah6NU7wM6f31D9LRXCWSuWv5GQ3LDHgKBn2xLNEeJPYsIZhoXwFHoN
 LBULM8ayv15qkUr2junfm+hDjrmCl6f6oxaXp8AlX2+3U7HDsrYV5cz6clC004cwfPeoboeqPyaOn
 6vKGje1rgQKvs5LAcSnO1anmjMW60bYWwRrwGYHJnsmuD0f6oNhKXVXP06NAfDiu4ndRbXkcA8+KW
 qYROlzx31v9XfA==;
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Nicolas Graves <ngraves@HIDDEN>
Subject: Re: bug#62202: [PATCH 0/21] Juliahub import script.
References: <871qlq89kz.fsf@HIDDEN> <87ile69geh.fsf@HIDDEN>
Date: Tue, 08 Aug 2023 17:24:38 +0200
In-Reply-To: <87ile69geh.fsf@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?=
 =?utf-8?Q?s?= message of "Sun, 09 Apr 2023 00:07:50 +0200")
Message-ID: <87cyzxr1zd.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 62202
Cc: Simon Tournier <zimon.toutoune@HIDDEN>, 62202 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hello Nicolas & Simon!

What should we do about this importer?  Looks like useful code to me!

Thanks,
Ludo=E2=80=99.

Ludovic Court=C3=A8s <ludo@HIDDEN> skribis:

> Hi!
>
> Nicolas Graves <ngraves@HIDDEN> skribis:
>
>>  Took me quite more time than I would've liked, but I have a usable
>>  juliahub scheme import script!
>>
>>  It seems there's still one edge case that isn't covered and revolves
>>  around when Julia packagers don't properly tag their git repos (I've
>>  only seen the case with SnoopPrecompile). There's the possibility to
>>  rely on tree commit hashes from the General repository (since this is a
>>  valid way to identify/store a git repo), but that needs some major
>>  changes in the way latest-repository-commit works. Otherwise, it needs
>>  to be done by hand. It might also not work for subpackages in
>>  directories that are up-to-date on juliahub but not yet on github, I
>>  haven't met this case yet.
>>
>>  I'm sending a patch series in the coming minutes.
>>
>> It's detailed since I haven't swauased all commits, for readability, but
>> I can squash it further if necessary.
>
> I=E2=80=99ll let Simon comment on the actual code since I=E2=80=99m not a=
 Julia person.
> :-)
>
> Some more general comments:
>
>   =E2=80=A2 Please make sure to document it in =E2=80=98doc/guix.texi=E2=
=80=99 under =E2=80=9CInvoking
>     guix import=E2=80=9D, following the same template as the others there.
>
>   =E2=80=A2 Please write =E2=80=98tests/juliahub.scm=E2=80=99.  I recomme=
nd the same strategy as
>     =E2=80=98tests/cpan.scm=E2=80=99, which is to mock the upstream HTTP =
server.
>
>   =E2=80=A2 Prefer (srfi srfi-41) over (ice-9 streams) (see rationale at
>     <https://srfi.schemers.org/srfi-41/srfi-41.html>).
>
>   =E2=80=A2 Prefer (srfi srfi-71) over (srfi srfi-11) for multiple-value
>     bindings.
>
> Thanks,
> Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.
Added tag(s) moreinfo. Request was from Ludovic Courtès <ludo@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 8 Apr 2023 22:08:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 08 18:08:04 2023
Received: from localhost ([127.0.0.1]:59773 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1plGj5-0000nx-Qz
	for submit <at> debbugs.gnu.org; Sat, 08 Apr 2023 18:08:04 -0400
Received: from eggs.gnu.org ([209.51.188.92]:34138)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1plGj3-0000nU-LN
 for 62202 <at> debbugs.gnu.org; Sat, 08 Apr 2023 18:08:02 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1plGiv-0004xt-RO; Sat, 08 Apr 2023 18:07:54 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To:
 From; bh=TajsiM4QO16mND9oKQAKLa6N77xN8GXdGT/ZdjmuUJc=; b=d5oe4ax+cwVdThRubfwg
 LrWJae9Y9wbR7FMfkoyMINceshDYIVf4LDgs8ReQYuQSz0+dJV48u1hUMdSpoVjYCyDL40QdcmMBA
 m6cnGgroYSm40+SOQQl6xmDrxmS9xKApJUkTzjctiQeL4ZXg9uk3FR5O1n/Cr95qDpzi2+DBEwFqj
 jFZQJH8Z92xfx0RUeLSVs+byRwPrp+brfnKOwIMRAvBXREnZVKy7/AS0R6xFVCwPMleqa0Ud5NoTh
 TYUSJi3NwwwLKbtrExwPMr43VgZAHUm+YiFAd9/+TxMPQWPfQUwO0cMj9I3HE0RVASS8x1isypQzt
 Vn6ISEfMPJAHdw==;
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1plGiv-0008Cu-7w; Sat, 08 Apr 2023 18:07:53 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Nicolas Graves <ngraves@HIDDEN>
Subject: Re: bug#62202: [PATCH 0/21] Juliahub import script.
References: <871qlq89kz.fsf@HIDDEN>
Date: Sun, 09 Apr 2023 00:07:50 +0200
In-Reply-To: <871qlq89kz.fsf@HIDDEN> (Nicolas Graves's message of "Wed, 15
 Mar 2023 13:47:56 +0100")
Message-ID: <87ile69geh.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 62202
Cc: 62202 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi!

Nicolas Graves <ngraves@HIDDEN> skribis:

>  Took me quite more time than I would've liked, but I have a usable
>  juliahub scheme import script!
>
>  It seems there's still one edge case that isn't covered and revolves
>  around when Julia packagers don't properly tag their git repos (I've
>  only seen the case with SnoopPrecompile). There's the possibility to
>  rely on tree commit hashes from the General repository (since this is a
>  valid way to identify/store a git repo), but that needs some major
>  changes in the way latest-repository-commit works. Otherwise, it needs
>  to be done by hand. It might also not work for subpackages in
>  directories that are up-to-date on juliahub but not yet on github, I
>  haven't met this case yet.
>
>  I'm sending a patch series in the coming minutes.
>
> It's detailed since I haven't swauased all commits, for readability, but
> I can squash it further if necessary.

I=E2=80=99ll let Simon comment on the actual code since I=E2=80=99m not a J=
ulia person.
:-)

Some more general comments:

  =E2=80=A2 Please make sure to document it in =E2=80=98doc/guix.texi=E2=80=
=99 under =E2=80=9CInvoking
    guix import=E2=80=9D, following the same template as the others there.

  =E2=80=A2 Please write =E2=80=98tests/juliahub.scm=E2=80=99.  I recommend=
 the same strategy as
    =E2=80=98tests/cpan.scm=E2=80=99, which is to mock the upstream HTTP se=
rver.

  =E2=80=A2 Prefer (srfi srfi-41) over (ice-9 streams) (see rationale at
    <https://srfi.schemers.org/srfi-41/srfi-41.html>).

  =E2=80=A2 Prefer (srfi srfi-71) over (srfi srfi-11) for multiple-value
    bindings.

Thanks,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 7 Apr 2023 16:54:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 07 12:54:41 2023
Received: from localhost ([127.0.0.1]:57174 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pkpMG-00011X-TI
	for submit <at> debbugs.gnu.org; Fri, 07 Apr 2023 12:54:41 -0400
Received: from mail-wm1-f43.google.com ([209.85.128.43]:41156)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1pkpMC-0000zj-95
 for 62202 <at> debbugs.gnu.org; Fri, 07 Apr 2023 12:54:37 -0400
Received: by mail-wm1-f43.google.com with SMTP id
 5b1f17b1804b1-3edc2294fb4so13656495e9.0
 for <62202 <at> debbugs.gnu.org>; Fri, 07 Apr 2023 09:54:36 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20210112; t=1680886470;
 h=mime-version:message-id:date:references:in-reply-to:subject:to:from
 :from:to:cc:subject:date:message-id:reply-to;
 bh=Jm9kn/2KhimiI++SlGdhXg7RxRwashvxy96QNr03Tgc=;
 b=gMYexYpiOyuvNm0WVdAw2LR7cJ3kGEUQPtgJZG5shicF16u/BEmKhzgDmf7fn0tQlg
 X7Y4rruNKBCpXwKUrphj8wEILVd7ZpjhpOwDmewMcnh2iy1h6gZJLQLvROsZb76oCS7o
 hS64Z3v/coPsLrgU1k4MFEma16+VT9GoIC3wSQCycdC09FsNqY0bZ4QHsKZw8rAuRXRf
 LeugpdYV16w6l6MgHL+9aB8FWlpLCkkRykoVtPpZjxCw39QPnyOSqbJLmSQj3bf86ece
 VmByFbrM1WrGBbUO/i8lmYUHH1OGo3CcvlkDtWIIVYovfbx5hM2SE/j5Xxxf9LP0YkK9
 oajg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112; t=1680886470;
 h=mime-version:message-id:date:references:in-reply-to:subject:to:from
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=Jm9kn/2KhimiI++SlGdhXg7RxRwashvxy96QNr03Tgc=;
 b=K6liApcfuBq774RJr/vkgpF/iPTEOqAi3VVmSjL1dho4jioMy96OPOzvwCpsYLY9GE
 CsKS2YCVczF88G4AhKcnYPpnY0mE+F+4r/j+L0b8A/9k8oUxE5O94fY56glD4JdQHTgJ
 kT2nO2znJVenkQ5y4gn4nMiJz8g7iiljVlNsgpwfJ4pnYqETkDKRtnZAHxbqwgKkN4i8
 gAMX2nKeOt7hOzAE97FleSKGZt3b4iePlrlByMmwBDyyz1xtDwmbDjIFwuvFqswPbTsN
 jIqmqz9NxytrAu0SfHksb0DGGeLx7VdP0DwFH5M9b+6U3mVvuuYDyNmuTRWDfGt63TzN
 3LOw==
X-Gm-Message-State: AAQBX9dOWbIu6LUQJylx3aczwkGJPjVOViqG5s3qB9aSxsfgyF/nnjkt
 MY2rpyOpzMl3JVQWaT5wrNATfs79gco=
X-Google-Smtp-Source: AKy350ZP802pSBpCdBNIGECv64IAQiBUXcGuZnFsc5+iSMD9yS+ce6aDHefaFiGET/f8ROY/OTICAA==
X-Received: by 2002:a05:600c:468a:b0:3eb:42f6:ac55 with SMTP id
 p10-20020a05600c468a00b003eb42f6ac55mr143352wmo.1.1680886470492; 
 Fri, 07 Apr 2023 09:54:30 -0700 (PDT)
Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id
 i2-20020a05600011c200b002d7a75a2c20sm4954386wrx.80.2023.04.07.09.54.30
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 07 Apr 2023 09:54:30 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: Nicolas Graves <ngraves@HIDDEN>, 62202 <at> debbugs.gnu.org
Subject: Re: [bug#62202] [PATCH 0/21] Juliahub import script.
In-Reply-To: <871qlq89kz.fsf@HIDDEN>
References: <871qlq89kz.fsf@HIDDEN>
Date: Fri, 07 Apr 2023 18:14:00 +0200
Message-ID: <87v8i7k6uv.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Nicolas,

Sorry for the delay. (I was in holidays \o/ :-))

I am not able to apply the series.  Could you rebase it or provide here
by email the commit against which the series apply.  Thanks in advance.


On mer., 15 mars 2023 at 13:47, Nicolas Graves via Guix-patches via <guix-patches@HIDDEN> wrote:

>  Took me quite more time than I would've liked, but I have a usable
>  juliahub scheme import script!

Really cool!  Thank you!


>  It seems there's still one edge case that isn't covered and revolves
>  around when Julia packagers don't properly tag their git repos (I've
>  only seen the case with SnoopPrecompile). There's the possibility to
>  rely on tree commit hashes from the General repository (since this is a
>  valid way to identify/store a git repo), but that needs some major
>  changes in the way latest-repository-commit works. Otherwise, it needs
>  to be done by hand. It might also not work for subpackages in
>  directories that are up-to-date on juliahub but not yet on github, I
>  haven't met this case yet.
>
>  I'm sending a patch series in the coming minutes.

Well, I have not read all series. :-)

Cheers,
simon





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 15 Mar 2023 12:52:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 15 08:52:22 2023
Received: from localhost ([127.0.0.1]:39362 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pcQcA-0001bw-6m
	for submit <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:52:22 -0400
Received: from 3.mo560.mail-out.ovh.net ([46.105.58.226]:41155)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ngraves@HIDDEN>) id 1pcQc3-0001bO-LB
 for 62202 <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:52:17 -0400
Received: from director7.ghost.mail-out.ovh.net (unknown [10.108.4.24])
 by mo560.mail-out.ovh.net (Postfix) with ESMTP id A80D423023
 for <62202 <at> debbugs.gnu.org>; Wed, 15 Mar 2023 12:52:14 +0000 (UTC)
Received: from ghost-submission-6684bf9d7b-qjmj9 (unknown [10.110.103.46])
 by director7.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 644D51FE0A;
 Wed, 15 Mar 2023 12:52:14 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.107])
 by ghost-submission-6684bf9d7b-qjmj9 with ESMTPSA
 id IF0fFn6/EWQMkgAAMA2FAQ
 (envelope-from <ngraves@HIDDEN>); Wed, 15 Mar 2023 12:52:14 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-107S0015dd5a981-ba16-44e2-9368-d0c5b89ac599,
 F74D9BBE9ED44B45FF66447495DD0B0753EB5D4A) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 81.67.140.142
From: Nicolas Graves <ngraves@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH 21/21] import: juliahub: output package names as symbols.
Date: Wed, 15 Mar 2023 13:51:30 +0100
Message-Id: <20230315125130.23041-21-ngraves@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <20230315125130.23041-1-ngraves@HIDDEN>
References: <20230315125130.23041-1-ngraves@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Ovh-Tracer-Id: 13798466311078077154
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvkedggeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepleffjeetueethfefkeffffefvddukeejkefgleduiedthfekvefhiedvhfffgeegnecukfhppeduvdejrddtrddtrddupdefjedrheelrddugedvrddutdejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqedpnhgspghrtghpthhtohepuddprhgtphhtthhopeeivddvtddvseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehiedtpdhmohguvgepshhmthhpohhuth
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: ngraves@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

---
 guix/import/juliahub.scm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index 0d3f89ad61..3e5735b950 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -258,12 +258,15 @@ (define (make-julia-sexp name version source home-page synopsis description
            '()
            `((propagated-inputs
               (list
-               ,@(map (compose julia-name->guix-name juliahub-dependency-name)
+               ,@(map (compose string->symbol
+                               julia-name->guix-name
+                               juliahub-dependency-name)
                       direct-dependencies)))))
      ,@(if (null? test-dependencies-names)
            '()
            `((native-inputs
-              (list ,@(map julia-name->guix-name test-dependencies-names)))))
+              (list ,@(map (compose string->symbol julia-name->guix-name)
+                           test-dependencies-names)))))
      (synopsis ,synopsis)
      (description ,description)
      (home-page ,home-page)
-- 
2.39.2





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 15 Mar 2023 12:52:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 15 08:52:22 2023
Received: from localhost ([127.0.0.1]:39360 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pcQc9-0001bp-Sr
	for submit <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:52:22 -0400
Received: from 2.mo582.mail-out.ovh.net ([46.105.76.65]:42109)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ngraves@HIDDEN>) id 1pcQc3-0001bG-4r
 for 62202 <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:52:16 -0400
Received: from director11.ghost.mail-out.ovh.net (unknown [10.108.4.136])
 by mo582.mail-out.ovh.net (Postfix) with ESMTP id D17C622E14
 for <62202 <at> debbugs.gnu.org>; Wed, 15 Mar 2023 12:52:13 +0000 (UTC)
Received: from ghost-submission-6684bf9d7b-drmhd (unknown [10.110.115.179])
 by director11.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 5935E1FDFE;
 Wed, 15 Mar 2023 12:52:12 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.103])
 by ghost-submission-6684bf9d7b-drmhd with ESMTPSA
 id j5uGGXy/EWQcgQEACTsY+Q
 (envelope-from <ngraves@HIDDEN>); Wed, 15 Mar 2023 12:52:12 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-103G0056da8d9c0-a480-4c85-ac50-57ae5c0fc30b,
 F74D9BBE9ED44B45FF66447495DD0B0753EB5D4A) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 81.67.140.142
From: Nicolas Graves <ngraves@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH 20/21] import: utils: Rule out texinfo common syntax from @
 escape.
Date: Wed, 15 Mar 2023 13:51:29 +0100
Message-Id: <20230315125130.23041-20-ngraves@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <20230315125130.23041-1-ngraves@HIDDEN>
References: <20230315125130.23041-1-ngraves@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Ovh-Tracer-Id: 13798184836765770466
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvkedggeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepleffjeetueethfefkeffffefvddukeejkefgleduiedthfekvefhiedvhfffgeegnecukfhppeduvdejrddtrddtrddupdefjedrheelrddugedvrddutdefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqedpnhgspghrtghpthhtohepuddprhgtphhtthhopeeivddvtddvseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehkedvpdhmohguvgepshhmthhpohhuth
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: ngraves@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

---
 guix/import/juliahub.scm | 5 +----
 guix/import/utils.scm    | 8 +++++++-
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index 06574db724..0d3f89ad61 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -197,10 +197,7 @@ (define %juliahub-beautify-description-rules
     (li           . ,(lambda args
                        `("\n@item" ,@(cdr args))))
     (code         . ,(lambda args
-                       (string-append
-                        "@code{"
-                        (string-join (cdr args) " ")
-                        "}")))
+                       `("@code{" ,@(cdr args) "}")))
     (*text*       . ,(lambda (tag x) x))
     (*default*    . ,(lambda (tag . body)
                        (cons tag body)))))
diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index 171dca54e8..5ed1dfd815 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -376,7 +376,13 @@ (define* (beautify-description description #:optional (length 80))
                    (cut string-trim-both <> #\')
                    ;; Escape single @ to prevent it from being understood as
                    ;; invalid Texinfo syntax.
-                   (cut regexp-substitute/global #f "@" <> 'pre "@@" 'post)))))
+                   (lambda (word)
+                     (if
+                      (member word '("@itemize" "@item" "@end" "@quotation"
+                                     "@enumerate" "@code" "@code{"))
+                      word
+                      ((cut regexp-substitute/global
+                            #f "@" <> 'pre "@@" 'post) word)))))))
          (words
           (string-tokenize (string-trim-both description)
                            (char-set-complement
-- 
2.39.2





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 15 Mar 2023 12:52:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 15 08:52:21 2023
Received: from localhost ([127.0.0.1]:39358 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pcQc9-0001bi-IV
	for submit <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:52:21 -0400
Received: from 4.mo561.mail-out.ovh.net ([178.33.46.10]:39613)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ngraves@HIDDEN>) id 1pcQc0-0001ag-Nq
 for 62202 <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:52:13 -0400
Received: from director10.ghost.mail-out.ovh.net (unknown [10.109.146.173])
 by mo561.mail-out.ovh.net (Postfix) with ESMTP id B615B22EE8
 for <62202 <at> debbugs.gnu.org>; Wed, 15 Mar 2023 12:52:11 +0000 (UTC)
Received: from ghost-submission-6684bf9d7b-lwhtl (unknown [10.110.208.172])
 by director10.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 537E31FEB9;
 Wed, 15 Mar 2023 12:52:11 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.102])
 by ghost-submission-6684bf9d7b-lwhtl with ESMTPSA
 id D8cAEnu/EWR4BgEAQqKfuQ
 (envelope-from <ngraves@HIDDEN>); Wed, 15 Mar 2023 12:52:11 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-102R004f32b1969-728a-4725-a3a8-c79f4eec9019,
 F74D9BBE9ED44B45FF66447495DD0B0753EB5D4A) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 81.67.140.142
From: Nicolas Graves <ngraves@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH 19/21] import: juliahub: Fix undefined homepages.
Date: Wed, 15 Mar 2023 13:51:28 +0100
Message-Id: <20230315125130.23041-19-ngraves@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <20230315125130.23041-1-ngraves@HIDDEN>
References: <20230315125130.23041-1-ngraves@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Ovh-Tracer-Id: 13797621887618638562
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvkedggeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepleffjeetueethfefkeffffefvddukeejkefgleduiedthfekvefhiedvhfffgeegnecukfhppeduvdejrddtrddtrddupdefjedrheelrddugedvrddutddvnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqedpnhgspghrtghpthhtohepuddprhgtphhtthhopeeivddvtddvseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehiedupdhmohguvgepshhmthhpohhuth
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: ngraves@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

---
 guix/import/juliahub.scm | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index 94d4ae8233..06574db724 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -303,12 +303,16 @@ (define* (juliahub->guix-package package-name
                   (if subdir
                       (parse-test-dependencies
                        (string-append subdir "/" directory))
-                      (parse-test-dependencies directory))))
+                      (parse-test-dependencies directory)))
+                 (homepage (juliahub-package-homepage package)))
             (values (make-julia-sexp
                      package-name
                      (juliahub-package-version package)
                      source
-                     (juliahub-package-homepage package)
+                     (match homepage
+                       ("" (juliahub-package-url package))
+                       ((? string?) homepage)
+                       (_ (juliahub-package-url package)))
                      (juliahub-package-description package)
                      ((compose beautify-description
                                juliahub-beautify-description)
-- 
2.39.2





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 15 Mar 2023 12:52:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 15 08:52:21 2023
Received: from localhost ([127.0.0.1]:39356 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pcQc9-0001bf-9M
	for submit <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:52:21 -0400
Received: from 19.mo583.mail-out.ovh.net ([46.105.35.78]:50355)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ngraves@HIDDEN>) id 1pcQbz-0001aZ-My
 for 62202 <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:52:12 -0400
Received: from director7.ghost.mail-out.ovh.net (unknown [10.109.156.105])
 by mo583.mail-out.ovh.net (Postfix) with ESMTP id B22D2261F9
 for <62202 <at> debbugs.gnu.org>; Wed, 15 Mar 2023 12:52:10 +0000 (UTC)
Received: from ghost-submission-6684bf9d7b-jz7bk (unknown [10.110.171.251])
 by director7.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 6BA481FE9E;
 Wed, 15 Mar 2023 12:52:10 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.108])
 by ghost-submission-6684bf9d7b-jz7bk with ESMTPSA
 id K8IgF3q/EWQINg0A78Klgg
 (envelope-from <ngraves@HIDDEN>); Wed, 15 Mar 2023 12:52:10 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-108S002ab271c7c-5c0f-4c03-9363-de78c773a064,
 F74D9BBE9ED44B45FF66447495DD0B0753EB5D4A) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 81.67.140.142
From: Nicolas Graves <ngraves@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH 18/21] import: juliahub: Fix version management.
Date: Wed, 15 Mar 2023 13:51:27 +0100
Message-Id: <20230315125130.23041-18-ngraves@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <20230315125130.23041-1-ngraves@HIDDEN>
References: <20230315125130.23041-1-ngraves@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Ovh-Tracer-Id: 13797340412112265954
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvkedggeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepleffjeetueethfefkeffffefvddukeejkefgleduiedthfekvefhiedvhfffgeegnecukfhppeduvdejrddtrddtrddupdefjedrheelrddugedvrddutdeknecuvehluhhsthgvrhfuihiivgepgeenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqedpnhgspghrtghpthhtohepuddprhgtphhtthhopeeivddvtddvseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehkeefpdhmohguvgepshhmthhpohhuth
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: ngraves@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

---
 guix/import/juliahub.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index e4b26bea34..94d4ae8233 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -247,10 +247,10 @@ (define* (juliahub-fetch name #:key (version #f))
                  (string-append (juliahub-url name) "pkg.json"))))
     (and=> (json-fetch url) json->juliahub-package)))
 
-(define (make-julia-sexp name source home-page synopsis description
+(define (make-julia-sexp name version source home-page synopsis description
                          direct-dependencies test-dependencies-names license)
   "Return the `package' s-expression for a Julia package with the given NAME,
-VERSION, URI, HASH, HOME-PAGE, DESCRIPTION, DIRECT-DEPENDENCIES,
+VERSION, SOURCE, HOME-PAGE, DESCRIPTION, DIRECT-DEPENDENCIES,
 TEST-DEPENDENCIES-NAMES and LICENSE."
   `(package
      (name ,(julia-name->guix-name name))
@@ -306,6 +306,7 @@ (define* (juliahub->guix-package package-name
                       (parse-test-dependencies directory))))
             (values (make-julia-sexp
                      package-name
+                     (juliahub-package-version package)
                      source
                      (juliahub-package-homepage package)
                      (juliahub-package-description package)
-- 
2.39.2





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 15 Mar 2023 12:52:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 15 08:52:14 2023
Received: from localhost ([127.0.0.1]:39352 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pcQc1-0001bA-Tw
	for submit <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:52:14 -0400
Received: from 1.mo576.mail-out.ovh.net ([178.33.251.173]:40269)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ngraves@HIDDEN>) id 1pcQby-0001aS-Jr
 for 62202 <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:52:11 -0400
Received: from director6.ghost.mail-out.ovh.net (unknown [10.109.156.164])
 by mo576.mail-out.ovh.net (Postfix) with ESMTP id AF74326629
 for <62202 <at> debbugs.gnu.org>; Wed, 15 Mar 2023 12:52:09 +0000 (UTC)
Received: from ghost-submission-6684bf9d7b-lwwhg (unknown [10.110.208.62])
 by director6.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 2CA4D1FE96;
 Wed, 15 Mar 2023 12:52:09 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.96])
 by ghost-submission-6684bf9d7b-lwwhg with ESMTPSA
 id +3WlCHm/EWRRpAAAHUGJ8A
 (envelope-from <ngraves@HIDDEN>); Wed, 15 Mar 2023 12:52:09 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-96R001b754a16a-1fbf-474b-af01-66a79434892f,
 F74D9BBE9ED44B45FF66447495DD0B0753EB5D4A) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 81.67.140.142
From: Nicolas Graves <ngraves@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH 17/21] import: juliahub: Fix license management.
Date: Wed, 15 Mar 2023 13:51:26 +0100
Message-Id: <20230315125130.23041-17-ngraves@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <20230315125130.23041-1-ngraves@HIDDEN>
References: <20230315125130.23041-1-ngraves@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Ovh-Tracer-Id: 13797058935116980962
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvkedggeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepleffjeetueethfefkeffffefvddukeejkefgleduiedthfekvefhiedvhfffgeegnecukfhppeduvdejrddtrddtrddupdefjedrheelrddugedvrdelieenucevlhhushhtvghrufhiiigvpedvnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqpdhnsggprhgtphhtthhopedupdhrtghpthhtohepiedvvddtvdesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheejiedpmhhouggvpehsmhhtphhouhht
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: ngraves@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

---
 guix/import/juliahub.scm | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index 338f042441..e4b26bea34 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -248,10 +248,10 @@ (define* (juliahub-fetch name #:key (version #f))
     (and=> (json-fetch url) json->juliahub-package)))
 
 (define (make-julia-sexp name source home-page synopsis description
-                         direct-dependencies test-dependencies-names licenses)
+                         direct-dependencies test-dependencies-names license)
   "Return the `package' s-expression for a Julia package with the given NAME,
 VERSION, URI, HASH, HOME-PAGE, DESCRIPTION, DIRECT-DEPENDENCIES,
-TEST-DEPENDENCIES-NAMES and LICENSES."
+TEST-DEPENDENCIES-NAMES and LICENSE."
   `(package
      (name ,(julia-name->guix-name name))
      (version ,version)
@@ -270,10 +270,8 @@ (define (make-julia-sexp name source home-page synopsis description
      (synopsis ,synopsis)
      (description ,description)
      (home-page ,home-page)
-     (license ,(match licenses
-                 (() #f)
-                 ((license) (license->symbol license))
-                 (_ `(list ,@(map license->symbol licenses)))))))
+     (license
+      ,(if license (spdx-string->license license) #f))))
 
 (define* (juliahub->guix-package package-name
                                  #:key version #:allow-other-keys)
@@ -301,9 +299,6 @@ (define* (juliahub->guix-package package-name
                  (dependencies-names
                   (map juliahub-dependency-name
                        direct-dependencies))
-                 (licenses
-                  (map spdx-string->license
-                       (list (juliahub-package-license package))))
                  (test-dependencies-names
                   (if subdir
                       (parse-test-dependencies
@@ -319,7 +314,7 @@ (define* (juliahub->guix-package package-name
                       (juliahub-package-readme package))
                      direct-dependencies
                      test-dependencies-names
-                     licenses)
+                     (juliahub-package-license package))
                     (append dependencies-names test-dependencies-names))))
         (values #f '()))))
 
-- 
2.39.2





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 15 Mar 2023 12:52:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 15 08:52:13 2023
Received: from localhost ([127.0.0.1]:39350 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pcQc1-0001ax-8i
	for submit <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:52:13 -0400
Received: from 6.mo581.mail-out.ovh.net ([188.165.39.218]:50091)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ngraves@HIDDEN>) id 1pcQbx-0001aF-DF
 for 62202 <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:52:10 -0400
Received: from director2.ghost.mail-out.ovh.net (unknown [10.109.146.19])
 by mo581.mail-out.ovh.net (Postfix) with ESMTP id 70B6924945
 for <62202 <at> debbugs.gnu.org>; Wed, 15 Mar 2023 12:52:08 +0000 (UTC)
Received: from ghost-submission-6684bf9d7b-fx869 (unknown [10.110.208.177])
 by director2.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 0E7061FE6C;
 Wed, 15 Mar 2023 12:52:08 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.97])
 by ghost-submission-6684bf9d7b-fx869 with ESMTPSA
 id 67TSAXi/EWRJHgwAtympfQ
 (envelope-from <ngraves@HIDDEN>); Wed, 15 Mar 2023 12:52:08 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-97G0021e40c609-e7e3-41ec-a004-4bd8b22eb2d8,
 F74D9BBE9ED44B45FF66447495DD0B0753EB5D4A) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 81.67.140.142
From: Nicolas Graves <ngraves@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH 16/21] import: juliahub: Beautify description.
Date: Wed, 15 Mar 2023 13:51:25 +0100
Message-Id: <20230315125130.23041-16-ngraves@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <20230315125130.23041-1-ngraves@HIDDEN>
References: <20230315125130.23041-1-ngraves@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Ovh-Tracer-Id: 13796777460289561314
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvkedggeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepleffjeetueethfefkeffffefvddukeejkefgleduiedthfekvefhiedvhfffgeegnecukfhppeduvdejrddtrddtrddupdefjedrheelrddugedvrdeljeenucevlhhushhtvghrufhiiigvpeefnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqpdhnsggprhgtphhtthhopedupdhrtghpthhtohepiedvvddtvdesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheekuddpmhhouggvpehsmhhtphhouhht
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: ngraves@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

---
 guix/import/juliahub.scm | 60 +++++++++++++++++++++++++++++++++++++---
 1 file changed, 56 insertions(+), 4 deletions(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index 3985d8d0be..338f042441 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -32,8 +32,10 @@ (define-module (guix import juliahub)
   #:use-module (guix base32)
   #:use-module (guix packages)
   #:use-module (guix upstream)
-  #:use-module (json)
   #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (json)
+  #:use-module (htmlprag)
+  #:use-module (sxml transform)
 
   #:export (juliahub->guix-package
             %juliahub-updater
@@ -164,6 +166,53 @@ (define (parse-test-dependencies directory)
     (filter (lambda (x) (not (member x %julia-stdlibs)))
             (string-split (string-drop (string-drop-right pure 1) 7) #\,))))
 
+(define %juliahub-beautify-description-rules
+  `((h1 *preorder*   . ,(lambda args #f))
+    (h2 *preorder*   . ,(lambda args #f))
+    (h3 *preorder*   . ,(lambda args #f))
+    (h4 *preorder*   . ,(lambda args #f))
+    (hr *preorder*   . ,(lambda args #f))
+    (span *preorder* . ,(lambda args #f))
+    (img *preorder*  . ,(lambda args #f))
+    (pre *preorder*  . ,(lambda args #f))
+    (div *preorder*  . ,(lambda args #f))
+    (table *preorder* . ,(lambda args #f))
+    (imgalt *preorder* . ,(lambda args #f))
+    (@ *preorder* . ,(lambda args #f))
+    (*TOP*        . ,(lambda args (cdr args)))
+    (p            . ,(lambda args (cdr args)))
+    (em           . ,(lambda args (cdr args)))
+    (strong       . ,(lambda args (cdr args)))
+    (a            . ,(lambda args
+                       (match args
+                         ((tag link ref)
+                          (if ref ref #f))
+                         (_ #f))))
+    (ul           . ,(lambda args
+                       `("@itemize" ,@(cdr args) "\n@end itemize")))
+    (ol           . ,(lambda args
+                       `("@enumerate" ,@(cdr args) "@end enumerate")))
+    (blockquote   . ,(lambda args
+                       `("@quotation" ,@(cdr args) "@end quotation")))
+    (li           . ,(lambda args
+                       `("\n@item" ,@(cdr args))))
+    (code         . ,(lambda args
+                       (string-append
+                        "@code{"
+                        (string-join (cdr args) " ")
+                        "}")))
+    (*text*       . ,(lambda (tag x) x))
+    (*default*    . ,(lambda (tag . body)
+                       (cons tag body)))))
+
+(define (juliahub-beautify-description description)
+  (string-join
+   (filter (lambda (x) (if (equal? x " ") #f x))
+           (flatten
+            (pre-post-order (html->sxml description)
+                            %juliahub-beautify-description-rules)))
+   " "))
+
 ;; Julia package.
 (define-json-mapping <juliahub-package> make-juliahub-package juliahub-package?
   json->juliahub-package
@@ -211,8 +260,9 @@ (define (make-julia-sexp name source home-page synopsis description
      ,@(if (null? direct-dependencies)
            '()
            `((propagated-inputs
-              (list ,@(map (compose julia-name->guix-name juliahub-dependency-name)
-                           direct-dependencies)))))
+              (list
+               ,@(map (compose julia-name->guix-name juliahub-dependency-name)
+                      direct-dependencies)))))
      ,@(if (null? test-dependencies-names)
            '()
            `((native-inputs
@@ -264,7 +314,9 @@ (define* (juliahub->guix-package package-name
                      source
                      (juliahub-package-homepage package)
                      (juliahub-package-description package)
-                     (beautify-description (juliahub-package-readme package))
+                     ((compose beautify-description
+                               juliahub-beautify-description)
+                      (juliahub-package-readme package))
                      direct-dependencies
                      test-dependencies-names
                      licenses)
-- 
2.39.2





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 15 Mar 2023 12:52:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 15 08:52:13 2023
Received: from localhost ([127.0.0.1]:39348 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pcQc0-0001ap-SH
	for submit <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:52:13 -0400
Received: from 8.mo575.mail-out.ovh.net ([46.105.74.219]:40835)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ngraves@HIDDEN>) id 1pcQbu-0001ZR-W3
 for 62202 <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:52:08 -0400
Received: from director1.ghost.mail-out.ovh.net (unknown [10.108.4.183])
 by mo575.mail-out.ovh.net (Postfix) with ESMTP id 9F21424BE2
 for <62202 <at> debbugs.gnu.org>; Wed, 15 Mar 2023 12:52:05 +0000 (UTC)
Received: from ghost-submission-6684bf9d7b-qw29x (unknown [10.111.208.12])
 by director1.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 0F2161FEA5;
 Wed, 15 Mar 2023 12:52:04 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.103])
 by ghost-submission-6684bf9d7b-qw29x with ESMTPSA
 id JraRMXS/EWR/yAAA3vnIvw
 (envelope-from <ngraves@HIDDEN>); Wed, 15 Mar 2023 12:52:04 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-103G0052aebf83f-b331-447d-94ff-fa4c67c92dfa,
 F74D9BBE9ED44B45FF66447495DD0B0753EB5D4A) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 81.67.140.142
From: Nicolas Graves <ngraves@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH 15/21] import: juliahub: More robust toml regex parser.
Date: Wed, 15 Mar 2023 13:51:24 +0100
Message-Id: <20230315125130.23041-15-ngraves@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <20230315125130.23041-1-ngraves@HIDDEN>
References: <20230315125130.23041-1-ngraves@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Ovh-Tracer-Id: 13795933034247152354
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvkedggeefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepvddtfeeuueehgfduffehgedtlefguefggedvgfevjeeikeeuvdetgeeuudeltdefnecuffhomhgrihhnpehjuhhlihgrhhhusgdrohhrghenucfkphepuddvjedrtddrtddruddpfeejrdehledrudegvddruddtfeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqpdhnsggprhgtphhtthhopedupdhrtghpthhtohepiedvvddtvdesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheejhedpmhhouggvpehsmhhtphhouhht
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: ngraves@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

---
 guix/import/juliahub.scm | 29 ++++++++---------------------
 1 file changed, 8 insertions(+), 21 deletions(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index 1c7b029296..3985d8d0be 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -154,28 +154,15 @@ (define (json->juliahub-dependencies vector)
                #f)))
        (vector->list vector))))
 
-(define (ini-list->test-dependencies lst)
-  (match lst
-    (('test '= ooo ...)
-     `(,(caar ooo) ,@(test-list->test-dependencies (cdar ooo))))
-    ((value ooo ...)
-     (ini-list->test-dependencies ooo))
-    ('()
-      '())))
-
-(define (test-list->test-dependencies lst)
-  (match lst
-    ((('unquote value) ooo ...)
-     `(,value ,@(test-list->test-dependencies ooo)))
-    ('()
-      '())))
-
 (define (parse-test-dependencies directory)
   (let* ((port (open-input-file (string-append directory "/Project.toml")))
-         (ini-list (stream->list (port->stream port read))))
+         (project.toml (get-string-all port))
+         (regex "\ntest = \\[.*\\]")
+         (deps (match:substring (string-match regex project.toml)))
+         (pure (string-delete (list->char-set (list #\" #\ )) deps)))
     (close-port port)
     (filter (lambda (x) (not (member x %julia-stdlibs)))
-            (ini-list->test-dependencies ini-list))))
+            (string-split (string-drop (string-drop-right pure 1) 7) #\,))))
 
 ;; Julia package.
 (define-json-mapping <juliahub-package> make-juliahub-package juliahub-package?
@@ -243,9 +230,9 @@ (define* (juliahub->guix-package package-name
   "Fetch the metadata for PACKAGE-NAME from juliahub.org, and return the
 `package' s-expression corresponding to that package, or #f on failure.
 Optionally include a VERSION string to fetch a specific version juliahub."
-  (let* ((package-toml (ini-fetch (general-url package-name "Package.toml")))
-         (subdir (assoc-ref package-toml 'subdir))
-         (tag (latest-git-tag (assoc-ref package-toml 'repo)))
+  (let* ((package.toml (ini-fetch (general-url package-name "Package.toml")))
+         (subdir (assoc-ref package.toml 'subdir))
+         (tag (latest-git-tag (assoc-ref package.toml 'repo)))
          (package (if version
                       (juliahub-fetch package-name #:version version)
                       (if tag
-- 
2.39.2





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 15 Mar 2023 12:52:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 15 08:52:12 2023
Received: from localhost ([127.0.0.1]:39345 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pcQc0-0001an-JL
	for submit <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:52:12 -0400
Received: from 3.mo575.mail-out.ovh.net ([46.105.58.60]:36459)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ngraves@HIDDEN>) id 1pcQbs-0001YK-4T
 for 62202 <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:52:04 -0400
Received: from director10.ghost.mail-out.ovh.net (unknown [10.109.138.64])
 by mo575.mail-out.ovh.net (Postfix) with ESMTP id 72FA124A42
 for <62202 <at> debbugs.gnu.org>; Wed, 15 Mar 2023 12:52:02 +0000 (UTC)
Received: from ghost-submission-6684bf9d7b-fx869 (unknown [10.110.171.1])
 by director10.ghost.mail-out.ovh.net (Postfix) with ESMTPS id AD7611FE05;
 Wed, 15 Mar 2023 12:52:01 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.108])
 by ghost-submission-6684bf9d7b-fx869 with ESMTPSA
 id Ag4DKHG/EWQ/HgwAtympfQ
 (envelope-from <ngraves@HIDDEN>); Wed, 15 Mar 2023 12:52:01 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-108S002a8026c38-3ed0-41b0-8a9c-35f608334558,
 F74D9BBE9ED44B45FF66447495DD0B0753EB5D4A) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 81.67.140.142
From: Nicolas Graves <ngraves@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH 14/21] import: juliahub: Filter out stdlibs from
 test-dependencies.
Date: Wed, 15 Mar 2023 13:51:23 +0100
Message-Id: <20230315125130.23041-14-ngraves@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <20230315125130.23041-1-ngraves@HIDDEN>
References: <20230315125130.23041-1-ngraves@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Ovh-Tracer-Id: 13794807136908534498
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvkedggeefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepleffjeetueethfefkeffffefvddukeejkefgleduiedthfekvefhiedvhfffgeegnecukfhppeduvdejrddtrddtrddupdefjedrheelrddugedvrddutdeknecuvehluhhsthgvrhfuihiivgepvdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqedpnhgspghrtghpthhtohepuddprhgtphhtthhopeeivddvtddvseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehjeehpdhmohguvgepshhmthhpohhuth
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: ngraves@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

---
 guix/import/juliahub.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index 6ce0487dba..1c7b029296 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -174,7 +174,8 @@ (define (parse-test-dependencies directory)
   (let* ((port (open-input-file (string-append directory "/Project.toml")))
          (ini-list (stream->list (port->stream port read))))
     (close-port port)
-    (ini-list->test-dependencies ini-list)))
+    (filter (lambda (x) (not (member x %julia-stdlibs)))
+            (ini-list->test-dependencies ini-list))))
 
 ;; Julia package.
 (define-json-mapping <juliahub-package> make-juliahub-package juliahub-package?
-- 
2.39.2





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 15 Mar 2023 12:52:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 15 08:52:04 2023
Received: from localhost ([127.0.0.1]:39328 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pcQbr-0001Yf-W1
	for submit <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:52:04 -0400
Received: from 20.mo582.mail-out.ovh.net ([178.32.124.17]:46657)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ngraves@HIDDEN>) id 1pcQbp-0001Xo-6R
 for 62202 <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:52:02 -0400
Received: from director2.ghost.mail-out.ovh.net (unknown [10.108.20.16])
 by mo582.mail-out.ovh.net (Postfix) with ESMTP id 462B322F9D
 for <62202 <at> debbugs.gnu.org>; Wed, 15 Mar 2023 12:51:59 +0000 (UTC)
Received: from ghost-submission-6684bf9d7b-kqlrr (unknown [10.110.103.53])
 by director2.ghost.mail-out.ovh.net (Postfix) with ESMTPS id F23B01FE63;
 Wed, 15 Mar 2023 12:51:58 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.101])
 by ghost-submission-6684bf9d7b-kqlrr with ESMTPSA
 id V7HiOW6/EWSpOhkADUMIIQ
 (envelope-from <ngraves@HIDDEN>); Wed, 15 Mar 2023 12:51:58 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-101G004820e2bb6-51a3-47e2-b88b-86777d2e2b01,
 F74D9BBE9ED44B45FF66447495DD0B0753EB5D4A) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 81.67.140.142
From: Nicolas Graves <ngraves@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH 13/21] import: juliahub: Add support for versions for
 juliahub-fetch.
Date: Wed, 15 Mar 2023 13:51:22 +0100
Message-Id: <20230315125130.23041-13-ngraves@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <20230315125130.23041-1-ngraves@HIDDEN>
References: <20230315125130.23041-1-ngraves@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Ovh-Tracer-Id: 13794244187407901410
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvkedggeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepffelffdtieeijedugffgvddvieetheegveehueeggfegleehleekffehtdeuuefhnecuffhomhgrihhnpehjuhhlihgrhhhusgdrtghomhenucfkphepuddvjedrtddrtddruddpfeejrdehledrudegvddruddtudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqpdhnsggprhgtphhtthhopedupdhrtghpthhtohepiedvvddtvdesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheekvddpmhhouggvpehsmhhtphhouhht
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: ngraves@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

---
 guix/import/juliahub.scm | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index b646f93295..6ce0487dba 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -122,7 +122,7 @@ (define %julia-stdlibs
         "Pkg"
         "LazyArtifacts"))
 
-(define (juliahub-uri name)
+(define (juliahub-redirect-uri name)
   (let* ((url (string-append "https://docs.juliahub.com/" name "/"))
          (port (http-fetch url #:text? #t))
          (_ (get-line port))
@@ -134,11 +134,11 @@ (define (juliahub-uri name)
 
 (define (juliahub-url name)
   (let* ((url (string-append "https://docs.juliahub.com/" name "/"))
-         (uri (juliahub-uri name)))
+         (uri (juliahub-redirect-uri name)))
     (string-append url uri "/")))
 
-(define (juliahub-slug-version name)
-  (let* ((uri (juliahub-uri name))
+(define (juliahub-slug+version name)
+  (let* ((uri (juliahub-redirect-uri name))
          (slug (string-take uri 5))
          (latest-version (string-drop uri 6)))
     `(,slug ,latest-version)))
@@ -203,8 +203,12 @@ (define (julia-name->guix-name name)
 
 (define* (juliahub-fetch name #:key (version #f))
   "Return a <juliahub-package> record for package NAME, or #f on failure."
-  (and=> (json-fetch (string-append (juliahub-url name) "pkg.json"))
-         json->juliahub-package))
+  (let ((url (if version
+                 (string-append "https://docs.juliahub.com/" name "/"
+                                (car (juliahub-slug+version name)) "/"
+                                version "/pkg.json")
+                 (string-append (juliahub-url name) "pkg.json"))))
+    (and=> (json-fetch url) json->juliahub-package)))
 
 (define (make-julia-sexp name source home-page synopsis description
                          direct-dependencies test-dependencies-names licenses)
@@ -242,9 +246,9 @@ (define* (juliahub->guix-package package-name
          (subdir (assoc-ref package-toml 'subdir))
          (tag (latest-git-tag (assoc-ref package-toml 'repo)))
          (package (if version
-                      (juliahub-fetch package-name version)
+                      (juliahub-fetch package-name #:version version)
                       (if tag
-                          (juliahub-fetch package-name tag)
+                          (juliahub-fetch package-name #:version tag)
                           (juliahub-fetch package-name)))))
     (if package
         (let-values (((source directory)
-- 
2.39.2





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 15 Mar 2023 12:52:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 15 08:52:04 2023
Received: from localhost ([127.0.0.1]:39325 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pcQbr-0001YR-FT
	for submit <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:52:03 -0400
Received: from 11.mo581.mail-out.ovh.net ([87.98.173.157]:51159)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ngraves@HIDDEN>) id 1pcQbl-0001XN-K7
 for 62202 <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:51:58 -0400
Received: from director2.ghost.mail-out.ovh.net (unknown [10.109.138.153])
 by mo581.mail-out.ovh.net (Postfix) with ESMTP id 96C5223998
 for <62202 <at> debbugs.gnu.org>; Wed, 15 Mar 2023 12:51:56 +0000 (UTC)
Received: from ghost-submission-6684bf9d7b-r6rck (unknown [10.111.208.70])
 by director2.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 35F261FEAA;
 Wed, 15 Mar 2023 12:51:55 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.101])
 by ghost-submission-6684bf9d7b-r6rck with ESMTPSA
 id 4Q87DGu/EWS+BgAA9fVuhw
 (envelope-from <ngraves@HIDDEN>); Wed, 15 Mar 2023 12:51:55 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-101G0041049e45e-8604-48f5-b1ba-22a30fcaef31,
 F74D9BBE9ED44B45FF66447495DD0B0753EB5D4A) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 81.67.140.142
From: Nicolas Graves <ngraves@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH 12/21] import: juliahub: Handle the case where we have a
 subdirectory.
Date: Wed, 15 Mar 2023 13:51:21 +0100
Message-Id: <20230315125130.23041-12-ngraves@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <20230315125130.23041-1-ngraves@HIDDEN>
References: <20230315125130.23041-1-ngraves@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Ovh-Tracer-Id: 13793399762104738530
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvkedggeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepvddtfeeuueehgfduffehgedtlefguefggedvgfevjeeikeeuvdetgeeuudeltdefnecuffhomhgrihhnpehjuhhlihgrhhhusgdrohhrghenucfkphepuddvjedrtddrtddruddpfeejrdehledrudegvddruddtudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqpdhnsggprhgtphhtthhopedupdhrtghpthhtohepiedvvddtvdesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheekuddpmhhouggvpehsmhhtphhouhht
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: ngraves@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

---
 guix/import/juliahub.scm | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index 2ea461b72a..b646f93295 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -233,14 +233,12 @@ (define (make-julia-sexp name source home-page synopsis description
                  ((license) (license->symbol license))
                  (_ `(list ,@(map license->symbol licenses)))))))
 
-;; TODO handle subdir case properly.
-
 (define* (juliahub->guix-package package-name
                                  #:key version #:allow-other-keys)
   "Fetch the metadata for PACKAGE-NAME from juliahub.org, and return the
 `package' s-expression corresponding to that package, or #f on failure.
 Optionally include a VERSION string to fetch a specific version juliahub."
-  (let* ((package-toml (ini-fetch (general-url name "Package.toml")))
+  (let* ((package-toml (ini-fetch (general-url package-name "Package.toml")))
          (subdir (assoc-ref package-toml 'subdir))
          (tag (latest-git-tag (assoc-ref package-toml 'repo)))
          (package (if version
@@ -264,7 +262,11 @@ (define* (juliahub->guix-package package-name
                  (licenses
                   (map spdx-string->license
                        (list (juliahub-package-license package))))
-                 (test-dependencies-names (parse-test-dependencies directory)))
+                 (test-dependencies-names
+                  (if subdir
+                      (parse-test-dependencies
+                       (string-append subdir "/" directory))
+                      (parse-test-dependencies directory))))
             (values (make-julia-sexp
                      package-name
                      source
-- 
2.39.2





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 15 Mar 2023 12:52:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 15 08:52:03 2023
Received: from localhost ([127.0.0.1]:39322 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pcQbq-0001YB-Rk
	for submit <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:52:03 -0400
Received: from 8.mo584.mail-out.ovh.net ([188.165.33.112]:34987)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ngraves@HIDDEN>) id 1pcQbj-0001X4-OO
 for 62202 <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:51:57 -0400
Received: from director6.ghost.mail-out.ovh.net (unknown [10.108.20.172])
 by mo584.mail-out.ovh.net (Postfix) with ESMTP id 0570F22F69
 for <62202 <at> debbugs.gnu.org>; Wed, 15 Mar 2023 12:51:53 +0000 (UTC)
Received: from ghost-submission-6684bf9d7b-74llp (unknown [10.110.171.145])
 by director6.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 44BFA1FE33;
 Wed, 15 Mar 2023 12:51:52 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.96])
 by ghost-submission-6684bf9d7b-74llp with ESMTPSA
 id FMVkFWi/EWQrNhcA/ww3gA
 (envelope-from <ngraves@HIDDEN>); Wed, 15 Mar 2023 12:51:52 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-96R001b39c5f89-9641-4aa6-8301-a3ef5fa45645,
 F74D9BBE9ED44B45FF66447495DD0B0753EB5D4A) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 81.67.140.142
From: Nicolas Graves <ngraves@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH 10/21] import: juliahub: Add functions to parse the git repo
 for a git tag.
Date: Wed, 15 Mar 2023 13:51:19 +0100
Message-Id: <20230315125130.23041-10-ngraves@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <20230315125130.23041-1-ngraves@HIDDEN>
References: <20230315125130.23041-1-ngraves@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Ovh-Tracer-Id: 13792555337731597026
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvkedggeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepudfggeejleevtdffjeetheffvedtheekieeuveehgffggfdthedtfeeigeehuedunecuffhomhgrihhnpehgihhthhhusghushgvrhgtohhnthgvnhhtrdgtohhmpdhjuhhlihgrhhhusgdrohhrghenucfkphepuddvjedrtddrtddruddpfeejrdehledrudegvddrleeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqedpnhgspghrtghpthhtohepuddprhgtphhtthhopeeivddvtddvseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehkeegpdhmohguvgepshhmthhpohhuth
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: ngraves@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

---
 guix/import/juliahub.scm | 62 ++++++++++++++++++++++++++++++++++++----
 1 file changed, 56 insertions(+), 6 deletions(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index fc25ba1d42..5327e92325 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -26,6 +26,7 @@ (define-module (guix import juliahub)
   #:use-module (srfi srfi-9)
   #:use-module (srfi srfi-11)
   #:use-module (guix http-client)
+  #:use-module (guix git)
   #:use-module (guix import utils)
   #:use-module (guix import json)
   #:use-module (guix base32)
@@ -38,6 +39,48 @@ (define-module (guix import juliahub)
             %juliahub-updater
             juliahub-recursive-import))
 
+;; Juliahub may be more up-to-date than the General registry or the actual git
+;; tag (it seems around 6 hours pass between the time a commit is supplied to
+;; JuliaRegistrator as a release, and the time Julia TagBot Github Action makes
+;; the git tag). We have no simple way to get the commit of the latest-version.
+;; Thus the best simple thing we can do is get the latest-git-version, and
+;; import this version instead. We do this by parsing Package.toml in the General
+;; registry, and then getting the refs of the git repo supplied by this
+;; file. Parsing this file is also necessary if the package is in a subdir of a
+;; git repository, because the information isn't present in Juliahub.
+;; There's a last case where some Julia packages are not based on a particular
+;; git tag, and where looking for the commit is tedious and artificial. In these
+;; cases, we introduce the tree-commit which is available in the Versions.toml
+;; file in the General repository. This is equivalent to a commit, since we have
+;; a unique hash of the listing of files and directories, thus it can be used to
+;; identify the state of a repository.
+
+(define %general-base-url
+  "https://raw.githubusercontent.com/JuliaRegistries/General/master/")
+
+(define (general-url package-name file)
+  (let ((folder (string-capitalize (string-take package-name 1))))
+    (string-append
+     %general-base-url folder "/" package-name "/" file)))
+
+(define (ini-list->alist lst)
+  (match lst
+    ((attribute '= value ooo ...)
+     `((,attribute . ,value) ,@(ini-list->alist ooo)))
+    ('()
+     '())))
+
+(define (ini-fetch url)
+  (let* ((port (http-fetch url #:text? #t))
+         (ini-list (stream->list (port->stream port read))))
+    (close-port port)
+    (ini-list->alist ini-list)))
+
+(define (latest-git-tag repo)
+  (let* ((last-ref (last (remote-refs repo #:tags? #t)))
+         (last-git-tag (last (string-split last-ref #\/))))
+    (string-drop last-git-tag 1)))
+
 ;; To update, see file sysimg.jl
 (define %julia-stdlibs
   (list "julia"
@@ -194,14 +237,21 @@ (define (make-julia-sexp name source home-page synopsis description
                  ((license) (license->symbol license))
                  (_ `(list ,@(map license->symbol licenses)))))))
 
+;; TODO handle subdir case properly.
+
 (define* (juliahub->guix-package package-name
                                  #:key version #:allow-other-keys)
   "Fetch the metadata for PACKAGE-NAME from juliahub.org, and return the
 `package' s-expression corresponding to that package, or #f on failure.
 Optionally include a VERSION string to fetch a specific version juliahub."
-  (let ((package (if version
-                     (juliahub-fetch package-name version)
-                     (juliahub-fetch package-name))))
+  (let* ((package-toml (ini-fetch (general-url name "Package.toml")))
+         (subdir (assoc-ref package-toml 'subdir))
+         (tag (latest-git-tag (assoc-ref package-toml 'repo)))
+         (package (if version
+                      (juliahub-fetch package-name version)
+                      (if tag
+                          (juliahub-fetch package-name tag)
+                          (juliahub-fetch package-name)))))
     (if package
         (let-values (((source directory)
                       (git->origin+dir
@@ -233,13 +283,13 @@ (define* (juliahub->guix-package package-name
 
 (define (guix-package->juliahub-name package)
   (let* ((url (juliahub-package-url package))
-         (git-name (car (last-pair (string-split url #\/))))
+         (git-name (last (string-split url #\/)))
          (ungitted-name (if (string-suffix? ".git" git-name)
                             (string-drop-right git-name 4)
                             git-name))
          (package-name (if (string-suffix? ".jl" ungitted-name)
-                            (string-drop-right ungitted-name 4)
-                            ungitted-name)))
+                           (string-drop-right ungitted-name 4)
+                           ungitted-name)))
     package-name))
 
 (define* (import-release package #:key (version #f))
-- 
2.39.2





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 15 Mar 2023 12:52:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 15 08:52:02 2023
Received: from localhost ([127.0.0.1]:39319 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pcQbq-0001Y4-HQ
	for submit <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:52:02 -0400
Received: from 3.mo576.mail-out.ovh.net ([188.165.52.203]:44545)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ngraves@HIDDEN>) id 1pcQbj-0001X2-Ax
 for 62202 <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:51:56 -0400
Received: from director6.ghost.mail-out.ovh.net (unknown [10.109.156.164])
 by mo576.mail-out.ovh.net (Postfix) with ESMTP id 531A6265E1
 for <62202 <at> debbugs.gnu.org>; Wed, 15 Mar 2023 12:51:54 +0000 (UTC)
Received: from ghost-submission-6684bf9d7b-mfzm4 (unknown [10.110.115.9])
 by director6.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 1D5C71FE33;
 Wed, 15 Mar 2023 12:51:54 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.97])
 by ghost-submission-6684bf9d7b-mfzm4 with ESMTPSA
 id eAi8BWq/EWQwlwAAhlYjSA
 (envelope-from <ngraves@HIDDEN>); Wed, 15 Mar 2023 12:51:54 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-97G00218613940-e019-48a7-8a0f-dae9d375784c,
 F74D9BBE9ED44B45FF66447495DD0B0753EB5D4A) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 81.67.140.142
From: Nicolas Graves <ngraves@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH 11/21] import: juliahub: Improve test dependencies parsing.
Date: Wed, 15 Mar 2023 13:51:20 +0100
Message-Id: <20230315125130.23041-11-ngraves@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <20230315125130.23041-1-ngraves@HIDDEN>
References: <20230315125130.23041-1-ngraves@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Ovh-Tracer-Id: 13792836809647973090
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvkedggeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepleffjeetueethfefkeffffefvddukeejkefgleduiedthfekvefhiedvhfffgeegnecukfhppeduvdejrddtrddtrddupdefjedrheelrddugedvrdeljeenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqpdhnsggprhgtphhtthhopedupdhrtghpthhtohepiedvvddtvdesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheejiedpmhhouggvpehsmhhtphhouhht
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: ngraves@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

---
 guix/import/juliahub.scm | 30 +++++++++++++-----------------
 1 file changed, 13 insertions(+), 17 deletions(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index 5327e92325..2ea461b72a 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -154,31 +154,27 @@ (define (json->juliahub-dependencies vector)
                #f)))
        (vector->list vector))))
 
-(define (ini-list->extra-dependencies lst)
+(define (ini-list->test-dependencies lst)
   (match lst
-    (('(extras) ooo ...)
-     (extra-list->extra-dependencies ooo))
-    (((tag) ooo ...)
-     (ini-list->extra-dependencies ooo))
-    ((attribute '= value ooo ...)
-     (ini-list->extra-dependencies ooo))
+    (('test '= ooo ...)
+     `(,(caar ooo) ,@(test-list->test-dependencies (cdar ooo))))
+    ((value ooo ...)
+     (ini-list->test-dependencies ooo))
     ('()
-     '())))
+      '())))
 
-(define (extra-list->extra-dependencies lst)
+(define (test-list->test-dependencies lst)
   (match lst
-    ((attribute '= value ooo ...)
-     `(,(symbol->string attribute) ,@(extra-list->extra-dependencies ooo)))
-    (((tag) ooo ...)
-     '())
+    ((('unquote value) ooo ...)
+     `(,value ,@(test-list->test-dependencies ooo)))
     ('()
-     '())))
+      '())))
 
-(define (parse-extra-dependencies directory)
+(define (parse-test-dependencies directory)
   (let* ((port (open-input-file (string-append directory "/Project.toml")))
          (ini-list (stream->list (port->stream port read))))
     (close-port port)
-    (ini-list->extra-dependencies ini-list)))
+    (ini-list->test-dependencies ini-list)))
 
 ;; Julia package.
 (define-json-mapping <juliahub-package> make-juliahub-package juliahub-package?
@@ -268,7 +264,7 @@ (define* (juliahub->guix-package package-name
                  (licenses
                   (map spdx-string->license
                        (list (juliahub-package-license package))))
-                 (test-dependencies-names (parse-extra-dependencies directory)))
+                 (test-dependencies-names (parse-test-dependencies directory)))
             (values (make-julia-sexp
                      package-name
                      source
-- 
2.39.2





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 15 Mar 2023 12:51:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 15 08:51:57 2023
Received: from localhost ([127.0.0.1]:39315 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pcQbl-0001XP-0H
	for submit <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:51:57 -0400
Received: from 17.mo581.mail-out.ovh.net ([188.165.35.227]:45655)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ngraves@HIDDEN>) id 1pcQbe-0001Wo-JP
 for 62202 <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:51:51 -0400
Received: from director5.ghost.mail-out.ovh.net (unknown [10.108.1.191])
 by mo581.mail-out.ovh.net (Postfix) with ESMTP id 80A4F23528
 for <62202 <at> debbugs.gnu.org>; Wed, 15 Mar 2023 12:51:49 +0000 (UTC)
Received: from ghost-submission-6684bf9d7b-74llp (unknown [10.110.103.37])
 by director5.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 2D2091FE96;
 Wed, 15 Mar 2023 12:51:48 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.110])
 by ghost-submission-6684bf9d7b-74llp with ESMTPSA
 id OuBlD2S/EWQnNhcA/ww3gA
 (envelope-from <ngraves@HIDDEN>); Wed, 15 Mar 2023 12:51:48 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-110S00495087c72-54ce-4829-a9d2-791bb8747380,
 F74D9BBE9ED44B45FF66447495DD0B0753EB5D4A) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 81.67.140.142
From: Nicolas Graves <ngraves@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH 09/21] import: juliahub: Improve dependency management.
Date: Wed, 15 Mar 2023 13:51:18 +0100
Message-Id: <20230315125130.23041-9-ngraves@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <20230315125130.23041-1-ngraves@HIDDEN>
References: <20230315125130.23041-1-ngraves@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Ovh-Tracer-Id: 13791429434507322082
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvkedggeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepleffjeetueethfefkeffffefvddukeejkefgleduiedthfekvefhiedvhfffgeegnecukfhppeduvdejrddtrddtrddupdefjedrheelrddugedvrdduuddtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqedpnhgspghrtghpthhtohepuddprhgtphhtthhopeeivddvtddvseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehkedupdhmohguvgepshhmthhpohhuth
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: ngraves@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

---
 guix/import/juliahub.scm | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index b1eeb736a8..fc25ba1d42 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -168,22 +168,20 @@ (define* (juliahub-fetch name #:key (version #f))
          json->juliahub-package))
 
 (define (make-julia-sexp name source home-page synopsis description
-                         dependencies test-dependencies-names licenses)
+                         direct-dependencies test-dependencies-names licenses)
   "Return the `package' s-expression for a Julia package with the given NAME,
-VERSION, URI, HASH, HOME-PAGE, DESCRIPTION, DEPENDENCIES,
+VERSION, URI, HASH, HOME-PAGE, DESCRIPTION, DIRECT-DEPENDENCIES,
 TEST-DEPENDENCIES-NAMES and LICENSES."
   `(package
      (name ,(julia-name->guix-name name))
      (version ,version)
      (source ,source)
      (build-system julia-build-system)
-     ,@(let ((direct-dependencies
-              (filter julia-dependency-direct? dependencies)))
-         (if (null? direct-dependencies)
-             '()
-             `((propagated-inputs
-                (list ,@(map (compose julia-name->guix-name juliahub-dependency-name)
-                             direct-dependencies))))))
+     ,@(if (null? direct-dependencies)
+           '()
+           `((propagated-inputs
+              (list ,@(map (compose julia-name->guix-name juliahub-dependency-name)
+                           direct-dependencies)))))
      ,@(if (null? test-dependencies-names)
            '()
            `((native-inputs
@@ -211,9 +209,12 @@ (define* (juliahub->guix-package package-name
                        `(tag-or-commit
                          . ,(string-append
                              "v" (juliahub-package-version package))))))
-          (let* ((dependencies-names
+          (let* ((direct-dependencies
+                  (filter juliahub-dependency-direct?
+                          (juliahub-package-dependencies package)))
+                 (dependencies-names
                   (map juliahub-dependency-name
-                       (juliahub-package-direct-dependencies package)))
+                       direct-dependencies))
                  (licenses
                   (map spdx-string->license
                        (list (juliahub-package-license package))))
@@ -224,7 +225,7 @@ (define* (juliahub->guix-package package-name
                      (juliahub-package-homepage package)
                      (juliahub-package-description package)
                      (beautify-description (juliahub-package-readme package))
-                     (juliahub-package-direct-dependencies package)
+                     direct-dependencies
                      test-dependencies-names
                      licenses)
                     (append dependencies-names test-dependencies-names))))
-- 
2.39.2





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 15 Mar 2023 12:51:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 15 08:51:57 2023
Received: from localhost ([127.0.0.1]:39313 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pcQbk-0001X9-0D
	for submit <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:51:56 -0400
Received: from 20.mo581.mail-out.ovh.net ([46.105.49.208]:39895)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ngraves@HIDDEN>) id 1pcQbc-0001WJ-Px
 for 62202 <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:51:49 -0400
Received: from director10.ghost.mail-out.ovh.net (unknown [10.108.16.251])
 by mo581.mail-out.ovh.net (Postfix) with ESMTP id B5B2323417
 for <62202 <at> debbugs.gnu.org>; Wed, 15 Mar 2023 12:51:47 +0000 (UTC)
Received: from ghost-submission-6684bf9d7b-7krfw (unknown [10.110.171.145])
 by director10.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 599201FEB0;
 Wed, 15 Mar 2023 12:51:46 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.98])
 by ghost-submission-6684bf9d7b-7krfw with ESMTPSA
 id +4VFGmK/EWTEsAAAVuhi0A
 (envelope-from <ngraves@HIDDEN>); Wed, 15 Mar 2023 12:51:46 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-98R002fb52551e-c1e4-4466-8be0-4501e44917c9,
 F74D9BBE9ED44B45FF66447495DD0B0753EB5D4A) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 81.67.140.142
From: Nicolas Graves <ngraves@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH 08/21] import: juliahub: Simplify juliahub dependency
 management.
Date: Wed, 15 Mar 2023 13:51:17 +0100
Message-Id: <20230315125130.23041-8-ngraves@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <20230315125130.23041-1-ngraves@HIDDEN>
References: <20230315125130.23041-1-ngraves@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Ovh-Tracer-Id: 13790866484996268770
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvkedggeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepleffjeetueethfefkeffffefvddukeejkefgleduiedthfekvefhiedvhfffgeegnecukfhppeduvdejrddtrddtrddupdefjedrheelrddugedvrdelkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqpdhnsggprhgtphhtthhopedupdhrtghpthhtohepiedvvddtvdesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheekuddpmhhouggvpehsmhhtphhouhht
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: ngraves@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

---
 guix/import/juliahub.scm | 42 ++++++++++++++--------------------------
 1 file changed, 14 insertions(+), 28 deletions(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index af08f3d698..b1eeb736a8 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -100,26 +100,13 @@ (define (juliahub-slug-version name)
          (latest-version (string-drop uri 6)))
     `(,slug ,latest-version)))
 
-(define (json->juliahub-direct-dependencies vector)
+(define (json->juliahub-dependencies vector)
   (if (vector? vector)
       (filter-map
        (lambda (el)
          (let ((dep (json->juliahub-dependency el)))
-           (if (and (juliahub-dependency-direct? dep)
-                    (not (member (juliahub-dependency-name dep)
-                                 %julia-stdlibs)))
-               dep
-               #f)))
-       (vector->list vector))))
-
-(define (json->juliahub-indirect-dependencies vector)
-  (if (vector? vector)
-      (filter-map
-       (lambda (el)
-         (let ((dep (json->juliahub-dependency el)))
-           (if (and (not (juliahub-dependency-direct? dep))
-                    (not (member (juliahub-dependency-name dep)
-                                 %julia-stdlibs)))
+           (if (not (member (juliahub-dependency-name dep)
+                            %julia-stdlibs))
                dep
                #f)))
        (vector->list vector))))
@@ -157,12 +144,9 @@ (define-json-mapping <juliahub-package> make-juliahub-package juliahub-package?
   (readme juliahub-package-readme) ;string
   (version juliahub-package-version) ;string
   (description juliahub-package-description) ;string
-  (direct-dependencies
-   juliahub-package-direct-dependencies "deps"
-   json->juliahub-direct-dependencies) ;list of <juliahub-dependency>
-  (indirect-dependencies
-   juliahub-package-indirect-dependencies "deps"
-   json->juliahub-indirect-dependencies) ;list of <juliahub-dependency>
+  (dependencies
+   juliahub-package-dependencies "deps"
+   json->juliahub-dependencies) ;list of <juliahub-dependency>
   (url juliahub-package-url) ;string
   (uuid juliahub-package-uuid) ;string
   (license juliahub-package-license)) ;string
@@ -184,7 +168,7 @@ (define* (juliahub-fetch name #:key (version #f))
          json->juliahub-package))
 
 (define (make-julia-sexp name source home-page synopsis description
-                         direct-dependencies test-dependencies-names licenses)
+                         dependencies test-dependencies-names licenses)
   "Return the `package' s-expression for a Julia package with the given NAME,
 VERSION, URI, HASH, HOME-PAGE, DESCRIPTION, DEPENDENCIES,
 TEST-DEPENDENCIES-NAMES and LICENSES."
@@ -193,11 +177,13 @@ (define (make-julia-sexp name source home-page synopsis description
      (version ,version)
      (source ,source)
      (build-system julia-build-system)
-     ,@(if (null? direct-dependencies)
-           '()
-           `((propagated-inputs
-              (list ,@(map (compose julia-name->guix-name juliahub-dependency-name)
-                           direct-dependencies)))))
+     ,@(let ((direct-dependencies
+              (filter julia-dependency-direct? dependencies)))
+         (if (null? direct-dependencies)
+             '()
+             `((propagated-inputs
+                (list ,@(map (compose julia-name->guix-name juliahub-dependency-name)
+                             direct-dependencies))))))
      ,@(if (null? test-dependencies-names)
            '()
            `((native-inputs
-- 
2.39.2





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 15 Mar 2023 12:51:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 15 08:51:56 2023
Received: from localhost ([127.0.0.1]:39310 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pcQbj-0001X6-KD
	for submit <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:51:55 -0400
Received: from 19.mo581.mail-out.ovh.net ([178.33.251.118]:59103)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ngraves@HIDDEN>) id 1pcQbb-0001Vz-1J
 for 62202 <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:51:47 -0400
Received: from director9.ghost.mail-out.ovh.net (unknown [10.108.20.202])
 by mo581.mail-out.ovh.net (Postfix) with ESMTP id D903322FE1
 for <62202 <at> debbugs.gnu.org>; Wed, 15 Mar 2023 12:51:45 +0000 (UTC)
Received: from ghost-submission-6684bf9d7b-8xsrj (unknown [10.110.115.222])
 by director9.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 4D6481FD0E;
 Wed, 15 Mar 2023 12:51:45 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.105])
 by ghost-submission-6684bf9d7b-8xsrj with ESMTPSA
 id yXU6EWG/EWTSxAAAr+9Hqw
 (envelope-from <ngraves@HIDDEN>); Wed, 15 Mar 2023 12:51:45 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-105G006a7594cdb-75a8-4c1e-b381-8dcd8abb98c4,
 F74D9BBE9ED44B45FF66447495DD0B0753EB5D4A) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 81.67.140.142
From: Nicolas Graves <ngraves@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH 07/21] import: juliahub: Filter out julia stdlibs.
Date: Wed, 15 Mar 2023 13:51:16 +0100
Message-Id: <20230315125130.23041-7-ngraves@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <20230315125130.23041-1-ngraves@HIDDEN>
References: <20230315125130.23041-1-ngraves@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Ovh-Tracer-Id: 13790303534594843362
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvkedggeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepffelffdtieeijedugffgvddvieetheegveehueeggfegleehleekffehtdeuuefhnecuffhomhgrihhnpehjuhhlihgrhhhusgdrtghomhenucfkphepuddvjedrtddrtddruddpfeejrdehledrudegvddruddtheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqpdhnsggprhgtphhtthhopedupdhrtghpthhtohepiedvvddtvdesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheekuddpmhhouggvpehsmhhtphhouhht
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: ngraves@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

---
 guix/import/juliahub.scm | 49 ++++++++++++++++++++++++++++++++++++++--
 1 file changed, 47 insertions(+), 2 deletions(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index c38c830caa..af08f3d698 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -38,6 +38,47 @@ (define-module (guix import juliahub)
             %juliahub-updater
             juliahub-recursive-import))
 
+;; To update, see file sysimg.jl
+(define %julia-stdlibs
+  (list "julia"
+        "ArgTools"
+        "Artifacts"
+        "Base64"
+        "CRC32c"
+        "FileWatching"
+        "Libdl"
+        "Logging"
+        "Mmap"
+        "NetworkOptions"
+        "SHA"
+        "Serialization"
+        "Sockets"
+        "Unicode"
+        "DelimitedFiles"
+        "LinearAlgebra"
+        "Markdown"
+        "Printf"
+        "Random"
+        "Tar"
+        "Dates"
+        "Distributed"
+        "Future"
+        "InteractiveUtils"
+        "LibGit2"
+        "Profile"
+        "SparseArrays"
+        "UUIDs"
+        "REPL"
+        "SharedArrays"
+        "Statistics"
+        "SuiteSparse"
+        "TOML"
+        "Test"
+        "LibCURL"
+        "Downloads"
+        "Pkg"
+        "LazyArtifacts"))
+
 (define (juliahub-uri name)
   (let* ((url (string-append "https://docs.juliahub.com/" name "/"))
          (port (http-fetch url #:text? #t))
@@ -64,7 +105,9 @@ (define (json->juliahub-direct-dependencies vector)
       (filter-map
        (lambda (el)
          (let ((dep (json->juliahub-dependency el)))
-           (if (juliahub-dependency-direct? dep)
+           (if (and (juliahub-dependency-direct? dep)
+                    (not (member (juliahub-dependency-name dep)
+                                 %julia-stdlibs)))
                dep
                #f)))
        (vector->list vector))))
@@ -74,7 +117,9 @@ (define (json->juliahub-indirect-dependencies vector)
       (filter-map
        (lambda (el)
          (let ((dep (json->juliahub-dependency el)))
-           (if (not (juliahub-dependency-direct? dep))
+           (if (and (not (juliahub-dependency-direct? dep))
+                    (not (member (juliahub-dependency-name dep)
+                                 %julia-stdlibs)))
                dep
                #f)))
        (vector->list vector))))
-- 
2.39.2





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 15 Mar 2023 12:51:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 15 08:51:49 2023
Received: from localhost ([127.0.0.1]:39306 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pcQbd-0001Wa-57
	for submit <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:51:49 -0400
Received: from 15.mo581.mail-out.ovh.net ([87.98.180.21]:52681)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ngraves@HIDDEN>) id 1pcQba-0001Vs-9a
 for 62202 <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:51:47 -0400
Received: from director3.ghost.mail-out.ovh.net (unknown [10.108.4.253])
 by mo581.mail-out.ovh.net (Postfix) with ESMTP id 296B12258B
 for <62202 <at> debbugs.gnu.org>; Wed, 15 Mar 2023 12:51:44 +0000 (UTC)
Received: from ghost-submission-6684bf9d7b-gf8xs (unknown [10.110.103.57])
 by director3.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 7594B1FE65;
 Wed, 15 Mar 2023 12:51:43 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.107])
 by ghost-submission-6684bf9d7b-gf8xs with ESMTPSA
 id /J2sIF+/EWR+CQAAW2kIng
 (envelope-from <ngraves@HIDDEN>); Wed, 15 Mar 2023 12:51:43 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-107S0014f05d24b-e775-4662-bee9-0b846d223a5d,
 F74D9BBE9ED44B45FF66447495DD0B0753EB5D4A) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 81.67.140.142
From: Nicolas Graves <ngraves@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH 06/21] import: juliahub: Add updater and recursive-importer.
Date: Wed, 15 Mar 2023 13:51:15 +0100
Message-Id: <20230315125130.23041-6-ngraves@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <20230315125130.23041-1-ngraves@HIDDEN>
References: <20230315125130.23041-1-ngraves@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Ovh-Tracer-Id: 13790022061887840994
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvkedggeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepffelffdtieeijedugffgvddvieetheegveehueeggfegleehleekffehtdeuuefhnecuffhomhgrihhnpehjuhhlihgrhhhusgdrtghomhenucfkphepuddvjedrtddrtddruddpfeejrdehledrudegvddruddtjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqpdhnsggprhgtphhtthhopedupdhrtghpthhtohepiedvvddtvdesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheekuddpmhhouggvpehsmhhtphhouhht
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: ngraves@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

---
 guix/import/juliahub.scm | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index fb361a0044..c38c830caa 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -34,7 +34,9 @@ (define-module (guix import juliahub)
   #:use-module (json)
   #:use-module ((guix licenses) #:prefix license:)
 
-  #:export (juliahub->guix-package))
+  #:export (juliahub->guix-package
+            %juliahub-updater
+            juliahub-recursive-import))
 
 (define (juliahub-uri name)
   (let* ((url (string-append "https://docs.juliahub.com/" name "/"))
@@ -197,16 +199,26 @@ (define* (juliahub->guix-package package-name
                     (append dependencies-names test-dependencies-names))))
         (values #f '()))))
 
+(define (guix-package->juliahub-name package)
+  (let* ((url (juliahub-package-url package))
+         (git-name (car (last-pair (string-split url #\/))))
+         (ungitted-name (if (string-suffix? ".git" git-name)
+                            (string-drop-right git-name 4)
+                            git-name))
+         (package-name (if (string-suffix? ".jl" ungitted-name)
+                            (string-drop-right ungitted-name 4)
+                            ungitted-name)))
+    package-name))
+
 (define* (import-release package #:key (version #f))
   "Return an <upstream-source> for the latest release of PACKAGE."
   (let* ((package-name (guix-package->juliahub-name package))
          (package      (juliahub-fetch package-name))
-         (version  (or version (juliahub-version gem)))
-         (url      (rubyjuliahubs-uri gem-name version)))
+         (version  (or version (juliahub-package-version package))))
     (upstream-source
      (package (package-name package))
      (version version)
-     (urls (list url)))))
+     (urls (list (juliahub-package-url package))))))
 
 (define %juliahub-updater
   (upstream-updater
@@ -219,5 +231,5 @@ (define* (juliahub-recursive-import package-name #:optional version)
   (recursive-import package-name
                     #:repo '()
                     #:repo->guix-package juliahub->guix-package
-                    #:guix-name ruby-package-name
+                    #:guix-name julia-name->guix-name
                     #:version version))
-- 
2.39.2





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 15 Mar 2023 12:51:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 15 08:51:49 2023
Received: from localhost ([127.0.0.1]:39303 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pcQbc-0001WS-P3
	for submit <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:51:49 -0400
Received: from 15.mo583.mail-out.ovh.net ([178.33.107.29]:35657)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ngraves@HIDDEN>) id 1pcQbZ-0001VX-5h
 for 62202 <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:51:46 -0400
Received: from director7.ghost.mail-out.ovh.net (unknown [10.109.156.62])
 by mo583.mail-out.ovh.net (Postfix) with ESMTP id 1C97E25D68
 for <62202 <at> debbugs.gnu.org>; Wed, 15 Mar 2023 12:51:42 +0000 (UTC)
Received: from ghost-submission-6684bf9d7b-ljxbb (unknown [10.110.103.232])
 by director7.ghost.mail-out.ovh.net (Postfix) with ESMTPS id B51C91FE62;
 Wed, 15 Mar 2023 12:51:42 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.102])
 by ghost-submission-6684bf9d7b-ljxbb with ESMTPSA
 id bBwSK16/EWQX7B8AwsBWZw
 (envelope-from <ngraves@HIDDEN>); Wed, 15 Mar 2023 12:51:42 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-102R004b2172859-b997-41fb-a03f-501c056b6cc2,
 F74D9BBE9ED44B45FF66447495DD0B0753EB5D4A) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 81.67.140.142
From: Nicolas Graves <ngraves@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH 05/21] import: juliahub: Add indirect dependencies.
Date: Wed, 15 Mar 2023 13:51:14 +0100
Message-Id: <20230315125130.23041-5-ngraves@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <20230315125130.23041-1-ngraves@HIDDEN>
References: <20230315125130.23041-1-ngraves@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Ovh-Tracer-Id: 13789459111543497442
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvkedggeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepleffjeetueethfefkeffffefvddukeejkefgleduiedthfekvefhiedvhfffgeegnecukfhppeduvdejrddtrddtrddupdefjedrheelrddugedvrddutddvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqedpnhgspghrtghpthhtohepuddprhgtphhtthhopeeivddvtddvseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehkeefpdhmohguvgepshhmthhpohhuth
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: ngraves@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

---
 guix/import/juliahub.scm | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index 4c3ceed109..fb361a0044 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -67,6 +67,16 @@ (define (json->juliahub-direct-dependencies vector)
                #f)))
        (vector->list vector))))
 
+(define (json->juliahub-indirect-dependencies vector)
+  (if (vector? vector)
+      (filter-map
+       (lambda (el)
+         (let ((dep (json->juliahub-dependency el)))
+           (if (not (juliahub-dependency-direct? dep))
+               dep
+               #f)))
+       (vector->list vector))))
+
 (define (ini-list->extra-dependencies lst)
   (match lst
     (('(extras) ooo ...)
@@ -103,6 +113,9 @@ (define-json-mapping <juliahub-package> make-juliahub-package juliahub-package?
   (direct-dependencies
    juliahub-package-direct-dependencies "deps"
    json->juliahub-direct-dependencies) ;list of <juliahub-dependency>
+  (indirect-dependencies
+   juliahub-package-indirect-dependencies "deps"
+   json->juliahub-indirect-dependencies) ;list of <juliahub-dependency>
   (url juliahub-package-url) ;string
   (uuid juliahub-package-uuid) ;string
   (license juliahub-package-license)) ;string
@@ -181,7 +194,7 @@ (define* (juliahub->guix-package package-name
                      (juliahub-package-direct-dependencies package)
                      test-dependencies-names
                      licenses)
-                    (append dependencies-names test-dependencies))))
+                    (append dependencies-names test-dependencies-names))))
         (values #f '()))))
 
 (define* (import-release package #:key (version #f))
-- 
2.39.2





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 15 Mar 2023 12:51:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 15 08:51:48 2023
Received: from localhost ([127.0.0.1]:39301 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pcQbc-0001WL-Ft
	for submit <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:51:48 -0400
Received: from 16.mo561.mail-out.ovh.net ([188.165.56.217]:55973)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ngraves@HIDDEN>) id 1pcQbY-0001VV-8Y
 for 62202 <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:51:45 -0400
Received: from director9.ghost.mail-out.ovh.net (unknown [10.109.138.203])
 by mo561.mail-out.ovh.net (Postfix) with ESMTP id 8F12121183
 for <62202 <at> debbugs.gnu.org>; Wed, 15 Mar 2023 12:51:42 +0000 (UTC)
Received: from ghost-submission-6684bf9d7b-vwb8w (unknown [10.110.103.92])
 by director9.ghost.mail-out.ovh.net (Postfix) with ESMTPS id E829D1FE2D;
 Wed, 15 Mar 2023 12:51:41 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.109])
 by ghost-submission-6684bf9d7b-vwb8w with ESMTPSA
 id lXVCNl2/EWRf/SgAlZUlMg
 (envelope-from <ngraves@HIDDEN>); Wed, 15 Mar 2023 12:51:41 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-109S003436170e3-6853-48d7-aee7-31d6a2240de7,
 F74D9BBE9ED44B45FF66447495DD0B0753EB5D4A) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 81.67.140.142
From: Nicolas Graves <ngraves@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH 04/21] import: juliahub: Correct source parsing.
Date: Wed, 15 Mar 2023 13:51:13 +0100
Message-Id: <20230315125130.23041-4-ngraves@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <20230315125130.23041-1-ngraves@HIDDEN>
References: <20230315125130.23041-1-ngraves@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Ovh-Tracer-Id: 13789459113138905826
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvkedggeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepleffjeetueethfefkeffffefvddukeejkefgleduiedthfekvefhiedvhfffgeegnecukfhppeduvdejrddtrddtrddupdefjedrheelrddugedvrddutdelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqedpnhgspghrtghpthhtohepuddprhgtphhtthhopeeivddvtddvseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehiedupdhmohguvgepshhmthhpohhuth
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: ngraves@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

---
 guix/import/juliahub.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index 4544dee980..4c3ceed109 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -160,7 +160,11 @@ (define* (juliahub->guix-package package-name
                      (juliahub-fetch package-name))))
     (if package
         (let-values (((source directory)
-                     (git->origin+dir url `(tag-or-commit . ,package-version))))
+                      (git->origin+dir
+                       (juliahub-package-url package)
+                       `(tag-or-commit
+                         . ,(string-append
+                             "v" (juliahub-package-version package))))))
           (let* ((dependencies-names
                   (map juliahub-dependency-name
                        (juliahub-package-direct-dependencies package)))
-- 
2.39.2





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 15 Mar 2023 12:51:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 15 08:51:48 2023
Received: from localhost ([127.0.0.1]:39299 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pcQbb-0001WI-Vz
	for submit <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:51:48 -0400
Received: from 4.mo576.mail-out.ovh.net ([46.105.42.102]:37665)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ngraves@HIDDEN>) id 1pcQbX-0001VP-C8
 for 62202 <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:51:44 -0400
Received: from director4.ghost.mail-out.ovh.net (unknown [10.109.146.166])
 by mo576.mail-out.ovh.net (Postfix) with ESMTP id 6652926562
 for <62202 <at> debbugs.gnu.org>; Wed, 15 Mar 2023 12:51:41 +0000 (UTC)
Received: from ghost-submission-6684bf9d7b-r6rck (unknown [10.110.115.95])
 by director4.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 016CD1FE9F;
 Wed, 15 Mar 2023 12:51:40 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.105])
 by ghost-submission-6684bf9d7b-r6rck with ESMTPSA
 id YDEWBFy/EWSfBgAA9fVuhw
 (envelope-from <ngraves@HIDDEN>); Wed, 15 Mar 2023 12:51:40 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-105G0067c88f7f9-db12-40e4-ae65-071514e0176c,
 F74D9BBE9ED44B45FF66447495DD0B0753EB5D4A) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 81.67.140.142
From: Nicolas Graves <ngraves@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH 03/21] import: juliahub: Add support for native-inputs.
Date: Wed, 15 Mar 2023 13:51:12 +0100
Message-Id: <20230315125130.23041-3-ngraves@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <20230315125130.23041-1-ngraves@HIDDEN>
References: <20230315125130.23041-1-ngraves@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Ovh-Tracer-Id: 13789177636127498978
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvkedggeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepleffjeetueethfefkeffffefvddukeejkefgleduiedthfekvefhiedvhfffgeegnecukfhppeduvdejrddtrddtrddupdefjedrheelrddugedvrddutdehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqedpnhgspghrtghpthhtohepuddprhgtphhtthhopeeivddvtddvseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehjeeipdhmohguvgepshhmthhpohhuth
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: ngraves@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

---
 guix/import/juliahub.scm | 105 ++++++++++++++++++++++++---------------
 1 file changed, 64 insertions(+), 41 deletions(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index efe6abbb24..4544dee980 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -20,13 +20,14 @@ (define-module (guix import juliahub)
   #:use-module (ice-9 textual-ports)
   #:use-module (ice-9 regex)
   #:use-module (ice-9 match)
+  #:use-module (ice-9 streams)
   #:use-module (ice-9 string-fun)
-  #:use-module (srfi srfi-9)
   #:use-module (srfi srfi-1)
+  #:use-module (srfi srfi-9)
+  #:use-module (srfi srfi-11)
   #:use-module (guix http-client)
   #:use-module (guix import utils)
   #:use-module (guix import json)
-  #:use-module (guix base16)
   #:use-module (guix base32)
   #:use-module (guix packages)
   #:use-module (guix upstream)
@@ -66,19 +67,42 @@ (define (json->juliahub-direct-dependencies vector)
                #f)))
        (vector->list vector))))
 
+(define (ini-list->extra-dependencies lst)
+  (match lst
+    (('(extras) ooo ...)
+     (extra-list->extra-dependencies ooo))
+    (((tag) ooo ...)
+     (ini-list->extra-dependencies ooo))
+    ((attribute '= value ooo ...)
+     (ini-list->extra-dependencies ooo))
+    ('()
+     '())))
+
+(define (extra-list->extra-dependencies lst)
+  (match lst
+    ((attribute '= value ooo ...)
+     `(,(symbol->string attribute) ,@(extra-list->extra-dependencies ooo)))
+    (((tag) ooo ...)
+     '())
+    ('()
+     '())))
+
+(define (parse-extra-dependencies directory)
+  (let* ((port (open-input-file (string-append directory "/Project.toml")))
+         (ini-list (stream->list (port->stream port read))))
+    (close-port port)
+    (ini-list->extra-dependencies ini-list)))
+
 ;; Julia package.
 (define-json-mapping <juliahub-package> make-juliahub-package juliahub-package?
   json->juliahub-package
   (homepage juliahub-package-homepage) ;string
   (readme juliahub-package-readme) ;string
-  ;; (slug juliahub-package-slug) ;string
   (version juliahub-package-version) ;string
   (description juliahub-package-description) ;string
-  (dependencies
-   juliahub-package-dependencies "deps"
+  (direct-dependencies
+   juliahub-package-direct-dependencies "deps"
    json->juliahub-direct-dependencies) ;list of <juliahub-dependency>
-   ;; (lambda (vector)
-     ;; (map json->juliahub-dependency (vector->list vector))))
   (url juliahub-package-url) ;string
   (uuid juliahub-package-uuid) ;string
   (license juliahub-package-license)) ;string
@@ -90,7 +114,6 @@ (define-json-mapping <juliahub-dependency>
   (name juliahub-dependency-name) ;string
   (uuid juliahub-dependency-uuid) ;string
   (versions juliahub-dependency-versions "versions" vector->list)) ;list of strings
-  ;; (slug juliahub-dependency-slug) ;string
 
 (define (julia-name->guix-name name)
   (string-append "julia-" (snake-case name)))
@@ -100,27 +123,25 @@ (define* (juliahub-fetch name #:key (version #f))
   (and=> (json-fetch (string-append (juliahub-url name) "pkg.json"))
          json->juliahub-package))
 
-(define (make-julia-sexp name version uri hash home-page synopsis description
-                         dependencies licenses)
+(define (make-julia-sexp name source home-page synopsis description
+                         direct-dependencies test-dependencies-names licenses)
   "Return the `package' s-expression for a Julia package with the given NAME,
-VERSION, URI, HASH, HOME-PAGE, DESCRIPTION, DEPENDENCIES, and LICENSES."
+VERSION, URI, HASH, HOME-PAGE, DESCRIPTION, DEPENDENCIES,
+TEST-DEPENDENCIES-NAMES and LICENSES."
   `(package
      (name ,(julia-name->guix-name name))
      (version ,version)
-     (source (origin
-               (method url-fetch)
-               (uri ,uri)
-               (sha256
-                (base32
-                 "0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5"
-                 ;; ,(bytevector->nix-base32-string hash)
-                 ))))
+     (source ,source)
      (build-system julia-build-system)
-     ,@(if (null? dependencies)
+     ,@(if (null? direct-dependencies)
            '()
-           `((inputs
+           `((propagated-inputs
               (list ,@(map (compose julia-name->guix-name juliahub-dependency-name)
-                           dependencies)))))
+                           direct-dependencies)))))
+     ,@(if (null? test-dependencies-names)
+           '()
+           `((native-inputs
+              (list ,@(map julia-name->guix-name test-dependencies-names)))))
      (synopsis ,synopsis)
      (description ,description)
      (home-page ,home-page)
@@ -135,26 +156,28 @@ (define* (juliahub->guix-package package-name
 `package' s-expression corresponding to that package, or #f on failure.
 Optionally include a VERSION string to fetch a specific version juliahub."
   (let ((package (if version
-                      (juliahub-fetch package-name version)
-                      (juliahub-fetch package-name))))
+                     (juliahub-fetch package-name version)
+                     (juliahub-fetch package-name))))
     (if package
-        (let* ((dependencies-names
-                (map juliahub-dependency-name
-                     (juliahub-package-dependencies package)))
-               (licenses
-                (map spdx-string->license
-                     (list (juliahub-package-license package)))))
-          (values (make-julia-sexp
-                   package-name
-                   (juliahub-package-version package)
-                   (juliahub-package-url package)
-                   "0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5"
-                   (juliahub-package-homepage package)
-                   (juliahub-package-description package)
-                   (beautify-description (juliahub-package-readme package))
-                   (juliahub-package-dependencies package)
-                   licenses)
-                  dependencies-names))
+        (let-values (((source directory)
+                     (git->origin+dir url `(tag-or-commit . ,package-version))))
+          (let* ((dependencies-names
+                  (map juliahub-dependency-name
+                       (juliahub-package-direct-dependencies package)))
+                 (licenses
+                  (map spdx-string->license
+                       (list (juliahub-package-license package))))
+                 (test-dependencies-names (parse-extra-dependencies directory)))
+            (values (make-julia-sexp
+                     package-name
+                     source
+                     (juliahub-package-homepage package)
+                     (juliahub-package-description package)
+                     (beautify-description (juliahub-package-readme package))
+                     (juliahub-package-direct-dependencies package)
+                     test-dependencies-names
+                     licenses)
+                    (append dependencies-names test-dependencies))))
         (values #f '()))))
 
 (define* (import-release package #:key (version #f))
-- 
2.39.2





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 15 Mar 2023 12:51:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 15 08:51:46 2023
Received: from localhost ([127.0.0.1]:39295 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pcQbZ-0001Vh-9L
	for submit <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:51:45 -0400
Received: from 7.mo560.mail-out.ovh.net ([188.165.48.182]:58983)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ngraves@HIDDEN>) id 1pcQbV-0001VN-GV
 for 62202 <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:51:42 -0400
Received: from director9.ghost.mail-out.ovh.net (unknown [10.108.4.60])
 by mo560.mail-out.ovh.net (Postfix) with ESMTP id C19E420C7E
 for <62202 <at> debbugs.gnu.org>; Wed, 15 Mar 2023 12:51:39 +0000 (UTC)
Received: from ghost-submission-6684bf9d7b-lqxrt (unknown [10.110.115.9])
 by director9.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 114611FE98;
 Wed, 15 Mar 2023 12:51:38 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.103])
 by ghost-submission-6684bf9d7b-lqxrt with ESMTPSA
 id lnghCFq/EWTd1wAA847UKw
 (envelope-from <ngraves@HIDDEN>); Wed, 15 Mar 2023 12:51:38 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-103G005a188a3de-ed7c-44b7-9f37-8c222b24d13f,
 F74D9BBE9ED44B45FF66447495DD0B0753EB5D4A) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 81.67.140.142
From: Nicolas Graves <ngraves@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH 02/21] import: utils: Change git->origin function to
 git->origin+version.
Date: Wed, 15 Mar 2023 13:51:11 +0100
Message-Id: <20230315125130.23041-2-ngraves@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <20230315125130.23041-1-ngraves@HIDDEN>
References: <20230315125130.23041-1-ngraves@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Ovh-Tracer-Id: 13788614688387621602
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvkedggeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepfefgvdfhuedtffelffdvfefftdeffeefudfgfeegheffieeuueegvdduheefteffnecuffhomhgrihhnpehsphgugidrohhrghenucfkphepuddvjedrtddrtddruddpfeejrdehledrudegvddruddtfeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqpdhnsggprhgtphhtthhopedupdhrtghpthhtohepiedvvddtvdesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheeitddpmhhouggvpehsmhhtphhouhht
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: ngraves@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

---
 guix/import/go.scm    |  2 +-
 guix/import/utils.scm | 50 +++++++++++++++++++++++++++----------------
 2 files changed, 33 insertions(+), 19 deletions(-)

diff --git a/guix/import/go.scm b/guix/import/go.scm
index f264715fbd..3be82ed164 100644
--- a/guix/import/go.scm
+++ b/guix/import/go.scm
@@ -510,7 +510,7 @@ (define* (vcs->origin vcs-type vcs-repo-url version
 which takes version as an input."
   (case vcs-type
     ((git)
-     (git->origin vcs-repo-url `(tag-or-commit . ,version) transform-version))
+      (git->origin vcs-repo-url `(tag-or-commit . ,version) transform-version))
     ((hg)
      `(origin
         (method hg-fetch)
diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index 529d7f11f8..171dca54e8 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -65,6 +65,7 @@ (define-module (guix import utils)
 
             url-fetch
             guix-hash-url
+            git->origin+dir
             git->origin
 
             package-names->package-inputs
@@ -156,9 +157,12 @@ (define (guix-hash-url filename)
   "Return the hash of FILENAME in nix-base32 format."
   (bytevector->nix-base32-string (file-sha256 filename)))
 
-(define* (git->origin repo-url ref #:optional ref->commit)
-  "Generate the `origin' block of a package depending on the git source
-control system. REPO-URL or REF can be null."
+(define* (git->origin+dir repo-url ref #:optional ref->commit)
+  "Returns a generated `origin' block of a package depending on the git source
+control system, and the directory in the store where the package has been
+downloaded, in case further processing is necessary.  REPO-URL or REF can be
+null. REF->COMMIT can be a function or #t, in which case the commit matching
+ref is used. If REF->COMMIT is not used, the value inside REF is used."
   (let-values (((directory commit)
                 (with-store store
                   (latest-repository-commit store repo-url #:ref ref))))
@@ -172,21 +176,31 @@ (define* (git->origin repo-url ref #:optional ref->commit)
                        version)
                       (_
                        (ref->commit version)))))
-      `(origin
-         (method git-fetch)
-         (uri (git-reference
-               (url ,(and (not (eq? repo-url 'null)) repo-url))
-               (commit ,vcommit)))
-         (file-name (git-file-name name version))
-         (sha256
-          (base32
-           ,(if (pair? ref)
-                (bytevector->nix-base32-string
-                 (file-hash* directory
-                             ;; 'git-fetch' already filtered out the '.git' directory.
-                             #:select? (const #true)
-                             #:recursive? #true))
-                #f)))))))
+      (values
+       `(origin
+          (method git-fetch)
+          (uri (git-reference
+                (url ,(and (not (eq? repo-url 'null)) repo-url))
+                (commit ,vcommit)))
+          (file-name (git-file-name name version))
+          (sha256
+           (base32
+            ,(if (pair? ref)
+                 (bytevector->nix-base32-string
+                  (file-hash* directory
+                              ;; 'git-fetch' already filtered out the '.git' directory.
+                              #:select? (const #true)
+                              #:recursive? #true))
+                 #f))))
+       directory))))
+
+(define* (git->origin repo-url ref #:optional ref->commit)
+  "Returns a generated `origin' block of a package depending on the git source
+control system.  REPO-URL or REF can be null. REF->COMMIT can be a function or
+#t, in which case the commit matching ref is used. If REF->COMMIT is not used,
+the value inside REF is used."
+  (let-values (((origin _) (git->origin+dir repo-url ref ref->commit)))
+    origin))
 
 (define %spdx-license-identifiers
   ;; https://spdx.org/licenses/
-- 
2.39.2





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at 62202 <at> debbugs.gnu.org:


Received: (at 62202) by debbugs.gnu.org; 15 Mar 2023 12:51:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 15 08:51:45 2023
Received: from localhost ([127.0.0.1]:39290 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pcQbW-0001VO-0I
	for submit <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:51:45 -0400
Received: from 12.mo550.mail-out.ovh.net ([87.98.162.229]:37163)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ngraves@HIDDEN>) id 1pcQbS-0001VD-SL
 for 62202 <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:51:40 -0400
Received: from director7.ghost.mail-out.ovh.net (unknown [10.109.156.73])
 by mo550.mail-out.ovh.net (Postfix) with ESMTP id 790D8260F8
 for <62202 <at> debbugs.gnu.org>; Wed, 15 Mar 2023 12:51:37 +0000 (UTC)
Received: from ghost-submission-6684bf9d7b-r6rck (unknown [10.111.208.134])
 by director7.ghost.mail-out.ovh.net (Postfix) with ESMTPS id CDC3A1FE59;
 Wed, 15 Mar 2023 12:51:35 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.108])
 by ghost-submission-6684bf9d7b-r6rck with ESMTPSA
 id 44hPNVe/EWSQBgAA9fVuhw
 (envelope-from <ngraves@HIDDEN>); Wed, 15 Mar 2023 12:51:35 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-108S002b48fa032-bfe0-4244-9314-0f7f72124386,
 F74D9BBE9ED44B45FF66447495DD0B0753EB5D4A) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 81.67.140.142
From: Nicolas Graves <ngraves@HIDDEN>
To: 62202 <at> debbugs.gnu.org
Subject: [PATCH 01/21] import: juliahub: first script draft.
Date: Wed, 15 Mar 2023 13:51:10 +0100
Message-Id: <20230315125130.23041-1-ngraves@HIDDEN>
X-Mailer: git-send-email 2.39.2
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Ovh-Tracer-Id: 13788051735402439394
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvkedggeefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffogggtgfesthekredtredtjeenucfhrhhomheppfhitgholhgrshcuifhrrghvvghsuceonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqeenucggtffrrghtthgvrhhnpeelvdetleduhffgtdefffeltddugffhhffftddvieelueefffelheffgfejtdfgleenucffohhmrghinhepghhnuhdrohhrghdpjhhulhhirghhuhgsrdgtohhmpdhjuhhlihgrhhhusgdrohhrghenucfkphepuddvjedrtddrtddruddpfeejrdehledrudegvddruddtkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqpdhnsggprhgtphhtthhopedupdhrtghpthhtohepiedvvddtvdesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheehtddpmhhouggvpehsmhhtphhouhht
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62202
Cc: ngraves@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

---
 guix/import/go.scm               |   6 +-
 guix/import/juliahub.scm         | 183 +++++++++++++++++++++++++++++++
 guix/scripts/import.scm          |   2 +-
 guix/scripts/import/juliahub.scm | 107 ++++++++++++++++++
 4 files changed, 295 insertions(+), 3 deletions(-)
 create mode 100644 guix/import/juliahub.scm
 create mode 100644 guix/scripts/import/juliahub.scm

diff --git a/guix/import/go.scm b/guix/import/go.scm
index 69937f8a4d..f264715fbd 100644
--- a/guix/import/go.scm
+++ b/guix/import/go.scm
@@ -503,9 +503,11 @@ (define (transform-version version)
         '(string-append "v" version)
         '(go-version->git-ref version))))
 
-(define (vcs->origin vcs-type vcs-repo-url version)
+(define* (vcs->origin vcs-type vcs-repo-url version
+                      #:optional transform-version)
   "Generate the `origin' block of a package depending on what type of source
-control system is being used."
+control system is being used. Optionally use the function TRANSFORM-VERSION
+which takes version as an input."
   (case vcs-type
     ((git)
      (git->origin vcs-repo-url `(tag-or-commit . ,version) transform-version))
diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
new file mode 100644
index 0000000000..efe6abbb24
--- /dev/null
+++ b/guix/import/juliahub.scm
@@ -0,0 +1,183 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2023 Nicolas Graves <ngraves@HIDDEN>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (guix import juliahub)
+  #:use-module (ice-9 textual-ports)
+  #:use-module (ice-9 regex)
+  #:use-module (ice-9 match)
+  #:use-module (ice-9 string-fun)
+  #:use-module (srfi srfi-9)
+  #:use-module (srfi srfi-1)
+  #:use-module (guix http-client)
+  #:use-module (guix import utils)
+  #:use-module (guix import json)
+  #:use-module (guix base16)
+  #:use-module (guix base32)
+  #:use-module (guix packages)
+  #:use-module (guix upstream)
+  #:use-module (json)
+  #:use-module ((guix licenses) #:prefix license:)
+
+  #:export (juliahub->guix-package))
+
+(define (juliahub-uri name)
+  (let* ((url (string-append "https://docs.juliahub.com/" name "/"))
+         (port (http-fetch url #:text? #t))
+         (_ (get-line port))
+         (meta (get-line port))
+         (regex "url=[a-zA-Z0-9]{5}\\/[0-9\\.]*")
+         (redirect (match:substring (string-match regex meta))))
+    (close-port port)
+    (string-drop redirect 4)))
+
+(define (juliahub-url name)
+  (let* ((url (string-append "https://docs.juliahub.com/" name "/"))
+         (uri (juliahub-uri name)))
+    (string-append url uri "/")))
+
+(define (juliahub-slug-version name)
+  (let* ((uri (juliahub-uri name))
+         (slug (string-take uri 5))
+         (latest-version (string-drop uri 6)))
+    `(,slug ,latest-version)))
+
+(define (json->juliahub-direct-dependencies vector)
+  (if (vector? vector)
+      (filter-map
+       (lambda (el)
+         (let ((dep (json->juliahub-dependency el)))
+           (if (juliahub-dependency-direct? dep)
+               dep
+               #f)))
+       (vector->list vector))))
+
+;; Julia package.
+(define-json-mapping <juliahub-package> make-juliahub-package juliahub-package?
+  json->juliahub-package
+  (homepage juliahub-package-homepage) ;string
+  (readme juliahub-package-readme) ;string
+  ;; (slug juliahub-package-slug) ;string
+  (version juliahub-package-version) ;string
+  (description juliahub-package-description) ;string
+  (dependencies
+   juliahub-package-dependencies "deps"
+   json->juliahub-direct-dependencies) ;list of <juliahub-dependency>
+   ;; (lambda (vector)
+     ;; (map json->juliahub-dependency (vector->list vector))))
+  (url juliahub-package-url) ;string
+  (uuid juliahub-package-uuid) ;string
+  (license juliahub-package-license)) ;string
+
+(define-json-mapping <juliahub-dependency>
+  make-juliahub-dependency juliahub-dependency?
+  json->juliahub-dependency
+  (direct? juliahub-dependency-direct? "direct") ;boolean
+  (name juliahub-dependency-name) ;string
+  (uuid juliahub-dependency-uuid) ;string
+  (versions juliahub-dependency-versions "versions" vector->list)) ;list of strings
+  ;; (slug juliahub-dependency-slug) ;string
+
+(define (julia-name->guix-name name)
+  (string-append "julia-" (snake-case name)))
+
+(define* (juliahub-fetch name #:key (version #f))
+  "Return a <juliahub-package> record for package NAME, or #f on failure."
+  (and=> (json-fetch (string-append (juliahub-url name) "pkg.json"))
+         json->juliahub-package))
+
+(define (make-julia-sexp name version uri hash home-page synopsis description
+                         dependencies licenses)
+  "Return the `package' s-expression for a Julia package with the given NAME,
+VERSION, URI, HASH, HOME-PAGE, DESCRIPTION, DEPENDENCIES, and LICENSES."
+  `(package
+     (name ,(julia-name->guix-name name))
+     (version ,version)
+     (source (origin
+               (method url-fetch)
+               (uri ,uri)
+               (sha256
+                (base32
+                 "0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5"
+                 ;; ,(bytevector->nix-base32-string hash)
+                 ))))
+     (build-system julia-build-system)
+     ,@(if (null? dependencies)
+           '()
+           `((inputs
+              (list ,@(map (compose julia-name->guix-name juliahub-dependency-name)
+                           dependencies)))))
+     (synopsis ,synopsis)
+     (description ,description)
+     (home-page ,home-page)
+     (license ,(match licenses
+                 (() #f)
+                 ((license) (license->symbol license))
+                 (_ `(list ,@(map license->symbol licenses)))))))
+
+(define* (juliahub->guix-package package-name
+                                 #:key version #:allow-other-keys)
+  "Fetch the metadata for PACKAGE-NAME from juliahub.org, and return the
+`package' s-expression corresponding to that package, or #f on failure.
+Optionally include a VERSION string to fetch a specific version juliahub."
+  (let ((package (if version
+                      (juliahub-fetch package-name version)
+                      (juliahub-fetch package-name))))
+    (if package
+        (let* ((dependencies-names
+                (map juliahub-dependency-name
+                     (juliahub-package-dependencies package)))
+               (licenses
+                (map spdx-string->license
+                     (list (juliahub-package-license package)))))
+          (values (make-julia-sexp
+                   package-name
+                   (juliahub-package-version package)
+                   (juliahub-package-url package)
+                   "0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5"
+                   (juliahub-package-homepage package)
+                   (juliahub-package-description package)
+                   (beautify-description (juliahub-package-readme package))
+                   (juliahub-package-dependencies package)
+                   licenses)
+                  dependencies-names))
+        (values #f '()))))
+
+(define* (import-release package #:key (version #f))
+  "Return an <upstream-source> for the latest release of PACKAGE."
+  (let* ((package-name (guix-package->juliahub-name package))
+         (package      (juliahub-fetch package-name))
+         (version  (or version (juliahub-version gem)))
+         (url      (rubyjuliahubs-uri gem-name version)))
+    (upstream-source
+     (package (package-name package))
+     (version version)
+     (urls (list url)))))
+
+(define %juliahub-updater
+  (upstream-updater
+   (name 'juliahub)
+   (description "Updater for Juliahub packages")
+   (pred juliahub-package?)
+   (import import-release)))
+
+(define* (juliahub-recursive-import package-name #:optional version)
+  (recursive-import package-name
+                    #:repo '()
+                    #:repo->guix-package juliahub->guix-package
+                    #:guix-name ruby-package-name
+                    #:version version))
diff --git a/guix/scripts/import.scm b/guix/scripts/import.scm
index f84a964a53..ef4e0b9cc6 100644
--- a/guix/scripts/import.scm
+++ b/guix/scripts/import.scm
@@ -47,7 +47,7 @@ (define %standard-import-options '())
 
 (define importers '("gnu" "pypi" "cpan" "hackage" "stackage" "egg" "elpa"
                     "gem" "go" "cran" "crate" "texlive" "json" "opam"
-                    "minetest" "elm" "hexpm"))
+                    "minetest" "elm" "hexpm" "juliahub"))
 
 (define (resolve-importer name)
   (let ((module (resolve-interface
diff --git a/guix/scripts/import/juliahub.scm b/guix/scripts/import/juliahub.scm
new file mode 100644
index 0000000000..1317c67aa3
--- /dev/null
+++ b/guix/scripts/import/juliahub.scm
@@ -0,0 +1,107 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2023 Nicolas Graves <ngraves@HIDDEN>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (guix scripts import juliahub)
+  #:use-module (guix ui)
+  #:use-module (guix utils)
+  #:use-module (guix scripts)
+  #:use-module (guix import juliahub)
+  #:use-module (guix scripts import)
+  #:use-module (srfi srfi-1)
+  #:use-module (srfi srfi-11)
+  #:use-module (srfi srfi-37)
+  #:use-module (ice-9 match)
+  #:use-module (ice-9 format)
+  #:use-module (ice-9 receive)
+  #:export (guix-import-juliahub))
+
+
+;;;
+;;; Command-line options.
+;;;
+
+(define %default-options
+  '())
+
+(define (show-help)
+  (display (G_ "Usage: guix import juliahub PACKAGE-NAME[@VERSION] Import and
+convert the Julia package for PACKAGE-NAME.  Optionally, a version can be
+specified after the at-sign (@) character.\n"))
+  (display (G_ "
+  -h, --help             display this help and exit"))
+  (display (G_ "
+  -V, --version          display version information and exit"))
+  (display (G_ "
+  -r, --recursive        generate package expressions for all Gem packages\
+ that are not yet in Guix"))
+  (newline)
+  (show-bug-report-information))
+
+(define %options
+  ;; Specification of the command-line options.
+  (cons* (option '(#\h "help") #f #f
+                 (lambda args
+                   (show-help)
+                   (exit 0)))
+         (option '(#\V "version") #f #f
+                 (lambda args
+                   (show-version-and-exit "guix import gem")))
+         (option '(#\r "recursive") #f #f
+                 (lambda (opt name arg result)
+                   (alist-cons 'recursive #t result)))
+         %standard-import-options))
+
+
+;;;
+;;; Entry point.
+;;;
+
+(define (guix-import-juliahub . args)
+  (define (parse-options)
+    ;; Return the alist of option values.
+    (parse-command-line args %options (list %default-options)
+                        #:build-options? #f))
+
+  (let* ((opts (parse-options))
+         (args (filter-map (match-lambda
+                             (('argument . value)
+                              value)
+                             (_ #f))
+                           (reverse opts))))
+    (match args
+      ((spec)
+       (receive (package-name package-version)
+           (package-name->name+version spec)
+         (let ((code (if (assoc-ref opts 'recursive)
+                         (map (match-lambda
+                                ((and ('package ('name name) . rest) pkg)
+                                 `(define-public ,(string->symbol name)
+                                    ,pkg))
+                                (_ #f))
+                              (juliahub-recursive-import package-name package-version))
+                         (let ((sexp (juliahub->guix-package package-name #:version package-version)))
+                           (if sexp sexp #f)))))
+           (match code
+             ((or #f '(#f))
+              (leave (G_ "failed to download meta-data for package '~a'~%")
+                     package-name))
+             (_ code)))))
+      (()
+       (leave (G_ "too few arguments~%")))
+      ((many ...)
+       (leave (G_ "too many arguments~%"))))))
-- 
2.39.2





Information forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 15 Mar 2023 12:48:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 15 08:48:09 2023
Received: from localhost ([127.0.0.1]:39284 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pcQY5-0001Ot-Da
	for submit <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:48:09 -0400
Received: from lists.gnu.org ([209.51.188.17]:38598)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ngraves@HIDDEN>) id 1pcQY4-0001Of-Bh
 for submit <at> debbugs.gnu.org; Wed, 15 Mar 2023 08:48:08 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ngraves@HIDDEN>)
 id 1pcQY3-0002y4-CE
 for guix-patches@HIDDEN; Wed, 15 Mar 2023 08:48:08 -0400
Received: from 14.mo581.mail-out.ovh.net ([178.33.251.19])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ngraves@HIDDEN>)
 id 1pcQXz-0002DF-J1
 for guix-patches@HIDDEN; Wed, 15 Mar 2023 08:48:06 -0400
Received: from director1.ghost.mail-out.ovh.net (unknown [10.108.20.52])
 by mo581.mail-out.ovh.net (Postfix) with ESMTP id B5C9B23398
 for <guix-patches@HIDDEN>; Wed, 15 Mar 2023 12:47:58 +0000 (UTC)
Received: from ghost-submission-6684bf9d7b-8fdxs (unknown [10.110.171.163])
 by director1.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 4D80E1FE63
 for <guix-patches@HIDDEN>; Wed, 15 Mar 2023 12:47:57 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.102])
 by ghost-submission-6684bf9d7b-8fdxs with ESMTPSA
 id R81WF32+EWTamC4AHYa+Aw (envelope-from <ngraves@HIDDEN>)
 for <guix-patches@HIDDEN>; Wed, 15 Mar 2023 12:47:57 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-102R00448963981-de49-47c0-9c47-555e4e9c91f5,
 F74D9BBE9ED44B45FF66447495DD0B0753EB5D4A) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 81.67.140.142
From: Nicolas Graves <ngraves@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH 0/21] Juliahub import script.
Date: Wed, 15 Mar 2023 13:47:56 +0100
Message-ID: <871qlq89kz.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Ovh-Tracer-Id: 13726408716885222138
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvkedggeefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvffufffkgggtsehttdertddttddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepueejleeileejfffhleetjedtleejheevudffleevgfdufeekhefgvddvveegveefnecukfhppeduvdejrddtrddtrddupdefjedrheelrddugedvrddutddvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqedpnhgspghrtghpthhtohepuddprhgtphhtthhopehguhhigidqphgrthgthhgvshesghhnuhdrohhrghdpoffvtefjohhsthepmhhoheekuddpmhhouggvpehsmhhtphhouhht
Received-SPF: pass client-ip=178.33.251.19; envelope-from=ngraves@HIDDEN;
 helo=14.mo581.mail-out.ovh.net
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)


 Hi guix!

 Took me quite more time than I would've liked, but I have a usable
 juliahub scheme import script!

 It seems there's still one edge case that isn't covered and revolves
 around when Julia packagers don't properly tag their git repos (I've
 only seen the case with SnoopPrecompile). There's the possibility to
 rely on tree commit hashes from the General repository (since this is a
 valid way to identify/store a git repo), but that needs some major
 changes in the way latest-repository-commit works. Otherwise, it needs
 to be done by hand. It might also not work for subpackages in
 directories that are up-to-date on juliahub but not yet on github, I
 haven't met this case yet.

 I'm sending a patch series in the coming minutes.

It's detailed since I haven't swauased all commits, for readability, but
I can squash it further if necessary.

-- 
Best regards,
Nicolas Graves




Acknowledgement sent to Nicolas Graves <ngraves@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#62202; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 20 Jan 2024 12:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.