2021-09-21 10:45:55 +02:00
|
|
|
{ stdenv, lib, fetchFromGitHub, ocaml, findlib, utop, python3, stdcompat, ncurses }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pyml";
|
2021-12-08 01:24:33 +01:00
|
|
|
version = "20211015";
|
2021-09-21 10:45:55 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "thierry-martinez";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-12-08 01:24:33 +01:00
|
|
|
sha256 = "sha256-GCO6KlRhJmADFjQ5QF4naMQBskF63yqnJnLnuQsagEk=";
|
2021-09-21 10:45:55 +02:00
|
|
|
};
|
|
|
|
|
2022-02-22 10:59:04 +01:00
|
|
|
nativeBuildInputs = [
|
2021-09-21 10:45:55 +02:00
|
|
|
ocaml
|
|
|
|
findlib
|
2022-02-22 10:59:04 +01:00
|
|
|
];
|
|
|
|
buildInputs = [
|
2021-09-21 10:45:55 +02:00
|
|
|
utop
|
|
|
|
ncurses
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
python3
|
|
|
|
stdcompat
|
|
|
|
];
|
|
|
|
|
2022-02-22 10:59:04 +01:00
|
|
|
strictDeps = true;
|
|
|
|
|
2021-09-21 10:45:55 +02: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;
|
|
|
|
};
|
|
|
|
}
|