From 73a1d0ddc12a959a3644f204cdbe35707e0d29a3 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Fri, 26 Jan 2024 14:50:19 +0100 Subject: [PATCH] ocamlPackages.timedesc: init at 2.0.0 --- .../ocaml-modules/timedesc/default.nix | 36 +++++++++++++++++++ .../ocaml-modules/timedesc/tzdb.nix | 15 ++++++++ .../ocaml-modules/timedesc/tzlocal.nix | 16 +++++++++ pkgs/top-level/ocaml-packages.nix | 4 +++ 4 files changed, 71 insertions(+) create mode 100644 pkgs/development/ocaml-modules/timedesc/default.nix create mode 100644 pkgs/development/ocaml-modules/timedesc/tzdb.nix create mode 100644 pkgs/development/ocaml-modules/timedesc/tzlocal.nix diff --git a/pkgs/development/ocaml-modules/timedesc/default.nix b/pkgs/development/ocaml-modules/timedesc/default.nix new file mode 100644 index 000000000000..b77f5af17b40 --- /dev/null +++ b/pkgs/development/ocaml-modules/timedesc/default.nix @@ -0,0 +1,36 @@ +{ lib +, fetchurl +, buildDunePackage +, angstrom +, ptime +, seq +, timedesc-tzdb +, timedesc-tzlocal +}: + +buildDunePackage rec { + pname = "timedesc"; + version = "2.0.0"; + + src = fetchurl { + url = "https://github.com/daypack-dev/timere/releases/download/timedesc-${version}/timedesc-${version}.tar.gz"; + hash = "sha256-NnnQpWOE1mt/F5lkWRPdDwpqXCUlcNi+Z5GE6YQQLK8="; + }; + + sourceRoot = "."; + + propagatedBuildInputs = [ + angstrom + ptime + seq + timedesc-tzdb + timedesc-tzlocal + ]; + + meta = { + description = "OCaml date time handling library"; + homepage = "https://github.com/daypack-dev/timere"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/pkgs/development/ocaml-modules/timedesc/tzdb.nix b/pkgs/development/ocaml-modules/timedesc/tzdb.nix new file mode 100644 index 000000000000..95fab02d11a0 --- /dev/null +++ b/pkgs/development/ocaml-modules/timedesc/tzdb.nix @@ -0,0 +1,15 @@ +{ lib +, buildDunePackage +, timedesc +}: + +buildDunePackage { + pname = "timedesc-tzdb"; + + inherit (timedesc) version src sourceRoot; + + meta = timedesc.meta // { + description = "Virtual library for Timedesc time zone database backends"; + }; +} + diff --git a/pkgs/development/ocaml-modules/timedesc/tzlocal.nix b/pkgs/development/ocaml-modules/timedesc/tzlocal.nix new file mode 100644 index 000000000000..6dcbfd741075 --- /dev/null +++ b/pkgs/development/ocaml-modules/timedesc/tzlocal.nix @@ -0,0 +1,16 @@ +{ lib +, buildDunePackage +, timedesc +}: + +buildDunePackage { + pname = "timedesc-tzlocal"; + + inherit (timedesc) version src sourceRoot; + + minimalOCamlVersion = "4.08"; + + meta = timedesc.meta // { + description = "Virtual library for Timedesc local time zone detection backends"; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 7b3aa1c57abd..bd8204ae10cb 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1757,6 +1757,10 @@ let timed = callPackage ../development/ocaml-modules/timed { }; + timedesc = callPackage ../development/ocaml-modules/timedesc { }; + timedesc-tzdb = callPackage ../development/ocaml-modules/timedesc/tzdb.nix { }; + timedesc-tzlocal = callPackage ../development/ocaml-modules/timedesc/tzlocal.nix { }; + tiny_httpd = callPackage ../development/ocaml-modules/tiny_httpd { }; tls = callPackage ../development/ocaml-modules/tls { };