Skip to content

Commit

Permalink
add mongo libs
Browse files Browse the repository at this point in the history
  • Loading branch information
anmonteiro committed Feb 12, 2021
1 parent c30fbc3 commit c2062ec
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ocaml/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,12 @@ websocketafPackages // {
buildInputs = o.buildInputs ++ [ dune-configurator ];
});

mongo = callPackage ./mongo { ocamlPackages = oself; };
mongo-lwt = callPackage ./mongo/lwt.nix { ocamlPackages = oself; };
mongo-lwt-unix = callPackage ./mongo/lwt-unix.nix { ocamlPackages = oself; };
ppx_deriving_bson = callPackage ./mongo/ppx.nix { ocamlPackages = oself; };
bson = callPackage ./mongo/bson.nix { ocamlPackages = oself; };

mrmime = callPackage ./mrmime { ocamlPackages = oself; };

mtime = osuper.mtime.override { jsooSupport = false; };
Expand Down
14 changes: 14 additions & 0 deletions ocaml/mongo/bson.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{ ocamlPackages, lib }:

with ocamlPackages;

buildDunePackage {
pname = "bson";
src = builtins.fetchurl {
url = https://github.com/anmonteiro/ocaml-mongodb/archive/535ae1b003b9c8a3844b92a78d2123881f2d404b.tar.gz;
sha256 = "01243z8ibmns7lqm0mx7as7xpql3c81qyqx63ylgjzpaq85i32gk";
};
version = "0.0.1-dev";

propagatedBuildInputs = [ angstrom faraday ];
}
10 changes: 10 additions & 0 deletions ocaml/mongo/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{ ocamlPackages, lib }:

with ocamlPackages;

buildDunePackage {
pname = "mongo";
inherit (bson) src version;

propagatedBuildInputs = [ bson ];
}
10 changes: 10 additions & 0 deletions ocaml/mongo/lwt-unix.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{ ocamlPackages, lib }:

with ocamlPackages;

buildDunePackage {
pname = "mongo-lwt-unix";
inherit (bson) src version;

propagatedBuildInputs = [ mongo-lwt gluten-lwt-unix ];
}
10 changes: 10 additions & 0 deletions ocaml/mongo/lwt.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{ ocamlPackages, lib }:

with ocamlPackages;

buildDunePackage {
pname = "mongo-lwt";
inherit (bson) src version;

propagatedBuildInputs = [ mongo lwt mirage-crypto gluten-lwt pbkdf base64 ];
}
10 changes: 10 additions & 0 deletions ocaml/mongo/ppx.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{ ocamlPackages, lib }:

with ocamlPackages;

buildDunePackage {
pname = "ppx_deriving_bson";
inherit (bson) src version;

propagatedBuildInputs = [ ppxlib ppx_deriving bson ];
}

0 comments on commit c2062ec

Please sign in to comment.