From 1853c7df0f50be9a95eff3ac11124d624ef752b0 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 23 Nov 2022 06:28:16 +0100 Subject: [PATCH] =?UTF-8?q?ocamlPackages.calendar:=202.5=20=E2=86=92=203.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ocaml-modules/calendar/default.nix | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/pkgs/development/ocaml-modules/calendar/default.nix b/pkgs/development/ocaml-modules/calendar/default.nix index 4c089b76f3ed..cf349eeb8bb1 100644 --- a/pkgs/development/ocaml-modules/calendar/default.nix +++ b/pkgs/development/ocaml-modules/calendar/default.nix @@ -1,27 +1,25 @@ -{ stdenv, lib, fetchurl, ocaml, findlib }: +{ lib, buildDunePackage, fetchFromGitHub, re }: -stdenv.mkDerivation rec { - pname = "ocaml-calendar"; - version = "2.5"; +buildDunePackage rec { + pname = "calendar"; + version = "3.0.0"; + minimalOCamlVersion = "4.03"; - src = fetchurl { - url = "https://forge.ocamlcore.org/frs/download.php/915/calendar-${version}.tar.bz2"; - sha256 = "04pvhwb664g3s644c7v7419a3kvf5s3pynkhmk5j59dvlfm1yf0f"; + src = fetchFromGitHub { + owner = "ocaml-community"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-+VQzi6pEMqzV1ZR84Yjdu4jsJEWtx+7bd6PQGX7TiEs="; }; - nativeBuildInputs = [ ocaml findlib ]; + propagatedBuildInputs = [ re ]; strictDeps = true; - createFindlibDestdir = true; - meta = { - homepage = "https://forge.ocamlcore.org/projects/calendar/"; - description = "An Objective Caml library managing dates and times"; - license = "LGPL"; - platforms = ocaml.meta.platforms or [ ]; - maintainers = [ - lib.maintainers.gal_bolle - ]; + inherit (src.meta) homepage; + description = "A library for handling dates and times"; + license = lib.licenses.lgpl21Plus; + maintainers = [ lib.maintainers.gal_bolle ]; }; }