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 eCO2MD8oXGfRigAAe85BDQ:P1 (envelope-from ) for ; Fri, 13 Dec 2024 12:27:44 +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 eCO2MD8oXGfRigAAe85BDQ (envelope-from ) for ; Fri, 13 Dec 2024 13:27:43 +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=KOzEntqe; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b="ld/8USE5"; dmarc=pass (policy=none) header.from=gnu.org; 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-Seal: i=1; s=key1; d=yhetil.org; t=1734092863; a=rsa-sha256; cv=none; b=sZUUOTUTGHyazRtjHIBmWTzFlABUAGJkf/+aETdl2xeea809LgmglwhOAJTf+AAhDCEgyA RIIePi3KfVyGNnxI9NWyqbfhY+BR2XfIo1jaz4fk7P1VbLmZ5tfIR8zVWN5g/QRTSxH9Re iifrRGFawKoqYYi3lc8sxT+ODM4RFZ3qMmjWrnmmGeNzlEoC7pWGw8Kj7UNinBMv+UFrLm R4v1fcwhMeYgQlMQGNKzJ39GbSzZrfx4xteOMape1azKQ2wWqSQTNPW0KIW7vxLQC9d6Mp RppFHgoUB2qnm0QXwBouct/lpWI8KYZgzFGbKeSznWEnbKv8QUobdEi0Bp250A== 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=KOzEntqe; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b="ld/8USE5"; dmarc=pass (policy=none) header.from=gnu.org; 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=1734092863; 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=ib/5CA/hVUMENJHmnJrHsJE+C2ShFvV4G51fxMXf2Kg=; b=QEdiKzEFIgES98BeeU+SXxQDSZyYjmFD3xB+OklT7Ykg8FSfeZuXJrBc01DOizlpDkZWOr 5FPx6m8xayR6I9Ke4o4tDT5JqLB4FTMB5cEBZOHu+1OwC8Fqx9QLlzLTuAegLWoSTwxvWK YCKHTe9yOAaeeBFioZTwDLtvZFWvSE+ER0jRbjICZcnh+xYmAf3MFwPEVV44xvhQfN6ysQ k6eomGI/zx8Ht729hvWAchwxWjpX2tpQBPy51jygWMmnSqRybywazECuBdAfXHmuMfdbTS MFbSiP1DgNnNQr7RofQ4pwU3Cf6We8xOkvKi8ReiGLuc3e2KQ/Pa8EOGygpKXw== 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 99CF57B082 for ; Fri, 13 Dec 2024 13:27:43 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tM4lZ-0005Fe-RH; Fri, 13 Dec 2024 07:27:34 -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 1tM4lL-00056d-2f for guix-patches@gnu.org; Fri, 13 Dec 2024 07:27: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 1tM4lC-00053V-CH; Fri, 13 Dec 2024 07:27:17 -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=ib/5CA/hVUMENJHmnJrHsJE+C2ShFvV4G51fxMXf2Kg=; b=KOzEntqeCIeZBijXo0lJNqIMNrdRRzi8Y2ZvsxU3IMlTPBcGewSjDtMMf5oNXmk1/KMjxyrnGJEbevl1N0bvPPNHqhuFUWP9SOhG83q8PuZvlpYt3I+DfO55gupD1TOaB0/VCrdePDebvI52vphF7mUdluI6cuQXgZDpXnIinqHzXppeaNd/ectNoNOnqJRbUYCUD8d9TRvivlkmEla3gSBOu4wXgZb+yKw/j4CyfIJBMjw78Kq9KaD4uiN92sYM0c+HkhWBYHZ/q2HBn96R1QFaKcbOMA648pCzElBlrGJnbfnSCc84jk16biFoIlntit0YPR0AkS8jb7T4dWiejA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tM4l6-0003Wm-6w; Fri, 13 Dec 2024 07:27:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74849] [PATCH 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, 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, guix-patches@gnu.org Resent-Date: Fri, 13 Dec 2024 12:27:04 +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 , Josselin Poiret , Katherine Cox-Buday , Liliana Marie Prikler , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Nicolas Goaziou , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Andreas Enge , Andrew Tropin , Christopher Baines , Josselin Poiret , Katherine Cox-Buday , Liliana Marie Prikler , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Nicolas Goaziou , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 74849-submit@debbugs.gnu.org id=B74849.173409280313488 (code B ref 74849); Fri, 13 Dec 2024 12:27:04 +0000 Received: (at 74849) by debbugs.gnu.org; 13 Dec 2024 12:26:43 +0000 Received: from localhost ([127.0.0.1]:41935 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tM4kk-0003VL-J2 for submit@debbugs.gnu.org; Fri, 13 Dec 2024 07:26:43 -0500 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:41465 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tM4kh-0003US-KD for 74849@debbugs.gnu.org; Fri, 13 Dec 2024 07:26:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1734092790; 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=ib/5CA/hVUMENJHmnJrHsJE+C2ShFvV4G51fxMXf2Kg=; b=ld/8USE5V11ryx4te+7X2lcVSkU/H/DZg6Q8bSqgMgvjDANtqFHQhMsCqkVa56bpBl4QN9 up7aBCFKflHz/uXvGiH5SFMnBitYpiN/f6S1VxCBsRG6cUwD83yCrNW3mO99wsJYGXbXj/ orzddIIwD6agdU2H4EEMJsj+b2Khijg62OXScDIKAkh0UhAgFQQJP+rqAay0+ZsVlb9XL7 Q+5xhrXg3xi3LrsDZDMcPpWotTVmYKXOiZjZ7ypsSutqwbQ3ydwI2gSGHw2ofRRKCgkROH JnaQbbNpSgfHvurQBXEo2wOpDgfxzfRSJSx84wKrQt1dqgGSKGBom9VIKPinag== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id ab8b41b8 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for <74849@debbugs.gnu.org>; Fri, 13 Dec 2024 12:26:30 +0000 (UTC) Date: Fri, 13 Dec 2024 13:25:46 +0100 Message-ID: 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 99CF57B082 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -1.47 X-Spam-Score: -1.47 X-TUID: MVEJ0z8V8rDr * 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 ccf18a7bf9..610fe9970e 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) @@ -609,14 +607,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