···11-{ stdenv, fetchurl, ocaml, findlib, ncurses, camlp4 }:
11+{ stdenv, fetchFromGitHub, ocaml, findlib, ncurses }:
22+33+let version = "1.99.16-beta"; in
2435stdenv.mkDerivation {
4655- name = "ocp-build-1.99.9-beta";
77+ name = "ocp-build-${version}";
6877- src = fetchurl {
88- url = http://www.typerex.org/pub/ocp-build/ocp-build.1.99.9-beta.tar.gz;
99- sha256 = "0wcb49bp239ns9mz55ky0kfjcz80cp97k0j0rwaw4h5sp3phn4l0";
99+ src = fetchFromGitHub {
1010+ owner = "OCamlPro";
1111+ repo = "ocp-build";
1212+ rev = version;
1313+ sha256 = "1nkd7wlf1vrc4p20bs94vbkd970q2ag23csh9a897ka65rk08gvw";
1014 };
11151212- buildInputs = [ ocaml findlib ncurses camlp4 ];
1616+ buildInputs = [ ocaml findlib ncurses ];
1317 preInstall = "mkdir -p $out/bin";
1414-1515- # In the Nix sandbox, the TERM variable is unset and stty does not
1616- # work. In such a case, ocp-build crashes due to a bug. The
1717- # ./fix-for-no-term.patch fixes this bug in the source code and hence
1818- # also in the final installed version of ocp-build. However, it does not
1919- # fix the bug in the precompiled bootstrap version of ocp-build that is
2020- # used during the compilation process. In order to bypass the bug until
2121- # it's also fixed upstream, we simply set TERM to some valid entry in the
2222- # terminfo database during the bootstrap.
2323- TERM = "xterm";
24182519 meta = with stdenv.lib; {
2620 homepage = http://www.typerex.org/ocp-build.html;