3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/ocaml-modules/curses/default.nix

35 lines
890 B
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, ocaml, findlib, ncurses }:
2017-02-04 15:07:45 +00:00
stdenv.mkDerivation rec {
pname = "ocaml-curses";
version = "1.0.4";
2017-02-04 15:07:45 +00:00
src = fetchurl {
url = "http://ocaml.phauna.org/distfiles/ocaml-curses-${version}.ogunden1.tar.gz";
sha256 = "08wq1r93lincdfzlriyc5nl2p4q7ca4h6ygzgp1nhkgd93pgk9v2";
2017-02-04 15:07:45 +00:00
};
propagatedBuildInputs = [ ncurses ];
buildInputs = [ ocaml findlib ];
# 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://opam.ocaml.org/packages/curses/curses.1.0.4/";
2017-02-04 15:07:45 +00:00
license = licenses.gpl2;
maintainers = [ maintainers.volth ];
platforms = ocaml.meta.platforms or [];
};
}