summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/pyml/default.nix
blob: 1cc85833d584dabe4102bf2e2160c0b648d27c4d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{ buildDunePackage
, lib
, fetchFromGitHub
, fetchpatch
, utop
, python3
, stdcompat
}:

buildDunePackage rec {
  pname = "pyml";
  version = "20220905";

  src = fetchFromGitHub {
    owner = "thierry-martinez";
    repo = "pyml";
    rev = version;
    sha256 = "PL4tFIKQLRutSn9Sf84/ImJv0DqkstNnJaNBqWDTKDQ=";
  };

  patches = [
    # Fixes test crash.
    # 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 = [
    utop
  ];

  propagatedBuildInputs = [
    python3
    stdcompat
  ];

  nativeCheckInputs = [
    python3.pkgs.numpy
  ];

  strictDeps = true;

  doCheck = true;

  meta = {
    description = "OCaml bindings for Python";
    homepage = "https://github.com/thierry-martinez/pyml";
    license = lib.licenses.bsd2;
  };
}