From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id MAo9H/SRCGWWdwAAG6o9tA:P1 (envelope-from ) for ; Mon, 18 Sep 2023 20:07:48 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id MAo9H/SRCGWWdwAAG6o9tA (envelope-from ) for ; Mon, 18 Sep 2023 20:07:48 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 324B251644 for ; Mon, 18 Sep 2023 20:07:48 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=X1ShXj39; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1695060468; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=ztz1RPjEh+K0rOlxYL3bQHgKm/dUmaijlCwTDzOT3tM=; b=IhR3qMwNsvuuSH/41uXCDbWSltDKLPg6uhLI13F3HmpuIf/amf/vRHL7+aQtx88pMx5WZ5 lLlueO6C1Qi/36/MHYwiPLa71IUzg/C4XWjWRD1M0huHkcUl/lfP8qvwHG7EKQlmg4WmCa pJ9dhbiVw+h0lOqbmLZco2k888XYyNfbejOdke50pC/fVjN2IHlxX+AEkOhvmm89THSXMM VBSv1NFLNxrw2NmuF8UVSHggr1ReXYROmDi5AqtSay8PVNzZ8fGBnyAcwIxcKpIXL3WoEw aCXqHtbyY2O159D+NUJn/Ha++sGnRnEsAVbnaFRMEgibSoUWXo45BQ6HNPeCHA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1695060468; a=rsa-sha256; cv=none; b=IwxxNxsR5oo+je1zKsMongth8WMiGnE5HyCcdiTmSPtP1SWsit5gDFQ/T6BcoUqfzZq+D7 psK3wgrn6YLUonMI51QKUZI/NnBW/wygeIyODEkd9MLSBWrc3w43BhyI2L5s4xEcV1eWcb mv4WMmV3Phyhd7ZJx4/t+Z4rhMcvqx+YFKRNyvzkedD3l7yJxykxseya1EQBmO5JnFB7Vm PIV7rp23+TRlQf+H3UTbx8uWR+02JewY7vjiziWuP8awIA7wTw5yQ6eEMBwOdIXhQ3Do3U /sxdsXnT7WIUnIuWFjz7hXmv1F8hMuWPr4KyuZNNbs+MUpmaeEKCPr0DOAEZfA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=X1ShXj39; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qiIdY-0005NL-44; Mon, 18 Sep 2023 14:06:20 -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 ) id 1qiIdJ-00059e-J9 for guix-patches@gnu.org; Mon, 18 Sep 2023 14:06:06 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qiIdJ-00045b-B4 for guix-patches@gnu.org; Mon, 18 Sep 2023 14:06:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qiIdR-0002Wj-KV for guix-patches@gnu.org; Mon, 18 Sep 2023 14:06:13 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66090] [PATCH v2 08/23] DRAFT import: juliahub: Add updater and recursive-importer. Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 18 Sep 2023 18:06:13 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 66090 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62202@debbugs.gnu.org Cc: 66090@debbugs.gnu.org, zimon.toutoune@gmail.com X-Debbugs-Original-Cc: Nicolas Graves via Guix-patches via , Simon Tournier Received: via spool by submit@debbugs.gnu.org id=B.16950603649508 (code B ref -1); Mon, 18 Sep 2023 18:06:13 +0000 Received: (at submit) by debbugs.gnu.org; 18 Sep 2023 18:06:04 +0000 Received: from localhost ([127.0.0.1]:54486 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qiIdH-0002T7-FE for submit@debbugs.gnu.org; Mon, 18 Sep 2023 14:06:03 -0400 Received: from lists.gnu.org ([2001:470:142::17]:58376) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qiIbl-0002KT-Uu for submit@debbugs.gnu.org; Mon, 18 Sep 2023 14:04:30 -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 ) id 1qiIbK-0002T8-Dx for guix-patches@gnu.org; Mon, 18 Sep 2023 14:04:05 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qiIb4-0003PH-0U for guix-patches@gnu.org; Mon, 18 Sep 2023 14:04:02 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-40506bfca64so5345575e9.0 for ; Mon, 18 Sep 2023 11:03:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695060223; x=1695665023; darn=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=X1ShXj39hCyBsJd6+2cV67MfuASyfbsNoo102funRLeK1H7MRYE2yMdaf97UhIWglF LECrRCEb2VymOen+jm1AGP0FjZH+kOVfzhTJjLA1OBzVPFmqDvYFnAoSRzMyTShybDnO UDkgwRduWc952GhbF7SAA8RyB9D6uYQ5kCdwoNyM3+leBHdxWP1FJgYsx4FuxqzKFUME 3H25GBj2lBqECQ1yeVwR+F0LYd/119wcV3PvneZl/SBLR3ECkL/Bwdit9TtKs6JhPqjz EY7CDIx+V1EdTI7dBGPjX+zf0am9+knUNpRwrsEaJwXHZRLLblpdEr2VMmO8f0aSub7T jJvA== 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=r8CdWrzlBSPzL8FBkfABhTmw4i7KiOlBYzwVPHOJF7nng28gvoFYsQXkj3K9ifV93Z cRHg1gstIr7IyVpbdr8AtROTItzOKBf9f2hkcVgAvyQRs8UNmMOVF/WYOxopqVDScbvK oSCkh0jC28N7A9UIBha2MxrCVPLgzJtfjBwahXMFAVMu6F0zpakHjICJWmdkCsxfuWut YNR2jKTWOQBCj0/t3kxKcqHMkkjl/0DjkF1izXR/5JwQmxdIOGAxirT6ulf+WuAjEkH+ VoxJ9gl4VFeQnm5UmvGRhfXeaJrZbnOKzZNeOxA+lwlFg5ylMq6JEFHYHbJ8hOscqq9T hJpg== X-Gm-Message-State: AOJu0Yyzo/AUTwgktKeLbWxZ5UcqBzXcZFphhFERSsypUdNNWEx7qiAD rNcpmQCiGwOMhLBkrok68QeuDa5uuDQ= 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 Date: Mon, 18 Sep 2023 20:03:15 +0200 Message-Id: <26c9a5ca41ad1697225de11b5513fcfe04d26f71.1695060058.git.zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=zimon.toutoune@gmail.com; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: 6.25 X-Spam-Score: 6.25 X-Migadu-Queue-Id: 324B251644 X-Migadu-Scanner: mx0.migadu.com X-TUID: 3NGJHzwiIXCX From: Nicolas Graves via Guix-patches via Signed-off-by: Simon Tournier --- 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 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