2021-10-14 00:43:12 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, ocaml, findlib, utop, python3, stdcompat, ncurses }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pyml";
|
2022-03-05 16:20:37 +00:00
|
|
|
version = "20211015";
|
2021-10-14 00:43:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "thierry-martinez";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-03-05 16:20:37 +00:00
|
|
|
sha256 = "sha256-GCO6KlRhJmADFjQ5QF4naMQBskF63yqnJnLnuQsagEk=";
|
2021-10-14 00:43:12 +00:00
|
|
|
};
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
nativeBuildInputs = [
|
2021-10-14 00:43:12 +00:00
|
|
|
ocaml
|
|
|
|
findlib
|
2022-03-05 16:20:37 +00:00
|
|
|
];
|
|
|
|
buildInputs = [
|
2021-10-14 00:43:12 +00:00
|
|
|
utop
|
|
|
|
ncurses
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
python3
|
|
|
|
stdcompat
|
|
|
|
];
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
2021-10-14 00:43:12 +00:00
|
|
|
buildPhase = ''
|
|
|
|
make all pymltop pymlutop PREFIX=$out
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/bin
|
|
|
|
mkdir -p $OCAMLFIND_DESTDIR/stublibs
|
|
|
|
make install PREFIX=$out
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "OCaml bindings for Python";
|
|
|
|
license = lib.licenses.bsd2;
|
|
|
|
};
|
|
|
|
}
|