gnu-build-system: Dump the values of environment variables.
authorLudovic Courtès <ludo@gnu.org>
Thu, 5 Jul 2012 22:50:07 +0000 (00:50 +0200)
committerLudovic Courtès <ludo@gnu.org>
Thu, 5 Jul 2012 22:50:07 +0000 (00:50 +0200)
* guix/build/gnu-build-system.scm (set-paths): Dump the value of
  environment variables in the `environment-variables' files, similar to
  what Nixpkgs does.

guix/build/gnu-build-system.scm

index 566903e..9035280 100644 (file)
   (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 "LIBRARY_PATH" '("lib" "lib64") inputs)
+
+    ;; Dump the environment variables as a shell script, for handy debugging.
+    (system "export > environment-variables")))
 
 (define* (unpack #:key source #:allow-other-keys)
   (and (zero? (system* "tar" "xvf" source))