1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-14 16:46:09 +00:00
nixpkgs/pkgs/development/ocaml-modules/curses/default.nix
Tuomas Tynkkynen 8afcfb2bb6 ocamlPackages.curses: Fix build after ncurses5 changes
Fixes build after commit 3d24ae9b4426bb8adfcb08de57be21fdf0a377f8:

3d24ae9b44 (commitcomment-27714305)

Thanks to dtzWill for the pointer:
https://github.com/NixOS/nixpkgs/pull/34477#issuecomment-367359351
2018-02-23 06:21:11 +02:00

35 lines
904 B
Nix

{ stdenv, fetchurl, ocaml, findlib, ncurses }:
stdenv.mkDerivation rec {
name = "ocaml-curses-${version}";
version = "1.0.3";
src = fetchurl {
url = "http://ocaml.phauna.org/distfiles/ocaml-curses-${version}.ogunden1.tar.gz";
sha256 = "0fxya4blx4zcp9hy8gxxm2z7aas7hfvwnjdlj9pmh0s5gijpwsll";
};
propagatedBuildInputs = [ ncurses ];
buildInputs = [ ocaml findlib ];
# Fix build for recent ncurses versions
NIX_CFLAGS_COMPILE = [ "-DNCURSES_INTERNALS=1" ];
createFindlibDestdir = true;
postPatch = ''
substituteInPlace curses.ml --replace "pp gcc" "pp $CC"
'';
buildPhase = "make all opt";
meta = with stdenv.lib; {
description = "OCaml Bindings to curses/ncurses";
homepage = https://opam.ocaml.org/packages/curses/curses.1.0.3/;
license = licenses.gpl2;
maintainers = [ maintainers.volth ];
platforms = ocaml.meta.platforms or [];
};
}