From a35038fb8d8dfd05ec4970177c724d1af390fa2d Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Wed, 18 Dec 2019 17:00:38 +0100 Subject: nonguix: Fix default values for patchelf-plan and install-plan. * nonguix/build-system/binary.scm (binary-build): Default values are unquoted, so we add an extra quote. --- nonguix/build-system/binary.scm | 4 ++-- nonguix/build/binary-build-system.scm | 35 +++++++++++++++++++---------------- 2 files changed, 21 insertions(+), 18 deletions(-) (limited to 'nonguix') diff --git a/nonguix/build-system/binary.scm b/nonguix/build-system/binary.scm index 795b30c..2c2bae6 100644 --- a/nonguix/build-system/binary.scm +++ b/nonguix/build-system/binary.scm @@ -93,8 +93,8 @@ (define* (binary-build store name inputs #:key (guile #f) (outputs '("out")) - (patchelf-plan '()) - (install-plan '(("" ".*"))) + (patchelf-plan ''()) + (install-plan ''(("." (".") "./"))) (search-paths '()) (out-of-source? #t) (validate-runpath? #t) diff --git a/nonguix/build/binary-build-system.scm b/nonguix/build/binary-build-system.scm index 372e16b..30b55e5 100644 --- a/nonguix/build/binary-build-system.scm +++ b/nonguix/build/binary-build-system.scm @@ -97,22 +97,25 @@ The inputs are optional when the file is an executable." ":"))) (invoke "patchelf" "--set-rpath" rpath binary))) #t) - (let ((interpreter (car (find-files (assoc-ref inputs "libc") "ld-linux.*\\.so"))) - (interpreter32 (car (find-files (assoc-ref inputs "libc32") "ld-linux.*\\.so")))) - (for-each - (lambda (plan) - (match plan - ((binary runpath) - (binary-patch binary (if (64-bit? binary) - interpreter - interpreter32) - runpath)) - ((binary) - (binary-patch binary (if (64-bit? binary) - interpreter - interpreter32) - #f)))) - patchelf-plan)) + + (when (and patchelf-plan + (not (null? patchelf-plan))) + (let ((interpreter (car (find-files (assoc-ref inputs "libc") "ld-linux.*\\.so"))) + (interpreter32 (car (find-files (assoc-ref inputs "libc32") "ld-linux.*\\.so")))) + (for-each + (lambda (plan) + (match plan + ((binary runpath) + (binary-patch binary (if (64-bit? binary) + interpreter + interpreter32) + runpath)) + ((binary) + (binary-patch binary (if (64-bit? binary) + interpreter + interpreter32) + #f)))) + patchelf-plan))) #t) (define %standard-phases -- cgit v1.2.3