From 1940fad70b34907358bbb0886a6d66f0c5aea25d Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Fri, 31 Jan 2025 09:23:27 +0100 Subject: [PATCH] =?UTF-8?q?ocamlPackages.curses:=201.0.8=20=E2=86=92=201.0?= =?UTF-8?q?.11?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ocaml-modules/curses/default.nix | 42 +++++++------------ 1 file changed, 14 insertions(+), 28 deletions(-) diff --git a/pkgs/development/ocaml-modules/curses/default.nix b/pkgs/development/ocaml-modules/curses/default.nix index 7825a51b92b1..dea0a2f0d985 100644 --- a/pkgs/development/ocaml-modules/curses/default.nix +++ b/pkgs/development/ocaml-modules/curses/default.nix @@ -1,49 +1,35 @@ { lib, - stdenv, + buildDunePackage, fetchFromGitHub, - ocaml, - findlib, ncurses, + dune-configurator, + pkg-config, }: -stdenv.mkDerivation rec { - pname = "ocaml-curses"; - version = "1.0.8"; +buildDunePackage rec { + pname = "curses"; + version = "1.0.11"; + + minimalOCamlVersion = "4.06"; src = fetchFromGitHub { owner = "mbacarella"; repo = "curses"; rev = version; - sha256 = "0yy3wf8i7jgvzdc40bni7mvpkvclq97cgb5fw265mrjj0iqpkqpd"; + hash = "sha256-tjBOv7RARDzBShToNLL9LEaU/Syo95MfwZunFsyN4/Q="; }; - strictDeps = true; + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ dune-configurator ]; propagatedBuildInputs = [ ncurses ]; - nativeBuildInputs = [ - ocaml - findlib - ]; - - # Fix build for recent ncurses versions - env.NIX_CFLAGS_COMPILE = "-DNCURSES_INTERNALS=1"; - - createFindlibDestdir = true; - - postPatch = '' - substituteInPlace curses.ml --replace "pp gcc" "pp $CC" - ''; - - buildPhase = "make all opt"; - - meta = with lib; { + meta = { description = "OCaml Bindings to curses/ncurses"; homepage = "https://github.com/mbacarella/curses"; - license = licenses.lgpl21Plus; + license = lib.licenses.lgpl21Plus; changelog = "https://github.com/mbacarella/curses/raw/${version}/CHANGES"; - maintainers = [ ]; - inherit (ocaml.meta) platforms; + maintainers = [ lib.maintainers.vbgl ]; }; }