diff options
author | Justin Bedo <cu@cua0.org> | 2022-03-09 13:57:07 +1100 |
---|---|---|
committer | Justin Bedo <cu@cua0.org> | 2022-05-16 12:46:12 +1000 |
commit | 61a05c73159f4578322ba9a59ab8ee7a5f1fb1b4 (patch) | |
tree | 3db826e7c6952b40ebde20e27fb915b96f667abf /tools | |
parent | c4255587d157100db3bc05fa1feba4f16ffe140c (diff) |
HATCHet: 0.4.9 -> 0.4.14
Diffstat (limited to 'tools')
-rw-r--r-- | tools/hatchet-app.nix | 20 | ||||
-rw-r--r-- | tools/hatchet-call.nix | 1 |
2 files changed, 9 insertions, 12 deletions
diff --git a/tools/hatchet-app.nix b/tools/hatchet-app.nix index 024d85c..e7bff30 100644 --- a/tools/hatchet-app.nix +++ b/tools/hatchet-app.nix @@ -1,31 +1,26 @@ -{ python3Packages, fetchFromGitHub, cmake, gurobi, writeText }: +{ lib, runCommand, 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) - ''; + gurobi' = runCommand "gurobi${lib.replaceStrings ["."] [""] gurobi.version}" {} "ln -s ${gurobi} $out"; + in -in python3Packages.buildPythonApplication rec { pname = "HATCHet"; - version = "0.4.9"; + version = "0.4.14"; src = fetchFromGitHub { owner = "raphael-group"; repo = "hatchet"; rev = "v${version}"; - sha256 = "sha256-MB9XFbkLQTf6ZUPrisSzGU8Jeq6SrlMMCQtoyvx/Xvc="; + sha256 = "sha256-zkbjwdtvRNsZWvhtQy8TA3o68l7Uf4WQby1/3/sHq98="; }; dontConfigure = true; + GUROBI_HOME=gurobi'; patchPhase = '' - cat ${findgurobi} > FindGUROBI.cmake + sed -i 's/''${GUROBI_LIB}/''${GUROBI_LIB} -lpthread/' FindGUROBI.cmake ''; nativeBuildInputs = [ cmake ]; @@ -40,5 +35,6 @@ python3Packages.buildPythonApplication rec { seaborn scikit-learn scipy + gurobipy ]; } diff --git a/tools/hatchet-call.nix b/tools/hatchet-call.nix index a3bd5ca..c99e664 100644 --- a/tools/hatchet-call.nix +++ b/tools/hatchet-call.nix @@ -125,6 +125,7 @@ stage passthru.multicore = true; } // (if gurobiLicense != null then { GRB_LICENSE_FILE = gurobiLicense; + HATCHET_COMPUTE_CN_SOLVER = "gurobi"; } else { HATCHET_COMPUTE_CN_SOLVER = "cbc"; })) |