From 28c7e68e995213078ecab0d61a23b688bdb3cf3b Mon Sep 17 00:00:00 2001 From: Ozan Sener Date: Sat, 6 Mar 2021 22:10:57 +0100 Subject: [PATCH] ocamlPackages.ppx_cstubs : Init at 0.6.1.1 --- .../ocaml-modules/ppx_cstubs/default.nix | 44 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 4 ++ 2 files changed, 48 insertions(+) create mode 100644 pkgs/development/ocaml-modules/ppx_cstubs/default.nix diff --git a/pkgs/development/ocaml-modules/ppx_cstubs/default.nix b/pkgs/development/ocaml-modules/ppx_cstubs/default.nix new file mode 100644 index 00000000000..b4ddb4dd5e4 --- /dev/null +++ b/pkgs/development/ocaml-modules/ppx_cstubs/default.nix @@ -0,0 +1,44 @@ +{ lib +, fetchFromGitHub +, buildDunePackage +, bigarray-compat +, containers +, cppo +, ctypes +, integers +, num +, ppxlib +, re +}: + +buildDunePackage rec { + pname = "ppx_cstubs"; + version = "0.6.1.1"; + + useDune2 = true; + + src = fetchFromGitHub { + owner = "fdopen"; + repo = "ppx_cstubs"; + rev = version; + sha256 = "0rgg78435ypi6ryhcq5ljkch4qjvra2jqjd47c2hhhcbwvi2ssxh"; + }; + + buildInputs = [ + bigarray-compat + containers + cppo + ctypes + integers + num + ppxlib + re + ]; + + meta = with lib; { + homepage = "https://github.com/fdopen/ppx_cstubs"; + description = "Preprocessor for easier stub generation with ocaml-ctypes"; + license = licenses.mit; + maintainers = [ maintainers.osener ]; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index f31125ef82f..3c8c500d8b5 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1001,6 +1001,10 @@ let ppx_cstruct = callPackage ../development/ocaml-modules/cstruct/ppx.nix { }; + ppx_cstubs = callPackage ../development/ocaml-modules/ppx_cstubs { + ppxlib = ppxlib.override { version = "0.22.0"; }; + }; + ppx_derivers = callPackage ../development/ocaml-modules/ppx_derivers {}; ppx_deriving = callPackage ../development/ocaml-modules/ppx_deriving {};