summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/development/ocaml-modules/lambdasoup/default.nix23
-rw-r--r--pkgs/top-level/ocaml-packages.nix2
2 files changed, 25 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/lambdasoup/default.nix b/pkgs/development/ocaml-modules/lambdasoup/default.nix
new file mode 100644
index 00000000000..b4980240c90
--- /dev/null
+++ b/pkgs/development/ocaml-modules/lambdasoup/default.nix
@@ -0,0 +1,23 @@
+{ lib, fetchFromGitHub, buildDunePackage, markup }:
+
+buildDunePackage rec {
+  pname = "lambdasoup";
+  version = "0.6.3"; # NB: double-check the license when updating
+
+  src = fetchFromGitHub {
+    owner = "aantron";
+    repo = pname;
+    rev = version;
+    sha256 = "1w4zp3vswijzvrx0c3fv269ncqwnvvrzc46629nnwm9shwv07vmv";
+  };
+
+  propagatedBuildInputs = [ markup ];
+
+  meta = {
+    description = "Functional HTML scraping and rewriting with CSS in OCaml";
+    homepage = "https://aantron.github.io/lambdasoup/";
+    license = lib.licenses.bsd2;
+    maintainers = [ lib.maintainers.vbgl ];
+  };
+
+}
diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix
index 949c5b6a308..fcb9a61b0f5 100644
--- a/pkgs/top-level/ocaml-packages.nix
+++ b/pkgs/top-level/ocaml-packages.nix
@@ -376,6 +376,8 @@ let
 
     lacaml = callPackage ../development/ocaml-modules/lacaml { };
 
+    lambdasoup = callPackage ../development/ocaml-modules/lambdasoup { };
+
     lambdaTerm-1_6 = callPackage ../development/ocaml-modules/lambda-term/1.6.nix { lwt = lwt2; };
     lambdaTerm =
       if lib.versionOlder "4.02" ocaml.version