2021-01-19 21:20:11 +00:00
|
|
|
{stdenv, lib, fetchurl, ocaml, pkg-config, findlib, SDL, SDL_image, SDL_mixer, SDL_ttf, SDL_gfx, lablgl }:
|
2013-12-05 15:20:32 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
pname = "ocamlsdl";
|
|
|
|
in
|
|
|
|
|
2021-01-11 12:49:15 +00:00
|
|
|
if lib.versionAtLeast ocaml.version "4.06"
|
2018-08-29 13:44:12 +01:00
|
|
|
then throw "${pname} is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
|
|
|
|
2016-10-05 08:32:30 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2013-12-05 15:20:32 +00:00
|
|
|
name = "${pname}-${version}";
|
2016-10-05 08:32:30 +01:00
|
|
|
version = "0.9.1";
|
2013-12-05 15:20:32 +00:00
|
|
|
|
2021-01-19 21:20:11 +00:00
|
|
|
src = fetchurl {
|
2016-02-28 12:07:42 +00:00
|
|
|
url = "mirror://sourceforge/project/ocamlsdl/OCamlSDL/ocamlsdl-0.9.1/ocamlsdl-0.9.1.tar.gz";
|
2013-12-05 15:20:32 +00:00
|
|
|
sha256 = "abfb295b263dc11e97fffdd88ea1a28b46df8cc2b196777093e4fe7f509e4f8f";
|
|
|
|
};
|
|
|
|
|
2022-02-22 09:59:04 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ocaml findlib ];
|
|
|
|
buildInputs = [ SDL SDL_image SDL_mixer SDL_ttf SDL_gfx lablgl ];
|
2013-12-05 15:20:32 +00:00
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
propagatedBuildInputs = [ SDL SDL_image SDL_mixer SDL_ttf SDL_gfx pkg-config ];
|
2013-12-05 15:20:32 +00:00
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
|
|
|
meta = {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://ocamlsdl.sourceforge.net/";
|
2013-12-05 15:20:32 +00:00
|
|
|
description = "OCaml bindings for SDL 1.2";
|
2021-01-11 12:49:15 +00:00
|
|
|
license = lib.licenses.lgpl21;
|
2013-12-05 15:20:32 +00:00
|
|
|
};
|
|
|
|
}
|