about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/phylogenetics/default.nix
blob: 7c4f90b6f976d2e6353f3a4bbfe23b275690171a (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
56
57
58
59
60
61
62
{ lib
, ocaml
, buildDunePackage
, fetchFromGitHub
, ppx_deriving
, bppsuite
, alcotest
, angstrom-unix
, biocaml
, core
, gsl
, lacaml
, menhir
, menhirLib
, printbox-text
}:

lib.throwIf (lib.versionAtLeast ocaml.version "5.0")
  "phylogenetics is not compatible with OCaml ${ocaml.version}"

buildDunePackage rec {
  pname = "phylogenetics";
  version = "unstable-2022-05-06";

  src = fetchFromGitHub {
    owner = "biocaml";
    repo = pname;
    rev = "cd7c624d0f98e31b02933ca4511b9809b26d35b5";
    sha256 = "sha256:0w0xyah3hj05hxg1rsa40hhma3dm1cyq0zvnjrihhf22laxap7ga";
  };

  minimalOCamlVersion = "4.08";

  nativeCheckInputs = [ bppsuite ];
  checkInputs = [ alcotest ];
  nativeBuildInputs = [ menhir ];
  propagatedBuildInputs = [
    angstrom-unix
    biocaml
    core
    gsl
    lacaml
    menhirLib
    ppx_deriving
    printbox-text
  ];

  checkPhase = ''
    runHook preCheck
    dune build @app/fulltest
    runHook postCheck
  '';
  doCheck = true;

  meta = with lib; {
    description = "Algorithms and datastructures for phylogenetics";
    homepage = "https://github.com/biocaml/phylogenetics";
    license = licenses.cecill-b;
    maintainers = [ maintainers.bcdarwin ];
    mainProgram = "phylosim";
  };
}