Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 fetchFromGitHub, 4 buildDunePackage, 5 xxHash, 6 ctypes, 7 ctypes-foreign, 8 dune-configurator, 9 ppx_expect, 10}: 11 12buildDunePackage rec { 13 pname = "xxhash"; 14 version = "0.2"; 15 16 minimalOCamlVersion = "4.08"; 17 18 src = fetchFromGitHub { 19 owner = "314eter"; 20 repo = "ocaml-xxhash"; 21 tag = "v${version}"; 22 hash = "sha256-0+ac5EWV9DCVMT4wOcXC95GVEwsUIZzFn2laSzmK6jE="; 23 }; 24 25 postPatch = '' 26 substituteInPlace stubs/dune --replace-warn 'ctypes))' 'ctypes ctypes.stubs))' 27 ''; 28 29 buildInputs = [ 30 dune-configurator 31 ]; 32 33 propagatedBuildInputs = [ 34 ctypes 35 ctypes-foreign 36 xxHash 37 ]; 38 39 doCheck = true; 40 41 checkInputs = [ 42 ppx_expect 43 ]; 44 45 meta = { 46 homepage = "https://github.com/314eter/ocaml-xxhash"; 47 description = "Bindings for xxHash, an extremely fast hash algorithm"; 48 license = with lib.licenses; [ mit ]; 49 maintainers = with lib.maintainers; [ toastal ]; 50 }; 51}