blob: ec74f46c180ad820641a21a0182667fcf43856d7 (
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
{
lib,
stdenv,
buildPythonPackage,
python,
fetchPypi,
}:
let
format = "wheel";
pyShortVersion = "cp" + builtins.replaceStrings [ "." ] [ "" ] python.pythonVersion;
platforms = rec {
aarch64-darwin = "macosx_10_9_universal2";
x86_64-darwin = aarch64-darwin;
};
platform = platforms.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}");
hashes = rec {
cp311-aarch64-darwin = "sha256-pMwq4TXvr0mrKxZppeW2MQE/KrplWWFGmjKRLKwbHCI=";
cp311-x86_64-darwin = cp311-aarch64-darwin;
cp312-aarch64-darwin = "sha256-5+1QxYOhjbs01S3gqhkQ9Bx/0/NhbXEi710BGpiC5kM=";
cp312-x86_64-darwin = cp312-aarch64-darwin;
};
hash =
hashes."${pyShortVersion}-${stdenv.system}"
or (throw "Unsupported Python version: ${python.pythonVersion}");
in
buildPythonPackage rec {
pname = "gurobipy";
version = "11.0.1";
inherit format;
src = fetchPypi {
inherit pname version;
python = pyShortVersion;
abi = pyShortVersion;
dist = pyShortVersion;
inherit format platform hash;
};
pythonImportsCheck = [ "gurobipy" ];
meta = {
description = "Python interface to Gurobi";
homepage = "https://www.gurobi.com";
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [ wegank ];
platforms = builtins.attrNames platforms;
};
}
|