From 8a7b9ed9271f3b4549337bfa225fc1bb8b819806 Mon Sep 17 00:00:00 2001 From: xenia Date: Thu, 28 Nov 2024 02:05:16 -0500 Subject: [PATCH] pkgs: add ocaml-manual --- README.md | 4 ++++ overlay.nix | 2 ++ pkgs/ocaml/ocaml-manual/default.nix | 24 ++++++++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 pkgs/ocaml/ocaml-manual/default.nix diff --git a/README.md b/README.md index 5665b70..2a47dc6 100644 --- a/README.md +++ b/README.md @@ -136,6 +136,10 @@ logging for cats, in ocaml: libsystemd implementation in native ocaml: +### [`ocamlPackages.ocaml-manual`](./pkgs/ocaml/ocaml-manual) + +the ocaml html docs package from opam + ### [`python312Packages.feedvalidator` or `feedvalidator`](./pkgs/python/feedvalidator) the W3C atom/RSS feed validator library, diff --git a/overlay.nix b/overlay.nix index 1be6844..4721b71 100644 --- a/overlay.nix +++ b/overlay.nix @@ -24,6 +24,8 @@ final: prev: { ppx_unicode = ofinal.callPackage ./pkgs/ocaml/ppx_unicode {}; xlog = ofinal.callPackage ./pkgs/ocaml/xlog {}; systemd-ml = ofinal.callPackage ./pkgs/ocaml/systemd-ml {}; + + ocaml-manual = ofinal.callPackage ./pkgs/ocaml/ocaml-manual {}; }); python3Packages = prev.python3Packages.overrideScope (pfinal: pprev: { diff --git a/pkgs/ocaml/ocaml-manual/default.nix b/pkgs/ocaml/ocaml-manual/default.nix new file mode 100644 index 0000000..2d07332 --- /dev/null +++ b/pkgs/ocaml/ocaml-manual/default.nix @@ -0,0 +1,24 @@ +{ + fetchurl, + lib, + stdenvNoCC, + + ocaml, + + version ? lib.versions.majorMinor ocaml.version, +}: stdenvNoCC.mkDerivation { + pname = "ocaml-manual"; + inherit version; + + src = fetchurl { + url = "http://caml.inria.fr/distrib/ocaml-${version}/ocaml-${version}-refman-html.tar.gz"; + hash = "sha256-NhtwltAJKxG5bwvu4hevK4xv45gRRaLEtNQ9ZW5NyvU="; + }; + + buildPhase = ""; + + installPhase = '' + mkdir -p "$out/share/doc/ocaml" + cp -r . "$out/share/doc/ocaml/." + ''; +}