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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
950 B
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, ocaml, findlib, ncurses }:
2017-02-04 15:07:45 +00:00
stdenv.mkDerivation rec {
pname = "ocaml-curses";
version = "1.0.8";
2017-02-04 15:07:45 +00:00
src = fetchFromGitHub {
owner = "mbacarella";
repo = "curses";
rev = version;
sha256 = "0yy3wf8i7jgvzdc40bni7mvpkvclq97cgb5fw265mrjj0iqpkqpd";
2017-02-04 15:07:45 +00:00
};
propagatedBuildInputs = [ ncurses ];
nativeBuildInputs = [ ocaml findlib ];
2017-02-04 15:07:45 +00:00
# Fix build for recent ncurses versions
2019-10-30 11:34:47 +00:00
NIX_CFLAGS_COMPILE = "-DNCURSES_INTERNALS=1";
2017-02-04 15:07:45 +00:00
createFindlibDestdir = true;
postPatch = ''
substituteInPlace curses.ml --replace "pp gcc" "pp $CC"
'';
buildPhase = "make all opt";
meta = with lib; {
2017-02-04 15:07:45 +00: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 15:07:45 +00:00
maintainers = [ maintainers.volth ];
inherit (ocaml.meta) platforms;
2017-02-04 15:07:45 +00:00
};
}