From 61b89c4b58d27fb267678074e72315e80fdcc28c Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Fri, 2 Sep 2022 21:01:42 +0200 Subject: [PATCH] =?UTF-8?q?ocamlPackages.notty:=200.2.2=20=E2=86=92=200.2.?= =?UTF-8?q?3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ocaml-modules/notty/default.nix | 39 ++++++------------- 1 file changed, 12 insertions(+), 27 deletions(-) diff --git a/pkgs/development/ocaml-modules/notty/default.nix b/pkgs/development/ocaml-modules/notty/default.nix index 0e9de5807ff3..9bab0482668e 100644 --- a/pkgs/development/ocaml-modules/notty/default.nix +++ b/pkgs/development/ocaml-modules/notty/default.nix @@ -1,40 +1,25 @@ -{ stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, topkg, ocb-stubblr -, result, uucp, uuseg, uutf -, lwt ? null }: +{ lib, buildDunePackage, fetchurl, cppo +, uutf +, lwt +}: -with lib; +buildDunePackage rec { + version = "0.2.3"; + pname = "notty"; -if versionOlder ocaml.version "4.05" -|| versionAtLeast ocaml.version "4.14" -then throw "notty is not available for OCaml ${ocaml.version}" -else - -let withLwt = lwt != null; in - -stdenv.mkDerivation rec { - version = "0.2.2"; - pname = "ocaml${ocaml.version}-notty"; + minimalOCamlVersion = "4.08"; src = fetchurl { url = "https://github.com/pqwy/notty/releases/download/v${version}/notty-${version}.tbz"; - sha256 = "1y3hx8zjri3x50nyiqal5gak1sw54gw3xssrqbj7srinvkdmrz1q"; + sha256 = "sha256-dGWfsUBz20Q4mJiRqyTyS++Bqkl9rBbZpn+aHJwgCCQ="; }; - nativeBuildInputs = [ ocaml findlib ocamlbuild ]; - buildInputs = [ ocb-stubblr topkg ocamlbuild ]; - propagatedBuildInputs = [ result uucp uuseg uutf ] ++ - optional withLwt lwt; + nativeBuildInputs = [ cppo ]; - strictDeps = true; + propagatedBuildInputs = [ lwt uutf ]; - buildPhase = topkg.buildPhase - + " --with-lwt ${boolToString withLwt}"; - - inherit (topkg) installPhase; - - meta = { + meta = with lib; { homepage = "https://github.com/pqwy/notty"; - inherit (ocaml.meta) platforms; description = "Declarative terminal graphics for OCaml"; license = licenses.isc; maintainers = with maintainers; [ sternenseemann ];