From 725fe60de069ccdb8ba22da63d740cc572c559cb Mon Sep 17 00:00:00 2001 From: bezmuth Date: Wed, 3 Aug 2022 16:04:24 +0100 Subject: [PATCH] ocamlPackages.ctypes_stubs_js: init at 0.1 --- .../ocaml-modules/ctypes_stubs_js/default.nix | 36 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 4 +++ 2 files changed, 40 insertions(+) create mode 100644 pkgs/development/ocaml-modules/ctypes_stubs_js/default.nix diff --git a/pkgs/development/ocaml-modules/ctypes_stubs_js/default.nix b/pkgs/development/ocaml-modules/ctypes_stubs_js/default.nix new file mode 100644 index 00000000000..f7e50ddca70 --- /dev/null +++ b/pkgs/development/ocaml-modules/ctypes_stubs_js/default.nix @@ -0,0 +1,36 @@ +{ + lib, fetchFromGitLab, buildDunePackage +, integers_stubs_js, ctypes, ppx_expect +, js_of_ocaml-compiler +, nodejs +}: + +buildDunePackage rec { + pname = "ctypes_stubs_js"; + version = "0.1"; + + minimalOCamlVersion = "4.08"; + + src = fetchFromGitLab { + owner = "nomadic-labs"; + repo = pname; + rev = version; + sha256 = "sha256-OJIzg2hnwkXkQHd4bRR051eLf4HNWa/XExxbj46SyUs="; + }; + + propagatedBuildInputs = [ integers_stubs_js ]; + checkInputs = [ + ctypes + js_of_ocaml-compiler + ppx_expect + nodejs + ]; + doCheck = true; + + meta = { + description = "Js_of_ocaml Javascript stubs for the OCaml ctypes library"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ bezmuth ]; + homepage = "https://gitlab.com/nomadic-labs/ctypes_stubs_js"; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 30437fb92cf..547050b4f39 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -274,6 +274,10 @@ let ctypes = callPackage ../development/ocaml-modules/ctypes { }; + ctypes_stubs_js = callPackage ../development/ocaml-modules/ctypes_stubs_js { + inherit (pkgs) nodejs; + }; + dap = callPackage ../development/ocaml-modules/dap { }; data-encoding = callPackage ../development/ocaml-modules/data-encoding { };