From 39fecacaef614871c046a8855af2b4173f7811dd Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Mon, 24 Feb 2020 13:50:43 +0100 Subject: nonguix: Use the install-plan of the copy-build-system in the binary-build-system. * nonguix/build-system/binary.scm (lower): Adapt the default value of the install plan. * nonguix/build/binary-build-system.scm (new-install): New procedure. (old-install): Rename former `install' procedure to this. (install): New procedure that dispatches over old-install and new-install. --- nonguix/build/binary-build-system.scm | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'nonguix/build') diff --git a/nonguix/build/binary-build-system.scm b/nonguix/build/binary-build-system.scm index 984f38c..6a676ae 100644 --- a/nonguix/build/binary-build-system.scm +++ b/nonguix/build/binary-build-system.scm @@ -30,7 +30,11 @@ ;; ;; Code: -(define* (install #:key install-plan outputs #:allow-other-keys) +(define (new-install) + "Return the copy-build-system `install' procedure." + (@@ (guix build copy-build-system) install)) + +(define* (old-install #:key install-plan outputs #:allow-other-keys) "Copy files from the \"source\" build input to the \"out\" output according to INSTALL-PLAN. An INSTALL-PLAN is made of three elements: @@ -70,6 +74,18 @@ represent the target full path, which only makes sense for single files." (for-each install install-plan) #t) +(define* (install #:key install-plan outputs #:allow-other-keys) + (define (install-old-format) + (warn "Install-plan format deprecated. +Please update to the format of the copy-build-system.") + (old-install #:install-plan install-plan #:outputs outputs)) + (match (car install-plan) + ((source (. matches) target) + (install-old-format)) + ((source #f target) + (install-old-format)) + (_ ((new-install) #:install-plan install-plan #:outputs outputs)))) + (define* (patchelf #:key inputs outputs patchelf-plan #:allow-other-keys) "Set the interpreter and the RPATH of files as per the PATCHELF-PLAN. @@ -132,7 +148,7 @@ The inputs are optional when the file is an executable." (replace 'install install))) (define* (binary-build #:key inputs (phases %standard-phases) - #:allow-other-keys #:rest args) + #:allow-other-keys #:rest args) "Build the given package, applying all of PHASES in order." (apply gnu:gnu-build #:inputs inputs #:phases phases args)) -- cgit v1.2.3