gnu: ocaml-num: Fix race condition.

* gnu/packages/ocaml.scm (ocaml-num)[arguments]: Fix race condition.
This commit is contained in:
Julien Lepiller 2022-04-30 16:54:43 +02:00
parent 3ee7e8c5b9
commit d0da63c576
No known key found for this signature in database
GPG key ID: 53D457B2D636EE82

View file

@ -1045,6 +1045,19 @@ (define-public ocaml-num
(sha256 (sha256
(base32 "1vzdnvpj5dbj3ifx03v25pj2jj1ccav072v4d29pk1czdba2lzfc")))) (base32 "1vzdnvpj5dbj3ifx03v25pj2jj1ccav072v4d29pk1czdba2lzfc"))))
(build-system dune-build-system) (build-system dune-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-race
(lambda _
;; There's a race between bng.o and bng_generic.c. Both depend on
;; the architecture specific bng.c, but only the latter declares
;; the dependency.
(mkdir-p "_build/default/src")
(for-each
(lambda (f)
(copy-file f (string-append "_build/default/" f)))
(find-files "src" "bng_.*\\.c")))))))
(home-page "https://github.com/ocaml/num") (home-page "https://github.com/ocaml/num")
(synopsis "Arbitrary-precision integer and rational arithmetic") (synopsis "Arbitrary-precision integer and rational arithmetic")
(description "OCaml-Num contains the legacy Num library for (description "OCaml-Num contains the legacy Num library for