diff --git a/pkgs/development/ocaml-modules/graphics/default.nix b/pkgs/development/ocaml-modules/graphics/default.nix new file mode 100644 index 000000000000..6a3217431b43 --- /dev/null +++ b/pkgs/development/ocaml-modules/graphics/default.nix @@ -0,0 +1,23 @@ +{ lib, fetchurl, buildDunePackage, dune-configurator, libX11 }: + +buildDunePackage rec { + + pname = "graphics"; + version = "5.1.0"; + + useDune2 = true; + + src = fetchurl { + url = "https://github.com/ocaml/graphics/releases/download/${version}/graphics-${version}.tbz"; + sha256 = "16z997mp0ccilaqqvmz3wp7vx0ghaf4ik9qklgd4piklcl1yv5n5"; + }; + + buildInputs = [ dune-configurator ]; + propagatedBuildInputs = [ libX11 ]; + + meta = { + homepage = "https://github.com/ocaml/graphics"; + description = "A set of portable drawing primitives"; + license = lib.licenses.lgpl2; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 485dfa7d807e..7e12a3db3f78 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -347,6 +347,11 @@ let gmetadom = callPackage ../development/ocaml-modules/gmetadom { }; + graphics = + if lib.versionOlder "4.09" ocaml.version + then callPackage ../development/ocaml-modules/graphics { } + else null; + graphql = callPackage ../development/ocaml-modules/graphql { }; graphql-cohttp = callPackage ../development/ocaml-modules/graphql/cohttp.nix { };