ocamlPackages.carton: Tests require getconf
https://github.com/mirage/ocaml-git/blob/471406dde6c3056ea49547de379fef12871da48b/bin/fiber/fiber.ml#L132
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
diff --git a/bin/fiber/fiber.ml b/bin/fiber/fiber.ml
|
||||
index 188a92cc9..6087a8687 100644
|
||||
--- a/bin/fiber/fiber.ml
|
||||
+++ b/bin/fiber/fiber.ml
|
||||
@@ -129,7 +129,7 @@ let worker pool =
|
||||
|
||||
let get_concurrency () =
|
||||
try
|
||||
- let ic = Unix.open_process_in "getconf _NPROCESSORS_ONLN" in
|
||||
+ let ic = Unix.open_process_in "@getconf@/bin/getconf _NPROCESSORS_ONLN" in
|
||||
let close () = ignore (Unix.close_process_in ic) in
|
||||
let sc = Scanf.Scanning.from_channel ic in
|
||||
try
|
||||
@@ -3,6 +3,7 @@
|
||||
, checkseum, logs, psq, fmt
|
||||
, result, rresult, fpath, base64, bos, digestif, alcotest
|
||||
, crowbar, alcotest-lwt, lwt, findlib, mirage-flow, cmdliner, hxd
|
||||
, getconf, substituteAll
|
||||
}:
|
||||
|
||||
buildDunePackage rec {
|
||||
@@ -16,6 +17,13 @@ buildDunePackage rec {
|
||||
sha256 = "sha256-7mgCgu87Cn4XhjEhonlz9lhgTw0Cu5hnxNJ1wXr+Qhw=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(substituteAll {
|
||||
src = ./carton-find-getconf.patch;
|
||||
getconf = "${getconf}";
|
||||
})
|
||||
];
|
||||
|
||||
# remove changelogs for mimic and the git* packages
|
||||
postPatch = ''
|
||||
rm CHANGES.md
|
||||
|
||||
Reference in New Issue
Block a user