diff --git a/guix-build.in b/guix-build.in
index 6440f0a4db1e858695310d255ccafe6b69685ad0..058e13109a5d57b569637e80fc61f49b1805bd74 100644
--- a/guix-build.in
+++ b/guix-build.in
@@ -198,8 +198,7 @@ Report bugs to: ~a.~%") "@PACKAGE_BUGREPORT@"))
     ;; TODO: Add more options.
     (set-build-options %store
                        #:keep-failed? (assoc-ref opts 'keep-failed?)
-                       #:build-cores (or (assoc-ref opts 'cores)
-                                         (current-processor-count)))
+                       #:build-cores (or (assoc-ref opts 'cores) 0))
 
     (if (assoc-ref opts 'derivations-only?)
         (format #t "~{~a~%~}" drv)
diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
index 112b34cd4d965950e7b7f3ea38886103f31b2743..2b7d1c180ea6271e223a51fa94dae8384bef9ee4 100644
--- a/guix/build/gnu-build-system.scm
+++ b/guix/build/gnu-build-system.scm
@@ -128,11 +128,18 @@ (define* (configure #:key outputs (configure-flags '()) out-of-source?
                   (string-append srcdir "/configure")
                   flags))))
 
+(define %parallel-job-count
+  ;; String to be passed next to GNU Make's `-j' argument.
+  (match (getenv "NIX_BUILD_CORES")
+    (#f "1")
+    ("0" (number->string (current-processor-count)))
+    (x x)))
+
 (define* (build #:key (make-flags '()) (parallel-build? #t)
                 #:allow-other-keys)
   (zero? (apply system* "make"
                 `(,@(if parallel-build?
-                        `("-j" ,(getenv "NIX_BUILD_CORES"))
+                        `("-j" ,%parallel-job-count)
                         '())
                   ,@make-flags))))
 
@@ -142,7 +149,7 @@ (define* (check #:key (make-flags '()) (tests? #t) (test-target "check")
   (if tests?
       (zero? (apply system* "make" test-target
                     `(,@(if parallel-tests?
-                            `("-j" ,(getenv "NIX_BUILD_CORES"))
+                            `("-j" ,%parallel-job-count)
                             '())
                       ,@make-flags)))
       (begin