From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id GJljO5iypWOXOwEAbAwnHQ (envelope-from ) for ; Fri, 23 Dec 2022 14:52:25 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id EOFzO5iypWPUHAAA9RJhRA (envelope-from ) for ; Fri, 23 Dec 2022 14:52:24 +0100 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 B012E3D4B4 for ; Fri, 23 Dec 2022 14:52:24 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p8iSz-0003ci-B4; Fri, 23 Dec 2022 08:52:05 -0500 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 1p8iSw-0003cK-Sw for bug-guix@gnu.org; Fri, 23 Dec 2022 08:52:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p8iSw-0003Mx-KS for bug-guix@gnu.org; Fri, 23 Dec 2022 08:52:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p8iSw-0004qL-G5 for bug-guix@gnu.org; Fri, 23 Dec 2022 08:52:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#58250: guix import json: GUIX_PACKAGE_PATH -- no code for module Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 23 Dec 2022 13:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58250 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: itd Cc: 58250@debbugs.gnu.org Received: via spool by 58250-submit@debbugs.gnu.org id=B58250.167180346518598 (code B ref 58250); Fri, 23 Dec 2022 13:52:02 +0000 Received: (at 58250) by debbugs.gnu.org; 23 Dec 2022 13:51:05 +0000 Received: from localhost ([127.0.0.1]:37120 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p8iS0-0004pu-LB for submit@debbugs.gnu.org; Fri, 23 Dec 2022 08:51:04 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39864) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p8iRz-0004pU-E2 for 58250@debbugs.gnu.org; Fri, 23 Dec 2022 08:51:03 -0500 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 ) id 1p8iRu-0002tQ-7g; Fri, 23 Dec 2022 08:50:58 -0500 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=BOt+Wmwy2ZvV10idH6roZJK1lS0fU1FEr29skgQn7fU=; b=aAnOJnWmr8bAmv6wjL4E 31r8MqygfFgmb9Qnp+6bC4cBTiuEzj2ZIgm8HNwLOOzrx7phIcTxt2psztRL68zjNoV9jx7fHSADx IurkCjsMY6cUr2jqvlLM21AO5fp3HtsiHif33u5fdpYKyH/AKxwHjxbj4Gd2MmWW5NC+uCfd6uasf dyQ125NPe3ZrnAmClcAxKc0wsfNxLsHFa/L6Fq5TlEOO3WduB3Up9wZ+UjmSbRwGT/arKX7xAmhSI 04llK1o5fIyFMXToUYrD+4zqYOap19Sk5nXGnFK13PqAFYQ2bRltuUITqZL+zGgFR43VvdXflOnXk xwMmbXZKYm/78A==; Received: from [193.50.110.60] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p8iRk-0003s1-11; Fri, 23 Dec 2022 08:50:57 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <871qrqfgiq.fsf@localhost> <87v8p2e1f2.fsf@localhost> Date: Fri, 23 Dec 2022 14:50:46 +0100 In-Reply-To: <87v8p2e1f2.fsf@localhost> (itd@net.in.tum.de's message of "Sun, 02 Oct 2022 16:38:09 +0200") Message-ID: <87mt7ez0sp.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1671803544; a=rsa-sha256; cv=none; b=Yj6PSVL8eO00JlSXAg7VlebEd8e930i6Cl5tCAQ6+hGIQVBRg5ZW/sQ/0VsR3J9kurx1N4 ZEghHMuAPDNxKMETtTVVyBUvgABVbOWKuE9Uy50ARsLZaHU9b+7L794IndpBt4LiJ0T3Jx WcsjWLf3FEBAASjX0sDwTqY64TUMz2Q2Hpc37caFxMzPV32fQupn6c25ntcYWCj83WKpWY tIlK5UHeFGRK7DIiD4IcUoi4TaW1Dal+ajw40vSbip1XgYWk3qRsRJx3mvMrNPHPwvL/o9 8dr1tfL53nRZ3QnMKCaRJfY/j2KseNmMjuItugfJst9FshIO6nboJtzPSlFEvw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=aAnOJnWm; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671803544; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: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=BOt+Wmwy2ZvV10idH6roZJK1lS0fU1FEr29skgQn7fU=; b=JgYxWc3Y0xYaSF9M4lpbHANhP5bgNi7jOtu5k1nQH6Q7pod9oChdzpHOyyxGfugAQKH63V PLj6MrjNfzGs9p/Vr7i9sYl9Ix7KA5gIHWLenNwqtXaB6tMpVD6eOyVnqkqZNJ6Vuwy3fr 0IRosXVWCJxDghYJbsi1HKy25D+JRIM+OpJd8ZhDvbtUafVaj9bqpCtE6HiHs3J81gpDwe nUkryQ5M8EzKL7jVNKhluWFqy6dYKZfOD2FuXw8ng7q8Cac+nqMH0kfYQVha50NQNV9GuI blJqZNVLYHcAb/3bO/Guzz5ZjaTVAXJ8WBK7Yn3Waua/8qSo64PJqsBL0pzleQ== X-Spam-Score: -4.51 X-Migadu-Queue-Id: B012E3D4B4 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=aAnOJnWm; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -4.51 X-TUID: gvaoUUqErfB/ itd skribis: > * guix/import/print.scm (package->code)[package-module-name]: Use > file-name->module-name to build the package module name. > --- > This patch updates the JSON importer to use (guix modules)'s > file-name->module-name to determine the module name. > > guix/import/print.scm | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/guix/import/print.scm b/guix/import/print.scm > index 2f54adbd8c..04e6b0a7b1 100644 > --- a/guix/import/print.scm > +++ b/guix/import/print.scm > @@ -21,6 +21,7 @@ (define-module (guix import print) > #:use-module (guix base32) > #:use-module (guix utils) > #:use-module (guix licenses) > + #:use-module (guix modules) > #:use-module (guix packages) > #:use-module (guix search-paths) > #:use-module (guix build-system) > @@ -45,10 +46,7 @@ (define (package->code package) > when evaluated." > ;; The module in which the package PKG is defined > (define (package-module-name pkg) > - (map string->symbol > - (string-split (string-drop-right > - (location-file (package-location pkg)) 4) > - #\/))) > + (file-name->module-name (location-file (package-location pkg)))) LGTM! Ludo'.