summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--gnu/packages/ocaml.scm8
1 files changed, 7 insertions, 1 deletions
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 08b4fcf2b0..492149af9a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1627,7 +1627,13 @@ spans without being subject to operating system calendar time adjustments.")
                                          "/lib/ocaml/site-lib/cmdliner"))
        #:phases
        (modify-phases %standard-phases
-         (delete 'configure))))
+         (delete 'configure)
+         (add-before 'build 'fix-source-file-order
+           (lambda _
+             (substitute* "build.ml"
+               (("Sys.readdir dir")
+                "let a = Sys.readdir dir in Array.sort String.compare a; a"))
+             #t)))))
     (home-page "http://erratique.ch/software/cmdliner")
     (synopsis "Declarative definition of command line interfaces for OCaml")
     (description "Cmdliner is a module for the declarative definition of command