1{ lib, fetchFromGitHub, buildDunePackage, core, core_unix ? null, pkg-config 2, sqlite }: 3buildDunePackage rec { 4 pname = "hack_parallel"; 5 version = "1.0.1"; 6 minimalOCamlVersion = "4.08"; 7 8 src = fetchFromGitHub { 9 owner = "rvantonder"; 10 repo = "hack_parallel"; 11 rev = version; 12 sha256 = "0qjlkw35r4q2cm0n2x0i73zvx1xgrp6axaia2nm8zxpm49mid629"; 13 }; 14 15 patches = [ ./hack_parallel.patch ]; 16 17 postPatch = '' 18 substituteInPlace src/third-party/hack_core/hack_caml.ml --replace 'include Pervasives' "" 19 substituteInPlace \ 20 src/interface/hack_parallel_intf.mli \ 21 src/procs/worker.ml \ 22 src/third-party/hack_core/hack_core_list.ml \ 23 src/third-party/hack_core/hack_result.ml* \ 24 src/utils/collections/myMap.ml \ 25 src/utils/daemon.ml* \ 26 src/utils/exit_status.ml \ 27 src/utils/hack_path.ml \ 28 src/utils/measure.ml \ 29 src/utils/timeout.ml \ 30 --replace Pervasives. Stdlib. 31 substituteInPlace src/utils/sys_utils.ml --replace String.create Bytes.create 32 ''; 33 34 nativeBuildInputs = [ pkg-config ]; 35 36 propagatedBuildInputs = [ core core_unix sqlite ]; 37 38 meta = { 39 description = 40 "Core parallel and shared memory library used by Hack, Flow, and Pyre"; 41 license = lib.licenses.mit; 42 homepage = "https://github.com/rvantonder/hack_parallel"; 43 }; 44}