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

let

  findgurobi = writeText "FindGUROBI.cmake" ''
    set(GUROBI_CPP_LIB ${gurobi}/lib/libgurobi_c++.a)
    set(GUROBI_LIB ${gurobi}/lib/libgurobi91.so)
    set(GUROBI_INCLUDE_DIR ${gurobi}/include)
    set(GUROBI_LIBRARIES ''${GUROBI_CPP_LIB} ''${GUROBI_LIB} -lpthread)
    set(GUROBI_FOUND TRUE)
  '';

in
python3Packages.buildPythonApplication rec {
  pname = "HATCHet";
  version = "0.4.9";

  src = fetchFromGitHub {
    owner = "raphael-group";
    repo = "hatchet";
    rev = "v${version}";
    sha256 = "sha256-MB9XFbkLQTf6ZUPrisSzGU8Jeq6SrlMMCQtoyvx/Xvc=";
  };

  dontConfigure = true;

  patchPhase = ''
    cat ${findgurobi} > FindGUROBI.cmake
  '';

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