summaryrefslogtreecommitdiff
path: root/guix/build
diff options
context:
space:
mode:
Diffstat (limited to 'guix/build')
-rw-r--r--guix/build/gnu-build-system.scm2
-rw-r--r--guix/build/perl-build-system.scm6
-rw-r--r--guix/build/profiles.scm24
-rw-r--r--guix/build/utils.scm13
4 files changed, 31 insertions, 14 deletions
diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
index 1dfd85450c..59394c2cac 100644
--- a/guix/build/gnu-build-system.scm
+++ b/guix/build/gnu-build-system.scm
@@ -393,6 +393,8 @@ makefiles."
(or (elf-file? file) (ar-file? file))
(or (not debug-output)
(make-debug-file file))
+ ;; Ensure libraries are writable.
+ (chmod file #o755)
(zero? (apply system* strip-command
(append strip-flags (list file))))
(or (not debug-output)
diff --git a/guix/build/perl-build-system.scm b/guix/build/perl-build-system.scm
index 8f480eae16..b2024e4406 100644
--- a/guix/build/perl-build-system.scm
+++ b/guix/build/perl-build-system.scm
@@ -42,7 +42,11 @@
"--installdirs=site" ,@module-build-flags))
((file-exists? "Makefile.PL")
`("Makefile.PL" ,(string-append "PREFIX=" out)
- "INSTALLDIRS=site" ,@make-maker-flags))
+ ;; Prevent installation of 'perllocal.pod' files for
+ ;; determinism. These are typically used to build a
+ ;; catalogue of installed packages, but does not provide
+ ;; any useful information when installed with a module.
+ "INSTALLDIRS=site" "NO_PERLLOCAL=1" ,@make-maker-flags))
(else (error "no Build.PL or Makefile.PL found")))))
(format #t "running `perl' with arguments ~s~%" args)
(zero? (apply system* "perl" args))))
diff --git a/guix/build/profiles.scm b/guix/build/profiles.scm
index 6e316d5d2c..42eabfaf19 100644
--- a/guix/build/profiles.scm
+++ b/guix/build/profiles.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015, 2017 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -39,17 +39,21 @@
'GUIX_PROFILE' environment variable. This allows users to specify what the
user-friendly name of the profile is, for instance ~/.guix-profile rather than
/gnu/store/...-profile."
- (let ((replacement (string-append "${GUIX_PROFILE:-" profile "}")))
+ (let ((replacement (string-append "${GUIX_PROFILE:-" profile "}"))
+ (crop (cute string-drop <> (string-length profile))))
(match-lambda
((search-path . value)
- (let* ((separator (search-path-specification-separator search-path))
- (items (string-tokenize* value separator))
- (crop (cute string-drop <> (string-length profile))))
- (cons search-path
- (string-join (map (lambda (str)
- (string-append replacement (crop str)))
- items)
- separator)))))))
+ (match (search-path-specification-separator search-path)
+ (#f
+ (cons search-path
+ (string-append replacement (crop value))))
+ ((? string? separator)
+ (let ((items (string-tokenize* value separator)))
+ (cons search-path
+ (string-join (map (lambda (str)
+ (string-append replacement (crop str)))
+ items)
+ separator)))))))))
(define (write-environment-variable-definition port)
"Write the given environment variable definition to PORT."
diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index bc6f114152..cf09326393 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
@@ -400,10 +400,17 @@ for under the directories designated by FILES. For example:
(delete-duplicates input-dirs)))
(define (list->search-path-as-string lst separator)
- (string-join lst separator))
+ (if separator
+ (string-join lst separator)
+ (match lst
+ ((head rest ...) head)
+ (() ""))))
(define* (search-path-as-string->list path #:optional (separator #\:))
- (string-tokenize path (char-set-complement (char-set separator))))
+ (if separator
+ (string-tokenize path
+ (char-set-complement (char-set separator)))
+ (list path)))
(define* (set-path-environment-variable env-var files input-dirs
#:key