21 if lib.versionOlder ocaml.version "4.03" then
22 throw "tsdl is not available for OCaml ${ocaml.version}"
28 webpage = "https://erratique.ch/software/${pname}";
32 pname = "ocaml${ocaml.version}-${pname}";
36 url = "${webpage}/releases/${pname}-${version}.tbz";
37 hash = "sha256-ZN4+trqesU1IREKcwm1Ro37jszKG8XcVigoE4BdGhzs=";
49 buildInputs = [ topkg ];
50 propagatedBuildInputs =
56 ++ lib.optionals stdenv.hostPlatform.isDarwin [
65 # The following is done to avoid an additional dependency (ncurses)
66 # due to linking in the custom bytecode runtime. Instead, just
67 # compile directly into a native binary, even if it's just a
68 # temporary build product.
69 substituteInPlace myocamlbuild.ml \
70 --replace ".byte" ".native"
73 inherit (topkg) buildPhase installPhase;
77 description = "Thin bindings to the cross-platform SDL library";
78 license = licenses.isc;
79 inherit (ocaml.meta) platforms;