summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
Diffstat (limited to 'guix')
-rw-r--r--guix/derivations.scm4
-rw-r--r--guix/packages.scm3
-rw-r--r--guix/store.scm11
3 files changed, 10 insertions, 8 deletions
diff --git a/guix/derivations.scm b/guix/derivations.scm
index a36a6559b4..6f73534c3c 100644
--- a/guix/derivations.scm
+++ b/guix/derivations.scm
@@ -458,7 +458,7 @@ known in advance, such as a file download."
((input . _)
(let ((path (add-to-store store
(basename input)
- #t #t "sha256" input)))
+ #t "sha256" input)))
(make-derivation-input path '()))))
(delete-duplicates inputs)))
(env-vars (env-vars-with-empty-outputs))
@@ -519,7 +519,7 @@ system, imported, and appears under FINAL-PATH in the resulting store path."
(let* ((files (map (match-lambda
((final-path . file-name)
(list final-path
- (add-to-store store (basename final-path) #t #f
+ (add-to-store store (basename final-path) #f
"sha256" file-name))))
files))
(builder
diff --git a/guix/packages.scm b/guix/packages.scm
index f1cd83c7e4..4d3b499bf4 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -248,8 +248,7 @@ PACKAGE for SYSTEM."
(define (intern file)
;; Add FILE to the store. Set the `recursive?' bit to #t, so that
;; file permissions are preserved.
- (add-to-store store (basename file)
- #t #t "sha256" file))
+ (add-to-store store (basename file) #t "sha256" file))
(define expand-input
;; Expand the given input tuple such that it contains only
diff --git a/guix/store.scm b/guix/store.scm
index a9126cb0b6..7b1da34678 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -496,14 +496,17 @@ path."
(file file-name))
#f
store-path)))
- (lambda (server basename fixed? recursive? hash-algo file-name)
- "Add the contents of FILE-NAME under BASENAME to the store. Note that
-FIXED? is for backward compatibility with old Nix versions and must be #t."
+ (lambda (server basename recursive? hash-algo file-name)
+ "Add the contents of FILE-NAME under BASENAME to the store. When
+RECURSIVE? is true and FILE-NAME designates a directory, the contents of
+FILE-NAME are added recursively; if FILE-NAME designates a flat file and
+RECURSIVE? is true, its contents are added, and its permission bits are
+kept. HASH-ALGO must be a string such as \"sha256\"."
(let* ((st (stat file-name #f))
(args `(,basename ,recursive? ,hash-algo ,st))
(cache (nix-server-add-to-store-cache server)))
(or (and st (hash-ref cache args))
- (let ((path (add-to-store server basename fixed? recursive?
+ (let ((path (add-to-store server basename #t recursive?
hash-algo file-name)))
(hash-set! cache args path)
path))))))