1{ lib, buildPythonPackage, python, gurobi }:
2
3buildPythonPackage {
4 pname = "gurobipy";
5 version = "9.1.2";
6
7 src = gurobi.src;
8
9 setSourceRoot = "sourceRoot=$(echo gurobi*/*64)";
10
11 patches = [ ./no-clever-setup.patch ];
12
13 postInstall = ''
14 mv lib/libgurobi*.so* $out/lib
15 '';
16
17 postFixup = ''
18 patchelf --set-rpath $out/lib \
19 $out/lib/${python.libPrefix}/site-packages/gurobipy/gurobipy.so
20 '';
21
22 meta = with lib; {
23 description = "The Gurobi Python interface";
24 homepage = "https://www.gurobi.com";
25 license = licenses.unfree;
26 platforms = [ "x86_64-linux" ];
27 };
28}