summaryrefslogtreecommitdiffstats
path: root/pkgs/development/ocaml-modules/ocplib-simplex/default.nix
blob: ac13f4b662f3f37f0530e0413c49420b79cb86fd (plain)
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
{
  lib,
  fetchFromGitHub,
  fetchpatch,
  buildDunePackage,
  logs,
  zarith,
}:

buildDunePackage (finalAttrs: {
  pname = "ocplib-simplex";
  version = "0.5.1";

  src = fetchFromGitHub {
    owner = "OCamlPro";
    repo = "ocplib-simplex";
    rev = "v${finalAttrs.version}";
    hash = "sha256-fLTht+TlyJIsIAsRLmmkFKsnbSeW3BgyAyURFdnGfko=";
  };

  # Fix tests with dune 3.17.0
  # See https://github.com/OCamlPro/ocplib-simplex/issues/35
  patches = (
    fetchpatch {
      url = "https://github.com/OCamlPro/ocplib-simplex/commit/456a744bddd397daade7959d4a49cfadafdadd33.patch";
      hash = "sha256-tQUXOoRGe1AIzHcm6j2MopROxn75OE9YUP+CwcKUbVg=";
    }
  );

  propagatedBuildInputs = [
    logs
    zarith
  ];

  doCheck = true;

  meta = {
    description = "OCaml library implementing a simplex algorithm, in a functional style, for solving systems of linear inequalities";
    homepage = "https://github.com/OCamlPro-Iguernlala/ocplib-simplex";
    license = lib.licenses.lgpl21Only;
    maintainers = [ lib.maintainers.vbgl ];
  };
})