summary refs log tree commit diff
path: root/pkgs/development/python-modules/gurobipy/linux.nix
blob: e9a72cbb5cba7ef0a3bf8988a34c9b52db08afe2 (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
{ lib, buildPythonPackage, python, gurobi }:

buildPythonPackage {
  pname = "gurobipy";
  version = "9.1.2";

  src = gurobi.src;

  setSourceRoot = "sourceRoot=$(echo gurobi*/*64)";

  patches = [ ./no-clever-setup.patch ];

  postInstall = ''
    mv lib/libgurobi*.so* $out/lib
  '';

  postFixup = ''
    patchelf --set-rpath $out/lib \
      $out/lib/${python.libPrefix}/site-packages/gurobipy/gurobipy.so
  '';

  meta = with lib; {
    description = "The Gurobi Python interface";
    homepage = "https://www.gurobi.com";
    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
    license = licenses.unfree;
    platforms = [ "x86_64-linux" ];
  };
}