From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id cJE5AYeaZGdzkgAAe85BDQ:P1 (envelope-from ) for ; Thu, 19 Dec 2024 22:13:27 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id cJE5AYeaZGdzkgAAe85BDQ (envelope-from ) for ; Thu, 19 Dec 2024 23:13:27 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b="f/hEtiIv"; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b=XrxJXV8m; 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"; 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=1734646406; h=from:from:sender:sender:reply-to: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=qVoGXffJQEH0hheoxayy7uWM3y9TDo1TKVH4K2HN2xk=; b=ZX0J5ylK4qMkVvnMCZWB6rqsjvaesZIvUsflGxNAgp+QQR7vfj1sevQZA6KHP6AeWgSsh0 9RocxMepydZLag5JHTkQjT2eiSmc+N8QWmAojIy4hyEPEAkKJzOvpJjLkMoRSCWpqBMzp6 Lf4bd3UXBzK7YS/yeNBREdjfYk8GwCthet2WU0dGddqQDIX0bpIWJ2Q5Yfwmy2iH/NFsAx zdbRs1m6b/EUfH+b2ypqAS7WBAkt13AsONCCwNlOKjQH/8hSY9hstZx1NU4CTuQREx/Tw8 6SmtTskBbpjjV5tK9/U4pQL1kpcx+KEQvDFXWW4DUFiSVngFbbyiMnb9KP79hQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b="f/hEtiIv"; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b=XrxJXV8m; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1734646406; a=rsa-sha256; cv=none; b=ZRaUQ11DTUDW+ZLqd03JF9F+p9xlgumloUH1qmWcgYEySBNjnmjgJ7PuMpRyqXODn5U485 bXv5sMO1I79ffVJ3qsXb4Q7n94PLBKFzaweg/3reH9L5utWOGi4UYTqGM4H73mbI3hEFsV ImAXROpPH0PaVZlz2cTLL91cCUdgFVaCmLSuJKavjUu62Iz0g9eJhs7YiXbOyPYJX9qXq1 8yY8tv2E06C9SGemQ7EOtZtRqlknG5wdTIIX9/WvSABSN1Zb9hrgGrJWuXG7KLgEG1wrsP 7KwQOtQNd1xC8isAZoajPiM5ZdJpkiqxVHdZOuB94bM+ADHfiTIb8q3wSpodMQ== 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 CED1D7FB42 for ; Thu, 19 Dec 2024 23:13:26 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOOkt-00038t-2e; Thu, 19 Dec 2024 17:12:27 -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 1tOOkl-000352-Pd for guix-patches@gnu.org; Thu, 19 Dec 2024 17:12:19 -0500 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 1tOOkk-0007ri-UV; Thu, 19 Dec 2024 17:12:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=qVoGXffJQEH0hheoxayy7uWM3y9TDo1TKVH4K2HN2xk=; b=f/hEtiIvY5b58d3xxmLZci2nmROOSIPAzWlfWX3iKbIGhA1dgviAmaR44Eh7lKR7+Sytx2QgoDLpoAEtN0g2nzUYYMPmL460c2WhMzsnPnva6vnmQ6JRp0TPRWmKIpISd7nIrdjPab+EJwbAF6HRRq1l2MRacFhByhxGV/Ss19wPzRv7jcqPjmHxM/RXpJ2qARdxw1SCg0rLkc6eC2qAjUWCEKxT8zRJlT1B1w19nMEdO52X8ezE0QAXMH1UdmsCDrryeoF2JKyLWFHK/tvp50BdCHIJ/KcQpDdgpX6fs0rWVpNcvnb9GlHpLU3ndYyrv80/AcV5jY9wxNy88mf6sA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tOOkV-0007tX-Go; Thu, 19 Dec 2024 17:12:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74849] [PATCH v2 3/6] import: utils: Move guix-name to (guix utils). Resent-From: Herman Rimm Original-Sender: "Debbugs-submit" Resent-CC: andreas@enge.fr, andrew@trop.in, guix@cbaines.net, efraim@flashner.co.il, dev@jpoiret.xyz, cox.katherine.e+guix@gmail.com, liliana.prikler@gmail.com, ludo@gnu.org, othacehe@gnu.org, guix@nicolasgoaziou.fr, zimon.toutoune@gmail.com, me@tobias.gr, vagrant@debian.org, guix-patches@gnu.org Resent-Date: Thu, 19 Dec 2024 22:12:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74849 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74849@debbugs.gnu.org Cc: Andreas Enge , Andrew Tropin , Christopher Baines , Efraim Flashner , Josselin Poiret , Katherine Cox-Buday , Liliana Marie Prikler , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Nicolas Goaziou , Simon Tournier , Tobias Geerinckx-Rice , Vagrant Cascadian X-Debbugs-Original-Xcc: Andreas Enge , Andrew Tropin , Christopher Baines , Efraim Flashner , Josselin Poiret , Katherine Cox-Buday , Liliana Marie Prikler , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Nicolas Goaziou , Simon Tournier , Tobias Geerinckx-Rice , Vagrant Cascadian Received: via spool by 74849-submit@debbugs.gnu.org id=B74849.173464630730261 (code B ref 74849); Thu, 19 Dec 2024 22:12:03 +0000 Received: (at 74849) by debbugs.gnu.org; 19 Dec 2024 22:11:47 +0000 Received: from localhost ([127.0.0.1]:40441 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOOkF-0007rv-8t for submit@debbugs.gnu.org; Thu, 19 Dec 2024 17:11:47 -0500 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:58395 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOOk8-0007qj-N6 for 74849@debbugs.gnu.org; Thu, 19 Dec 2024 17:11:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1734646285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qVoGXffJQEH0hheoxayy7uWM3y9TDo1TKVH4K2HN2xk=; b=XrxJXV8mZhyz19gZpw+Chc3vpWIGw4HJ3tSz6rZ23yVleJTiqfpaq3PF+gGiswIgj2kxls IepgF0iexre1WW+PpvoL5yFokvMGJ60Cyvp8L3PdsfT+Uk4fs9NueAE5tK7PW87dF7/4xV dqeUZjGO7t2TNxnX82c7qobuRZsLD5MZp+HTdYI0PGNULjgYUXQ9ksvA+oZAZv6zxE6scl LbRpJ9Ie4+V4OrWoCJpvFOp/L/3Rj0zzb1Ujd1estuyo9OlSIPJEdYm9gmPnMRYVWgyWZC 9aG7EWAzFnbvqrBqklZptlfTj2oaC2qN3diUZB51ti02k7u5oRG4qU6g5YnMDA== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id c853e77a (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for <74849@debbugs.gnu.org>; Thu, 19 Dec 2024 22:11:24 +0000 (UTC) Date: Thu, 19 Dec 2024 23:10:32 +0100 Message-ID: <5c695fe4a1cd6ecde7b0ee096bec35c5f7b8c3a8.1734645720.git.herman@rimm.ee> X-Mailer: git-send-email 2.45.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: , Reply-to: Herman Rimm X-ACL-Warn: , Herman Rimm via Guix-patches From: Herman Rimm via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: 2.26 X-Spam-Score: 2.26 X-Migadu-Queue-Id: CED1D7FB42 X-TUID: MRQwWqYEVgB+ * guix/import/elpa.scm: Import (guix utils). * guix/import/texlive.scm (guix-name): Remove. * guix/import/utils.scm (guix-name): Move to ... * guix/utils.scm (guix-name): ... here. Change-Id: If56a452f64ed06c8bb06a96a283a5067cb54d602 --- guix/import/elpa.scm | 1 + guix/import/texlive.scm | 10 +--------- guix/import/utils.scm | 10 ---------- guix/utils.scm | 9 +++++++++ 4 files changed, 11 insertions(+), 19 deletions(-) diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm index 46b6dc98a2..11559097b5 100644 --- a/guix/import/elpa.scm +++ b/guix/import/elpa.scm @@ -44,6 +44,7 @@ (define-module (guix import elpa) #:use-module (guix git) #:use-module (guix hash) #:use-module (guix store) + #:use-module ((guix utils) #:select (guix-name)) #:use-module (guix base32) #:use-module (guix upstream) #:use-module (guix packages) diff --git a/guix/import/texlive.scm b/guix/import/texlive.scm index 6d04cc25ee..b2e99c40f2 100644 --- a/guix/import/texlive.scm +++ b/guix/import/texlive.scm @@ -35,6 +35,7 @@ (define-module (guix import texlive) #:use-module (guix store) #:use-module (guix svn-download) #:use-module (guix upstream) + #:use-module ((guix utils) #:select (guix-name)) #:use-module (ice-9 ftw) #:use-module (ice-9 match) #:use-module (ice-9 popen) @@ -334,15 +335,6 @@ (define string->license ((lst ...) `(list ,@(map string->license lst))) (x `(error unknown-license ,x)))) -(define (guix-name name) - "Return a Guix package name for a given Texlive package NAME." - (string-append "texlive-" - (string-map (match-lambda - (#\_ #\-) - (#\. #\-) - (chr (char-downcase chr))) - name))) - (define* (filter-depends depends #:optional texlive-only) "Filter upstream package names DEPENDS to include only their equivalent Guix package names, without \"texlive-\" prefix. When TEXLIVE-ONLY is true, ignore diff --git a/guix/import/utils.scm b/guix/import/utils.scm index e45c8dfb20..058d2bc094 100644 --- a/guix/import/utils.scm +++ b/guix/import/utils.scm @@ -82,8 +82,6 @@ (define-module (guix import utils) read-lines chunk-lines - guix-name - recursive-import)) (define (factorize-uri uri version) @@ -612,14 +610,6 @@ (define* (chunk-lines lines #:optional (pred string-null?)) (reverse res) (loop (cdr after) res)))))) -(define (guix-name prefix name) - "Return a Guix package name for a given package name." - (string-append prefix (string-map (match-lambda - (#\_ #\-) - (#\. #\-) - (chr (char-downcase chr))) - name))) - (define (topological-sort nodes node-dependencies node-name) diff --git a/guix/utils.scm b/guix/utils.scm index 537d0490e0..dfa8f0f19b 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -91,6 +91,7 @@ (define-module (guix utils) %current-system %current-target-system package-name->name+version + guix-name target-linux? target-hurd? system-hurd? @@ -706,6 +707,14 @@ (define* (package-name->name+version spec (idx (values (substring spec 0 idx) (substring spec (1+ idx)))))) +(define (guix-name prefix name) + "Return a Guix package name for a given package name." + (string-append prefix (string-map (match-lambda + (#\_ #\-) + (#\. #\-) + (chr (char-downcase chr))) + name))) + (define* (target-linux? #:optional (target (or (%current-target-system) (%current-system)))) "Does the operating system of TARGET use the Linux kernel?" -- 2.45.2