build-system/asdf: Don't rename inputs.

* guix/build-system/asdf.scm (package-with-build-system)[transform]: Use updated
`new-inputs' procedure for inputs and native-inputs.
<rewrite>: Don't rename inputs.
<new-propagated-inputs>: Draw from package-inputs and package-native-inputs
for source packages.  Use the original package's propagated-inputs otherwise.
<new-inputs>: Convert into a function to be used to transform inputs and
native-inputs.
* gnu/packages/lisp.scm (sbcl-fiveam, sbcl-bordeaux-threads)
(sbcl-flexi-streams, sbcl-cl-ppcre, sbcl-stumpwm, sbcl-slynk-arglists)
(sbcl-slynk-fancy-inspector): Don't prefix input names.
This commit is contained in:
Andy Patterson 2017-04-03 09:01:24 -04:00 committed by Ricardo Wurmus
parent 35189728cd
commit 0e1371be09
No known key found for this signature in database
GPG Key ID: 197A5888235FACAC
2 changed files with 30 additions and 30 deletions

View File

@ -659,7 +659,7 @@ portable between implementations.")
(sha256 (sha256
(base32 "0f48pcbhqs3wwwzjl5nk57d4hcbib4l9xblxc66b8c2fhvhmhxnv")) (base32 "0f48pcbhqs3wwwzjl5nk57d4hcbib4l9xblxc66b8c2fhvhmhxnv"))
(file-name (string-append "fiveam-" version ".tar.gz")))) (file-name (string-append "fiveam-" version ".tar.gz"))))
(inputs `(("sbcl-alexandria" ,sbcl-alexandria))) (inputs `(("alexandria" ,sbcl-alexandria)))
(build-system asdf-build-system/sbcl) (build-system asdf-build-system/sbcl)
(synopsis "Common Lisp testing framework") (synopsis "Common Lisp testing framework")
(description "FiveAM is a simple (as far as writing and running tests (description "FiveAM is a simple (as far as writing and running tests
@ -687,8 +687,8 @@ interactive development model in mind.")
(base32 "10ryrcx832fwqdawb6jmknymi7wpdzhi30qzx7cbrk0cpnka71w2")) (base32 "10ryrcx832fwqdawb6jmknymi7wpdzhi30qzx7cbrk0cpnka71w2"))
(file-name (file-name
(string-append "bordeaux-threads-" version ".tar.gz")))) (string-append "bordeaux-threads-" version ".tar.gz"))))
(inputs `(("sbcl-alexandria" ,sbcl-alexandria))) (inputs `(("alexandria" ,sbcl-alexandria)))
(native-inputs `(("tests:cl-fiveam" ,sbcl-fiveam))) (native-inputs `(("fiveam" ,sbcl-fiveam)))
(build-system asdf-build-system/sbcl) (build-system asdf-build-system/sbcl)
(synopsis "Portable shared-state concurrency library for Common Lisp") (synopsis "Portable shared-state concurrency library for Common Lisp")
(description "BORDEAUX-THREADS is a proposed standard for a minimal (description "BORDEAUX-THREADS is a proposed standard for a minimal
@ -749,7 +749,7 @@ thin compatibility layer for gray streams.")
(base32 "16grnxvs7vqm5s6myf8a5s7vwblzq1kgwj8i7ahz8vwvihm9gzfi")) (base32 "16grnxvs7vqm5s6myf8a5s7vwblzq1kgwj8i7ahz8vwvihm9gzfi"))
(file-name (string-append "flexi-streams-" version ".tar.gz")))) (file-name (string-append "flexi-streams-" version ".tar.gz"))))
(build-system asdf-build-system/sbcl) (build-system asdf-build-system/sbcl)
(inputs `(("sbcl-trivial-gray-streams" ,sbcl-trivial-gray-streams))) (inputs `(("trivial-gray-streams" ,sbcl-trivial-gray-streams)))
(synopsis "Implementation of virtual bivalent streams for Common Lisp") (synopsis "Implementation of virtual bivalent streams for Common Lisp")
(description "Flexi-streams is an implementation of \"virtual\" bivalent (description "Flexi-streams is an implementation of \"virtual\" bivalent
streams that can be layered atop real binary or bivalent streams and that can streams that can be layered atop real binary or bivalent streams and that can
@ -779,7 +779,7 @@ streams which are similar to string streams.")
(base32 "1i7daxf0wnydb0pgwiym7qh2wy70n14lxd6dyv28sy0naa8p31gd")) (base32 "1i7daxf0wnydb0pgwiym7qh2wy70n14lxd6dyv28sy0naa8p31gd"))
(file-name (string-append "cl-ppcre-" version ".tar.gz")))) (file-name (string-append "cl-ppcre-" version ".tar.gz"))))
(build-system asdf-build-system/sbcl) (build-system asdf-build-system/sbcl)
(native-inputs `(("tests:cl-flexi-streams" ,sbcl-flexi-streams))) (native-inputs `(("flexi-streams" ,sbcl-flexi-streams)))
(synopsis "Portable regular expression library for Common Lisp") (synopsis "Portable regular expression library for Common Lisp")
(description "CL-PPCRE is a portable regular expression library for Common (description "CL-PPCRE is a portable regular expression library for Common
Lisp, which is compatible with perl. It is pretty fast, thread-safe, and Lisp, which is compatible with perl. It is pretty fast, thread-safe, and
@ -849,8 +849,8 @@ from other CLXes around the net.")
(base32 "1maxp98gh64az3d9vz9br6zdd6rc9fmj2imvax4by85g6kxvdz1i")) (base32 "1maxp98gh64az3d9vz9br6zdd6rc9fmj2imvax4by85g6kxvdz1i"))
(file-name (string-append "stumpwm-" version ".tar.gz")))) (file-name (string-append "stumpwm-" version ".tar.gz"))))
(build-system asdf-build-system/sbcl) (build-system asdf-build-system/sbcl)
(inputs `(("sbcl-cl-ppcre" ,sbcl-cl-ppcre) (inputs `(("cl-ppcre" ,sbcl-cl-ppcre)
("sbcl-clx" ,sbcl-clx))) ("clx" ,sbcl-clx)))
(outputs '("out" "lib")) (outputs '("out" "lib"))
(arguments (arguments
'(#:phases '(#:phases
@ -968,7 +968,7 @@ multiple inspectors with independent history.")
(package (package
(inherit sbcl-slynk-boot0) (inherit sbcl-slynk-boot0)
(name "sbcl-slynk-arglists") (name "sbcl-slynk-arglists")
(inputs `(("sbcl-slynk" ,sbcl-slynk-boot0))) (inputs `(("slynk" ,sbcl-slynk-boot0)))
(arguments (arguments
`(#:asd-file "slynk.asd" `(#:asd-file "slynk.asd"
,@(package-arguments sbcl-slynk-boot0))))) ,@(package-arguments sbcl-slynk-boot0)))))
@ -988,7 +988,7 @@ multiple inspectors with independent history.")
(package (package
(inherit sbcl-slynk-arglists) (inherit sbcl-slynk-arglists)
(name "sbcl-slynk-fancy-inspector") (name "sbcl-slynk-fancy-inspector")
(inputs `(("sbcl-slynk-util" ,sbcl-slynk-util) (inputs `(("slynk-util" ,sbcl-slynk-util)
,@(package-inputs sbcl-slynk-arglists))))) ,@(package-inputs sbcl-slynk-arglists)))))
(define ecl-slynk-fancy-inspector (define ecl-slynk-fancy-inspector

View File

@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca> ;;; Copyright © 2016, 2017 Andy Patterson <ajpatter@uwaterloo.ca>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -163,33 +163,35 @@ set up using CL source package conventions."
(match-lambda (match-lambda
((name content . rest) ((name content . rest)
(let* ((is-package? (package? content)) (let* ((is-package? (package? content))
(new-content (if is-package? (transform content) content)) (new-content (if is-package? (transform content) content)))
(new-name (if (and is-package? `(,name ,new-content ,@rest)))))
(string-prefix? from-prefix name))
(package-name new-content)
name)))
`(,new-name ,new-content ,@rest)))))
;; Special considerations for source packages: CL inputs become ;; Special considerations for source packages: CL inputs become
;; propagated, and un-handled arguments are removed. Native inputs are ;; propagated, and un-handled arguments are removed.
;; removed as are extraneous outputs.
(define new-propagated-inputs (define new-propagated-inputs
(if target-is-source? (if target-is-source?
(map rewrite (map rewrite
(filter (match-lambda (append
((_ input . _) (filter (match-lambda
(has-from-build-system? input))) ((_ input . _)
(package-inputs pkg))) (has-from-build-system? input)))
'())) (append (package-inputs pkg)
;; The native inputs might be needed just
;; to load the system.
(package-native-inputs pkg)))
(package-propagated-inputs pkg)))
(define new-inputs (map rewrite (package-propagated-inputs pkg))))
(define (new-inputs inputs-getter)
(if target-is-source? (if target-is-source?
(map rewrite (map rewrite
(filter (match-lambda (filter (match-lambda
((_ input . _) ((_ input . _)
(not (has-from-build-system? input)))) (not (has-from-build-system? input))))
(package-inputs pkg))) (inputs-getter pkg)))
(map rewrite (package-inputs pkg)))) (map rewrite (inputs-getter pkg))))
(define base-arguments (define base-arguments
(if target-is-source? (if target-is-source?
@ -212,11 +214,9 @@ set up using CL source package conventions."
(arguments (arguments
(substitute-keyword-arguments base-arguments (substitute-keyword-arguments base-arguments
((#:phases phases) (list phases-transformer phases)))) ((#:phases phases) (list phases-transformer phases))))
(inputs new-inputs) (inputs (new-inputs package-inputs))
(propagated-inputs new-propagated-inputs) (propagated-inputs new-propagated-inputs)
(native-inputs (if target-is-source? (native-inputs (new-inputs package-native-inputs))
'()
(map rewrite (package-native-inputs pkg))))
(outputs (if target-is-source? (outputs (if target-is-source?
'("out") '("out")
(package-outputs pkg))))) (package-outputs pkg)))))