summaryrefslogtreecommitdiff
path: root/guix/build-system
diff options
context:
space:
mode:
authorMathieu Othacehe <m.othacehe@gmail.com>2019-11-16 09:34:27 +0100
committerMathieu Othacehe <m.othacehe@gmail.com>2019-11-16 09:34:27 +0100
commit154d97abdd16674fdebc763351f661bbcdc869a4 (patch)
tree0277a9380edd1390f16e432283d32499ffed36d1 /guix/build-system
parente4696c69d75f4fcf54c42beeb928032726bdaf7d (diff)
parent87e7faa2ae641d8302efc8b90f1e45f43f67f6da (diff)
downloadguix-patches-154d97abdd16674fdebc763351f661bbcdc869a4.tar
guix-patches-154d97abdd16674fdebc763351f661bbcdc869a4.tar.gz
Merge remote-tracking branch master into core-updates
Diffstat (limited to 'guix/build-system')
-rw-r--r--guix/build-system/asdf.scm13
1 files changed, 12 insertions, 1 deletions
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@uwaterloo.ca>
+;;; Copyright © 2019 Guillaume Le Vaillant <glv@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