nixpkgs/pkgs/development/ocaml-modules/curses/default.nix

38 lines
958 B
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, ocaml, findlib, ncurses }:
2017-02-04 16:07:45 +01:00
stdenv.mkDerivation rec {
pname = "ocaml-curses";
version = "1.0.8";
2017-02-04 16:07:45 +01:00
src = fetchFromGitHub {
owner = "mbacarella";
repo = "curses";
rev = version;
sha256 = "0yy3wf8i7jgvzdc40bni7mvpkvclq97cgb5fw265mrjj0iqpkqpd";
2017-02-04 16:07:45 +01:00
};
propagatedBuildInputs = [ ncurses ];
nativeBuildInputs = [ ocaml findlib ];
2017-02-04 16:07:45 +01:00
# Fix build for recent ncurses versions
2019-10-30 12:34:47 +01:00
NIX_CFLAGS_COMPILE = "-DNCURSES_INTERNALS=1";
2017-02-04 16:07:45 +01:00
createFindlibDestdir = true;
postPatch = ''
substituteInPlace curses.ml --replace "pp gcc" "pp $CC"
'';
buildPhase = "make all opt";
meta = with lib; {
2017-02-04 16:07:45 +01:00
description = "OCaml Bindings to curses/ncurses";
homepage = "https://github.com/mbacarella/curses";
license = licenses.lgpl21Plus;
changelog = "https://github.com/mbacarella/curses/raw/${version}/CHANGES";
2017-02-04 16:07:45 +01:00
maintainers = [ maintainers.volth ];
platforms = ocaml.meta.platforms or [];
};
}