From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id uG3KKOJzFWBBUAAA0tVLHw (envelope-from ) for ; Sat, 30 Jan 2021 14:57:38 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id KFSCJOJzFWAwKQAAbx9fmQ (envelope-from ) for ; Sat, 30 Jan 2021 14:57:38 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 690CF940415 for ; Sat, 30 Jan 2021 14:57:38 +0000 (UTC) Received: from localhost ([::1]:36838 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5rgv-0005xb-42 for larch@yhetil.org; Sat, 30 Jan 2021 09:57:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39102) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5rZa-0002hT-TB for guix-patches@gnu.org; Sat, 30 Jan 2021 09:50:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:42831) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5rZa-0005FH-HU for guix-patches@gnu.org; Sat, 30 Jan 2021 09:50:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l5rZa-0007wj-FA for guix-patches@gnu.org; Sat, 30 Jan 2021 09:50:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45972] Julia importer? Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 30 Jan 2021 14:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45972 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: =?UTF-8?Q?Nicol=C3=B2?= Balzarotti , Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 45972-submit@debbugs.gnu.org id=B45972.161201815030471 (code B ref 45972); Sat, 30 Jan 2021 14:50:02 +0000 Received: (at 45972) by debbugs.gnu.org; 30 Jan 2021 14:49:10 +0000 Received: from localhost ([127.0.0.1]:54377 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5rYj-0007vP-Ub for submit@debbugs.gnu.org; Sat, 30 Jan 2021 09:49:10 -0500 Received: from mail-wr1-f46.google.com ([209.85.221.46]:46483) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5rYf-0007uv-WE for 45972@debbugs.gnu.org; Sat, 30 Jan 2021 09:49:08 -0500 Received: by mail-wr1-f46.google.com with SMTP id q7so11749912wre.13 for <45972@debbugs.gnu.org>; Sat, 30 Jan 2021 06:49:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=XMxcnGJBZ5rgJTWnhr5HCxkmMEmYPQX6OlyQlU4V6nM=; b=ptvn/u63iLXV+Iuu41BilPx4ZWQESWID1f3poN52nw1IuYqT5v7KXHRJdN5io0zAu6 N7QD4oE0yGp0X7Y5o5ZeGz/I5KLoS7WRpfCFCxPaqXmh3E008kyED70ukm6NF58Z6Cah IIeSsjvwvGzB8csHUnQDr9DJyalCXJ7GTjgxRycGCComlD1ohX+VywZuOskmKqhRZxEY dqx/HbzAivVrnYvHoyYp5Iv9Qt4pYZktClWmYRlY+g1Cbo0YAEWOOyaXBC8lvD59tVzt gsDuUpHjCM5XLHc3edKOIH4Wi3b0UjD02ldrwDidapILJHIkXPjWBataOW4wL1sjU7Ow zK5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=XMxcnGJBZ5rgJTWnhr5HCxkmMEmYPQX6OlyQlU4V6nM=; b=f+va9M6koCCl0WRwWCvW5UvV7t7NKSP0UCl/PKLkAbxWO8NZmaEDT/mUB/a3uFykum 42Sj1WMkhxUPzEVIB8f/uExax0wMB5lNgZOj6DSxC4CKXq7rAtqnrBCMaEp5qkPvz4/J aVvx0EEB4k7jr47y+kzmukvbQzBYwYpPKSOfvuDK8VdXCipZipq0HjDBL71sCCbyAGUY NBLvXihEIITEdgurxcvPAfcUlakXGhVb1gZZ1FIDdt6jjl+j7XR9ZZ5Fw7AS1zMFsSsI AvmWGSRQ4CylJjQb9MLga7Ct6fwoJfIwaYGv/FFYMt0KGpJdM5k+tLlhmEUMkunPcXxp hb4A== X-Gm-Message-State: AOAM533gRQcj8FBCpALvOYSzDJXCi47RFPrJH0S5F1qDL2ZHDgl1SWCY 6prEsE+xACjSxr7LxUBqYe9FW/oPuRk= X-Google-Smtp-Source: ABdhPJyyYerBPwLAgZc5CXTXMro5eRkpaZ2ruVs7enIIaOdf43uIgDr1slIcfqC06UhjSL+eJGODwA== X-Received: by 2002:a5d:55c6:: with SMTP id i6mr10162415wrw.145.1612018140053; Sat, 30 Jan 2021 06:49:00 -0800 (PST) Received: from lili ([88.126.110.68]) by smtp.gmail.com with ESMTPSA id r17sm3870643wro.46.2021.01.30.06.48.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Jan 2021 06:48:59 -0800 (PST) From: zimoun In-Reply-To: <87czxpdhsv.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> References: <87ft2xzu1g.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <87wnvzwfgu.fsf@gnu.org> <87lfcfcmf3.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> <87mtwut34z.fsf@gnu.org> <87czxpdhsv.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> Date: Sat, 30 Jan 2021 15:46:02 +0100 Message-ID: <86pn1mfpp1.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 45972@debbugs.gnu.org Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -0.25 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b="ptvn/u63"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 690CF940415 X-Spam-Score: -0.25 X-Migadu-Scanner: scn0.migadu.com X-TUID: 1EnfDsm1+e9K Hi, On Thu, 28 Jan 2021 at 01:30, Nicol=C3=B2 Balzarotti = wrote: > Sure, I'd just read it from Package.toml (nowadays almost all the > packages have this file, and for when it's missing we also have the > julia-create-package-toml procedure that creates it). > > The file is toml, but I don't see a toml parser in guix. So, I'd use a > function like the following: > > #+begin_src scheme > (define (package.toml->name file) > (call-with-input-file file > (lambda (in) > (let loop ((line (read-line in 'concat))) > (if (eof-object? line) > #f ;What to do? > (let ((m (string-match "name\\s*=3D\\s*\"(.*)\"" line))) > (if m (match:substring m 1) > (loop (read-line in 'concat))))))))) > #+end_src [...] > The other way I think this is easily solvable is by asking julia > directly, by reading the output of: > > (invoke-julia "using Pkg; Pkg.TOML.parsefile("Project.toml")["name"] |> p= rintln") With a bit more glue, could this be transformed into something like =E2=80=9Cjulia->guix-package=E2=80=9D? And so have a Julia package importe= r, even if it fails for some cases. WDYT? All the best, simon