GNU bug report logs - #37791
[PATCH 0/4] Some fixes for ecl-* Common Lisp packages

Previous Next

Package: guix-patches;

Reported by: Guillaume Le Vaillant <glv <at> posteo.net>

Date: Thu, 17 Oct 2019 14:38:02 UTC

Severity: normal

Tags: patch

Done: Pierre Neidhardt <mail <at> ambrevar.xyz>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Guillaume Le Vaillant <glv <at> posteo.net>
To: 37791 <at> debbugs.gnu.org
Cc: Guillaume Le Vaillant <glv <at> posteo.net>
Subject: [bug#37791] [PATCH 1/4] build-system/asdf: Fix package transform.
Date: Thu, 17 Oct 2019 16:43:09 +0200
* guix/build-system/asdf.scm (package-with-build-system):
  [find-input-package]: New function.
  [rewrite]: Use it.
---
 guix/build-system/asdf.scm | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/guix/build-system/asdf.scm b/guix/build-system/asdf.scm
index af04084c86..f794bf006b 100644
--- a/guix/build-system/asdf.scm
+++ b/guix/build-system/asdf.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016, 2017 Andy Patterson <ajpatter <at> uwaterloo.ca>
+;;; Copyright © 2019 Guillaume Le Vaillant <glv <at> posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -32,6 +33,7 @@
   #:use-module (ice-9 regex)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-26)
+  #:use-module (gnu packages)
   #:export (%asdf-build-system-modules
             %asdf-build-modules
             asdf-build
@@ -160,13 +162,22 @@ set up using CL source package conventions."
   (define (has-from-build-system? pkg)
     (eq? from-build-system (package-build-system pkg)))
 
+  (define (find-input-package pkg)
+    (let* ((name (package-name pkg))
+           (new-name (transform-package-name name))
+           (pkgs (find-packages-by-name new-name)))
+      (if (null? pkgs) #f (list-ref pkgs 0))))
+
   (define transform
     (mlambda (pkg)
       (define rewrite
         (match-lambda
           ((name content . rest)
            (let* ((is-package? (package? content))
-                  (new-content (if is-package? (transform content) content)))
+                  (new-content (if is-package?
+                                   (or (find-input-package content)
+                                       (transform content))
+                                   content)))
              `(,name ,new-content ,@rest)))))
 
       ;; Special considerations for source packages: CL inputs become
-- 
2.23.0





This bug report was last modified 5 years and 271 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.