aboutsummaryrefslogtreecommitdiff
path: root/tools/hatchet-app.nix
blob: e7bff30230e2858709f255d8e7371e71dddc9f7c (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
{ lib, runCommand, python3Packages, fetchFromGitHub, cmake, gurobi, writeText }:

let

  gurobi' = runCommand "gurobi${lib.replaceStrings ["."] [""] gurobi.version}" {} "ln -s ${gurobi} $out";
  in

python3Packages.buildPythonApplication rec {
  pname = "HATCHet";
  version = "0.4.14";

  src = fetchFromGitHub {
    owner = "raphael-group";
    repo = "hatchet";
    rev = "v${version}";
    sha256 = "sha256-zkbjwdtvRNsZWvhtQy8TA3o68l7Uf4WQby1/3/sHq98=";
  };

  dontConfigure = true;
  GUROBI_HOME=gurobi';

  patchPhase = ''
    sed -i 's/''${GUROBI_LIB}/''${GUROBI_LIB} -lpthread/' FindGUROBI.cmake
  '';

  nativeBuildInputs = [ cmake ];
  propagatedBuildInputs = with python3Packages; [
    biopython
    matplotlib
    pandas
    psutil
    pyomo
    pysam
    requests
    seaborn
    scikit-learn
    scipy
    gurobipy
  ];
}