summaryrefslogtreecommitdiff
path: root/guix/derivations.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-07-01 15:37:58 +0200
committerLudovic Courtès <ludo@gnu.org>2012-07-02 01:35:39 +0200
commit4b1786aa2c2e21e5b0c439cf6ad91f157376af5e (patch)
tree9954de1a8f96a374a6210c1db8e40f608c49e4d1 /guix/derivations.scm
parent062c6927adf60d369ae00f8e191168c0b19b093a (diff)
Fix `derivation-hash' for outputs not sorted alphabetically.
* guix/derivations.scm (derivation-hash): Reorder OUTPUTS. * tests/derivations.scm ("multiple-output derivation, non-alphabetic order"): New test.
Diffstat (limited to 'guix/derivations.scm')
-rw-r--r--guix/derivations.scm3
1 files changed, 3 insertions, 0 deletions
diff --git a/guix/derivations.scm b/guix/derivations.scm
index a2bff44a5f..f85666bcb9 100644
--- a/guix/derivations.scm
+++ b/guix/derivations.scm
@@ -293,6 +293,9 @@ in SIZE bytes."
(string<? (derivation-input-path i1)
(derivation-input-path i2)))))
(sources (sort sources string<?))
+ (outputs (sort outputs
+ (lambda (o1 o2)
+ (string<? (car o1) (car o2)))))
(drv (make-derivation outputs inputs sources
system builder args env-vars)))
(sha256