ocamlPackages.pyml: 20220615 → 20220905

https://github.com/thierry-martinez/pyml/releases/tag/20220905

Aldo switch to dune, which has been available since 2021-09-24.
And remove unneeded dependencies:
- ncurses was needed for Python in the past
- ocaml and findlib are implied by dune
This commit is contained in:
Jan Tojnar 2022-10-22 10:26:42 +02:00 committed by Vincent Laporte
parent beaf7262e6
commit 35e2079bd5

View file

@ -1,23 +1,37 @@
{ stdenv, lib, fetchFromGitHub, ocaml, findlib, utop, python3, stdcompat, ncurses }: { buildDunePackage
, lib
, fetchFromGitHub
, fetchpatch
, utop
, python3
, stdcompat
}:
stdenv.mkDerivation rec { buildDunePackage rec {
pname = "pyml"; pname = "pyml";
version = "20220615"; version = "20220905";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "thierry-martinez"; owner = "thierry-martinez";
repo = pname; repo = "pyml";
rev = version; rev = version;
sha256 = "sha256-my/xn9vrYTcHyjXGBNamgqpBz2/6bTyQHuE9ViVGLjw="; sha256 = "PL4tFIKQLRutSn9Sf84/ImJv0DqkstNnJaNBqWDTKDQ=";
}; };
nativeBuildInputs = [ patches = [
ocaml # Fixes test crash.
findlib # https://github.com/thierry-martinez/pyml/issues/85
(fetchpatch {
url = "https://github.com/thierry-martinez/pyml/commit/a0bc5aca8632bea273f869d622cad2f55e754a7c.patch";
sha256 = "bOqAokm5DE5rlvkBMQZtwMppRmoK9cvjJeGeP6BusnE=";
excludes = [
"CHANGES.md"
];
})
]; ];
buildInputs = [ buildInputs = [
utop utop
ncurses
]; ];
propagatedBuildInputs = [ propagatedBuildInputs = [
@ -25,24 +39,17 @@ stdenv.mkDerivation rec {
stdcompat stdcompat
]; ];
checkInputs = [
python3.pkgs.numpy
];
strictDeps = true; strictDeps = true;
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; doCheck = true;
meta = { meta = {
description = "OCaml bindings for Python"; description = "OCaml bindings for Python";
homepage = "https://github.com/thierry-martinez/pyml";
license = lib.licenses.bsd2; license = lib.licenses.bsd2;
}; };
} }