aboutsummaryrefslogtreecommitdiff
path: root/guix/build/gnu-build-system.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-09-01 01:14:31 +0200
committerLudovic Courtès <ludo@gnu.org>2012-09-01 01:14:31 +0200
commitdc4e02572ec8726957402c1b0c2c6d37e2589af7 (patch)
tree5e72ae07cf3fffbb2a3bbfc1bb385aef0ed7c1f9 /guix/build/gnu-build-system.scm
parentf1f100b297fd0bf1fad4a1dc1b2764c6e85901db (diff)
downloadgnu-guix-dc4e02572ec8726957402c1b0c2c6d37e2589af7.tar
gnu-guix-dc4e02572ec8726957402c1b0c2c6d37e2589af7.tar.gz
build-system/gnu: Add `path-exclusions' parameter.
* guix/build/gnu-build-system.scm (set-paths): Add new `path-exclusions' parameter; honor it. * guix/build-system/gnu.scm (gnu-build): New `path-exclusions' keyword parameter; pass it to BUILDER. * distro/base.scm (gcc-4.7): Exclude "libc" from $LIBRARY_PATH.
Diffstat (limited to 'guix/build/gnu-build-system.scm')
-rw-r--r--guix/build/gnu-build-system.scm30
1 files changed, 25 insertions, 5 deletions
diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
index 4ff4aca6a0..763665590d 100644
--- a/guix/build/gnu-build-system.scm
+++ b/guix/build/gnu-build-system.scm
@@ -47,17 +47,37 @@
#f
dir))
-(define* (set-paths #:key inputs #:allow-other-keys)
+(define* (set-paths #:key inputs (path-exclusions '())
+ #:allow-other-keys)
(let ((inputs (map cdr inputs)))
- (set-path-environment-variable "PATH" '("bin") inputs)
- (set-path-environment-variable "CPATH" '("include") inputs)
- (set-path-environment-variable "LIBRARY_PATH" '("lib" "lib64") inputs)
+ (set-path-environment-variable "PATH" '("bin")
+ (remove (cute member <>
+ (or (assoc-ref path-exclusions
+ "PATH")
+ '()))
+ inputs))
+ (set-path-environment-variable "CPATH" '("include")
+ (remove (cute member <>
+ (or (assoc-ref path-exclusions
+ "CPATH")
+ '()))
+ inputs))
+ (set-path-environment-variable "LIBRARY_PATH" '("lib" "lib64")
+ (remove (cute member <>
+ (or (assoc-ref path-exclusions
+ "LIBRARY_PATH")
+ '()))
+ inputs))
;; FIXME: Eventually move this to the `search-paths' field of the
;; `pkg-config' package.
(set-path-environment-variable "PKG_CONFIG_PATH"
'("lib/pkgconfig" "lib64/pkgconfig")
- inputs)
+ (remove (cute member <>
+ (or (assoc-ref path-exclusions
+ "PKG_CONFIG_PATH")
+ '()))
+ inputs))
;; Dump the environment variables as a shell script, for handy debugging.
(system "export > environment-variables")))