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