1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-22 23:10:02 +00:00
nixpkgs/pkgs/development/tools/ocaml/utop/default.nix

50 lines
1.6 KiB
Nix
Raw Normal View History

2014-07-20 17:23:42 +01:00
{stdenv, fetchurl, ocaml, findlib, lambdaTerm, ocaml_lwt, makeWrapper,
ocaml_react, camomile, zed
}:
stdenv.mkDerivation rec {
version = "1.15";
2014-07-20 17:23:42 +01:00
name = "utop-${version}";
src = fetchurl {
url = https://github.com/diml/utop/archive/1.15.tar.gz;
sha256 = "106v0x6sa2x10zgmjf73mpzws7xiqanxswivd00iqnpc0bcpkmrr";
2014-07-20 17:23:42 +01:00
};
buildInputs = [ ocaml findlib makeWrapper];
propagatedBuildInputs = [ lambdaTerm ocaml_lwt ];
createFindlibDestdir = true;
buildPhase = ''
make
make doc
'';
postFixup =
let ocamlVersion = (builtins.parseDrvName (ocaml.name)).version;
in
''
2015-01-27 06:51:30 +00:00
for prog in "$out"/bin/*
do
wrapProgram $prog --set CAML_LD_LIBRARY_PATH "${ocaml_lwt}"/lib/ocaml/${ocamlVersion}/site-lib/lwt/:"${lambdaTerm}"/lib/ocaml/${ocamlVersion}/site-lib/lambda-term/:'$CAML_LD_LIBRARY_PATH' --set OCAMLPATH "${ocaml_lwt}"/lib/ocaml/${ocamlVersion}/site-lib:${ocaml_react}/lib/ocaml/${ocamlVersion}/site-lib:${camomile}/lib/ocaml/${ocamlVersion}/site-lib:${zed}/lib/ocaml/${ocamlVersion}/site-lib:${lambdaTerm}/lib/ocaml/${ocamlVersion}/site-lib:"$out"/lib/ocaml/${ocamlVersion}/site-lib:'$OCAMLPATH'
done
'';
2014-07-20 17:23:42 +01:00
meta = {
description = "Universal toplevel for OCaml";
longDescription = ''
utop is an improved toplevel for OCaml. It can run in a terminal or in Emacs. It supports line edition, history, real-time and context sensitive completion, colors, and more.
It integrates with the tuareg mode in Emacs.
'';
homepage = https://github.com/diml/utop;
license = stdenv.lib.licenses.bsd3;
platforms = ocaml.meta.platforms;
maintainers = [
stdenv.lib.maintainers.gal_bolle
];
};
}