aboutsummaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
Diffstat (limited to 'guix')
-rw-r--r--guix/build-system/gnu.scm2
-rw-r--r--guix/build/gnu-build-system.scm30
2 files changed, 27 insertions, 5 deletions
diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm
index 7bdd4174bd..f4e7c1bcc4 100644
--- a/guix/build-system/gnu.scm
+++ b/guix/build-system/gnu.scm
@@ -47,6 +47,7 @@
(make-flags ''())
(patches ''()) (patch-flags ''("--batch" "-p1"))
(out-of-source? #f)
+ (path-exclusions ''())
(tests? #t)
(parallel-build? #t) (parallel-tests? #t)
(patch-shebangs? #t)
@@ -74,6 +75,7 @@ input derivation INPUTS, using the usual procedure of the GNU Build System."
#:configure-flags ,configure-flags
#:make-flags ,make-flags
#:out-of-source? ,out-of-source?
+ #:path-exclusions ,path-exclusions
#:tests? ,tests?
#:parallel-build? ,parallel-build?
#:parallel-tests? ,parallel-tests?
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")))