* [bug#74997] [PATCH 1/5] import: utils: Rename guix-name to downstream-package-name.
@ 2024-12-20 17:32 Herman Rimm via Guix-patches via
2024-12-20 17:35 ` [bug#74997] [PATCH 2/5] import: texlive: Remove guix-name Herman Rimm via Guix-patches via
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Herman Rimm via Guix-patches via @ 2024-12-20 17:32 UTC (permalink / raw)
To: 74997
Cc: Andrew Tropin, Efraim Flashner, Katherine Cox-Buday,
Laurent Gatto, Liliana Marie Prikler, Ricardo Wurmus,
Simon Tournier
* guix/import/cran.scm (cran-guix-name): Adjust.
* guix/import/crate.scm (crate-name->package-name): Adjust.
* guix/import/elpa.scm (elpa-guix-name): Adjust.
* guix/import/npm-binary.scm (npm-name->name): Adjust.
* guix/import/utils.scm (downstream-package-name): Add procedure.
[description]: Use definite article, uppercase 'name' argument.
(guix-name): Deprecate.
Change-Id: I374892be18fbeaae1bc051b8d0c79ca4c33ed8c4
---
guix/import/cran.scm | 2 +-
guix/import/crate.scm | 2 +-
guix/import/elpa.scm | 2 +-
guix/import/npm-binary.scm | 2 +-
guix/import/utils.scm | 8 ++++++--
5 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/guix/import/cran.scm b/guix/import/cran.scm
index fe69cb87f7..3bea9439e1 100644
--- a/guix/import/cran.scm
+++ b/guix/import/cran.scm
@@ -478,7 +478,7 @@ (define (transform-sysname sysname)
("zlib1g-dev" "zlib")
(_ sysname)))
-(define cran-guix-name (cut guix-name "r-" <>))
+(define cran-guix-name (cut downstream-package-name "r-" <>))
(define (directory-needs-fortran? dir)
"Check if the directory DIR contains Fortran source files."
diff --git a/guix/import/crate.scm b/guix/import/crate.scm
index 5996571cda..c50f0a8415 100644
--- a/guix/import/crate.scm
+++ b/guix/import/crate.scm
@@ -467,7 +467,7 @@ (define (guix-package->crate-name package)
((name _ ...) name))))
(define (crate-name->package-name name)
- (guix-name "rust-" name))
+ (downstream-package-name "rust-" name))
\f
diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm
index 46b6dc98a2..b86a6a546b 100644
--- a/guix/import/elpa.scm
+++ b/guix/import/elpa.scm
@@ -481,7 +481,7 @@ (define %elpa-updater
(pred package-from-elpa-repository?)
(import latest-release)))
-(define elpa-guix-name (cut guix-name "emacs-" <>))
+(define elpa-guix-name (cut downstream-package-name "emacs-" <>))
(define* (elpa-recursive-import package-name #:optional (repo 'gnu))
(recursive-import package-name
diff --git a/guix/import/npm-binary.scm b/guix/import/npm-binary.scm
index 6dfedc4910..92ac7d338e 100644
--- a/guix/import/npm-binary.scm
+++ b/guix/import/npm-binary.scm
@@ -178,7 +178,7 @@ (define (npm-name->name npm-name)
(define (clean name)
(string-map (lambda (chr) (if (char=? chr #\/) #\- chr))
(string-filter (negate (cut char=? <> #\@)) name)))
- (guix-name "node-" (clean npm-name)))
+ (downstream-package-name "node-" (clean npm-name)))
(define (name+version->symbol name version)
(string->symbol (string-append name "-" version)))
diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index e45c8dfb20..0b1b3b3298 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -37,6 +37,7 @@ (define-module (guix import utils)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix utils)
#:use-module (guix packages)
+ #:use-module (guix deprecation)
#:use-module (guix discovery)
#:use-module (guix build-system)
#:use-module ((guix i18n) #:select (G_))
@@ -82,6 +83,7 @@ (define-module (guix import utils)
read-lines
chunk-lines
+ downstream-package-name
guix-name
recursive-import))
@@ -612,14 +614,16 @@ (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."
+(define (downstream-package-name prefix name)
+ "Return the Guix package name for a given package NAME."
(string-append prefix (string-map (match-lambda
(#\_ #\-)
(#\. #\-)
(chr (char-downcase chr)))
name)))
+(define-deprecated/alias guix-name downstream-package-name)
+
(define (topological-sort nodes
node-dependencies
node-name)
base-commit: 7f91b12fe31baa0838ae2e942d4515911e71b137
--
2.45.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#74997] [PATCH 2/5] import: texlive: Remove guix-name.
2024-12-20 17:32 [bug#74997] [PATCH 1/5] import: utils: Rename guix-name to downstream-package-name Herman Rimm via Guix-patches via
@ 2024-12-20 17:35 ` Herman Rimm via Guix-patches via
2024-12-20 17:35 ` [bug#74997] [PATCH 3/5] import: utils: Move downstream-package-name to (guix utils) Herman Rimm via Guix-patches via
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Herman Rimm via Guix-patches via @ 2024-12-20 17:35 UTC (permalink / raw)
To: 74997; +Cc: Andreas Enge, Nicolas Goaziou
* guix/import/texlive.scm (guix-name): Remove.
(list-upstream-inputs, tlpdb->package): Use downstream-package-name.
Change-Id: I8f04d27a42f762c5604cb8874042fabbbe1e9873
---
guix/import/texlive.scm | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/guix/import/texlive.scm b/guix/import/texlive.scm
index 6d04cc25ee..8ce22a1d59 100644
--- a/guix/import/texlive.scm
+++ b/guix/import/texlive.scm
@@ -334,15 +334,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
@@ -578,7 +569,8 @@ (define (list-upstream-inputs upstream-name version database)
(map (lambda (input-name)
(upstream-input
(name input-name)
- (downstream-name (guix-name input-name))
+ (downstream-name (downstream-package-name "texlive-"
+ input-name))
(type 'propagated)))
(sort (append
(filter-depends (or (assoc-ref package-data 'depend) '()))
@@ -655,7 +647,7 @@ (define (texlive->svn-multi-reference upstream-name version database)
(define (tlpdb->package upstream-name version database)
(and-let* ((data (assoc-ref database upstream-name))
- (name (guix-name upstream-name))
+ (name (downstream-package-name "texlive-" upstream-name))
(reference
(texlive->svn-multi-reference upstream-name version database))
(source (with-store store
--
2.45.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#74997] [PATCH 3/5] import: utils: Move downstream-package-name to (guix utils).
2024-12-20 17:32 [bug#74997] [PATCH 1/5] import: utils: Rename guix-name to downstream-package-name Herman Rimm via Guix-patches via
2024-12-20 17:35 ` [bug#74997] [PATCH 2/5] import: texlive: Remove guix-name Herman Rimm via Guix-patches via
@ 2024-12-20 17:35 ` Herman Rimm via Guix-patches via
2024-12-20 17:35 ` [bug#74997] [PATCH 4/5] gnu: make-arm-trusted-firmware: Use downstream-package-name Herman Rimm via Guix-patches via
2024-12-20 17:35 ` [bug#74997] [PATCH 5/5] gnu: u-boot: " Herman Rimm via Guix-patches via
3 siblings, 0 replies; 5+ messages in thread
From: Herman Rimm via Guix-patches via @ 2024-12-20 17:35 UTC (permalink / raw)
To: 74997
Cc: Andreas Enge, Andrew Tropin, Christopher Baines, Josselin Poiret,
Katherine Cox-Buday, Liliana Marie Prikler, Ludovic Courtès,
Mathieu Othacehe, Nicolas Goaziou, Simon Tournier,
Tobias Geerinckx-Rice
* guix/import/elpa.scm: Import (guix utils).
* guix/import/texlive.scm: Import (guix utils).
* guix/import/utils.scm (downstream-package-name): Move to ...
* guix/utils.scm (downstream-package-name): ... here.
Change-Id: If56a452f64ed06c8bb06a96a283a5067cb54d602
---
guix/import/elpa.scm | 1 +
guix/import/texlive.scm | 1 +
guix/import/utils.scm | 9 ---------
guix/utils.scm | 9 +++++++++
4 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm
index b86a6a546b..62b1d645ac 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 (downstream-package-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 8ce22a1d59..8e67d11c69 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 (downstream-package-name))
#:use-module (ice-9 ftw)
#:use-module (ice-9 match)
#:use-module (ice-9 popen)
diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index 0b1b3b3298..6f5efa790e 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -83,7 +83,6 @@ (define-module (guix import utils)
read-lines
chunk-lines
- downstream-package-name
guix-name
recursive-import))
@@ -614,14 +613,6 @@ (define* (chunk-lines lines #:optional (pred string-null?))
(reverse res)
(loop (cdr after) res))))))
-(define (downstream-package-name prefix name)
- "Return the Guix package name for a given package NAME."
- (string-append prefix (string-map (match-lambda
- (#\_ #\-)
- (#\. #\-)
- (chr (char-downcase chr)))
- name)))
-
(define-deprecated/alias guix-name downstream-package-name)
(define (topological-sort nodes
diff --git a/guix/utils.scm b/guix/utils.scm
index 537d0490e0..2d82329cb7 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
+ downstream-package-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 (downstream-package-name prefix name)
+ "Return the 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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#74997] [PATCH 4/5] gnu: make-arm-trusted-firmware: Use downstream-package-name.
2024-12-20 17:32 [bug#74997] [PATCH 1/5] import: utils: Rename guix-name to downstream-package-name Herman Rimm via Guix-patches via
2024-12-20 17:35 ` [bug#74997] [PATCH 2/5] import: texlive: Remove guix-name Herman Rimm via Guix-patches via
2024-12-20 17:35 ` [bug#74997] [PATCH 3/5] import: utils: Move downstream-package-name to (guix utils) Herman Rimm via Guix-patches via
@ 2024-12-20 17:35 ` Herman Rimm via Guix-patches via
2024-12-20 17:35 ` [bug#74997] [PATCH 5/5] gnu: u-boot: " Herman Rimm via Guix-patches via
3 siblings, 0 replies; 5+ messages in thread
From: Herman Rimm via Guix-patches via @ 2024-12-20 17:35 UTC (permalink / raw)
To: 74997; +Cc: Efraim Flashner, Vagrant Cascadian
* gnu/packages/firmware.scm (make-arm-trusted-firmware): Use
downstream-package-name.
[arguments]: Remove configure phase, use fix-cross-build phase instead.
(arm-trusted-firmware-sun50i-a64): Return base package directly.
Change-Id: I23f05ac5e8e897037cd8d8afc4e747b05e56e32d
---
gnu/packages/firmware.scm | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index 89d29b8add..04f138f22c 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -1108,7 +1108,7 @@ (define* (make-arm-trusted-firmware platform #:key
;;%current-system is a *triplet*, unlike its name would suggest.
(string=? (%current-system) (gnu-triplet->nix-system triplet))))
(package
- (name (string-append "arm-trusted-firmware-" platform))
+ (name (downstream-package-name "arm-trusted-firmware-" platform))
(version "2.12")
(source
(origin
@@ -1131,7 +1131,7 @@ (define* (make-arm-trusted-firmware platform #:key
#:target (and (not (native-build?)) triplet)
#:phases
#~(modify-phases %standard-phases
- (replace 'configure ;no configure script
+ (add-after 'unpack 'fix-cross-build
;; Fix ATF commit ffb7742125def3e0acca4c7e4d3215af5ce25a31
(lambda _
(unless #$(native-build?)
@@ -1140,6 +1140,7 @@ (define* (make-arm-trusted-firmware platform #:key
(substitute* "make_helpers/build_macros.mk"
(("-oc") "-oc-default")
(("-od") "-od-default")))))
+ (delete 'configure) ;no configure script
(replace 'install
(lambda _
(for-each (lambda (file)
@@ -1171,10 +1172,7 @@ (define* (make-arm-trusted-firmware platform #:key
license:bsd-2)))) ; libfdt
(define-public arm-trusted-firmware-sun50i-a64
- (let ((base (make-arm-trusted-firmware "sun50i_a64")))
- (package
- (inherit base)
- (name "arm-trusted-firmware-sun50i-a64"))))
+ (make-arm-trusted-firmware "sun50i_a64"))
(define-public arm-trusted-firmware-rk3328
(make-arm-trusted-firmware "rk3328"))
--
2.45.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#74997] [PATCH 5/5] gnu: u-boot: Use downstream-package-name.
2024-12-20 17:32 [bug#74997] [PATCH 1/5] import: utils: Rename guix-name to downstream-package-name Herman Rimm via Guix-patches via
` (2 preceding siblings ...)
2024-12-20 17:35 ` [bug#74997] [PATCH 4/5] gnu: make-arm-trusted-firmware: Use downstream-package-name Herman Rimm via Guix-patches via
@ 2024-12-20 17:35 ` Herman Rimm via Guix-patches via
3 siblings, 0 replies; 5+ messages in thread
From: Herman Rimm via Guix-patches via @ 2024-12-20 17:35 UTC (permalink / raw)
To: 74997; +Cc: Efraim Flashner, Vagrant Cascadian
* gnu/packages/bootloaders.scm (u-boot): Use downstream-package-name.
Change-Id: I7226519a676ba201be3a95078112b6514a201731
---
gnu/packages/bootloaders.scm | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 3122a185dd..b5cfacca4b 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -1041,9 +1041,7 @@ (define*-public (make-u-boot-package board triplet
(gnu-triplet->nix-system triplet))))))
(package
(inherit u-boot)
- (name (string-append "u-boot-"
- (string-replace-substring (string-downcase board)
- "_" "-")
+ (name (string-append (downstream-package-name "u-boot-" board)
(or name-suffix "")))
(description (if append-description
(string-append (package-description u-boot)
--
2.45.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-12-20 19:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-20 17:32 [bug#74997] [PATCH 1/5] import: utils: Rename guix-name to downstream-package-name Herman Rimm via Guix-patches via
2024-12-20 17:35 ` [bug#74997] [PATCH 2/5] import: texlive: Remove guix-name Herman Rimm via Guix-patches via
2024-12-20 17:35 ` [bug#74997] [PATCH 3/5] import: utils: Move downstream-package-name to (guix utils) Herman Rimm via Guix-patches via
2024-12-20 17:35 ` [bug#74997] [PATCH 4/5] gnu: make-arm-trusted-firmware: Use downstream-package-name Herman Rimm via Guix-patches via
2024-12-20 17:35 ` [bug#74997] [PATCH 5/5] gnu: u-boot: " Herman Rimm via Guix-patches via
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.