at 23.11-beta 37 lines 1.2 kB view raw
1{ lib, fetchurl, buildDunePackage, ocaml, qcheck }: 2 3buildDunePackage rec { 4 pname = "stdint"; 5 version = "0.7.2"; 6 7 duneVersion = "3"; 8 9 minimalOCamlVersion = "4.03"; 10 11 src = fetchurl { 12 url = "https://github.com/andrenth/ocaml-stdint/releases/download/${version}/stdint-${version}.tbz"; 13 sha256 = "sha256-FWAZjYvJx68+qVLEDavoJmZpQhDsw/35u/60MhHpd+Y="; 14 }; 15 16 # 1. disable remaining broken tests, see 17 # https://github.com/andrenth/ocaml-stdint/issues/59 18 # 2. fix tests to liberal test range 19 # https://github.com/andrenth/ocaml-stdint/pull/61 20 postPatch = '' 21 substituteInPlace tests/stdint_test.ml \ 22 --replace 'test "An integer should perform left-shifts correctly"' \ 23 'skip "An integer should perform left-shifts correctly"' \ 24 --replace 'test "Logical shifts must not sign-extend"' \ 25 'skip "Logical shifts must not sign-extend"' 26 ''; 27 28 doCheck = lib.versionAtLeast ocaml.version "4.08"; 29 checkInputs = [ qcheck ]; 30 31 meta = { 32 description = "Various signed and unsigned integers for OCaml"; 33 homepage = "https://github.com/andrenth/ocaml-stdint"; 34 license = lib.licenses.mit; 35 maintainers = [ lib.maintainers.gebner ]; 36 }; 37}