|
2 | 2 |
|
3 | 3 | { stdenvNoCC |
4 | 4 | , fetchFromGitHub |
5 | | -, python311 |
| 5 | +, python312 |
6 | 6 | , pkgs |
7 | | -, callPackage |
8 | | -, python311Packages |
| 7 | +, python312Packages |
9 | 8 | , fetchPypi |
10 | 9 | , stdenv |
11 | 10 | , cmake |
|
16 | 15 |
|
17 | 16 |
|
18 | 17 | let |
19 | | - ortools97 = python311Packages.buildPythonPackage rec { |
| 18 | + # TODO: switch to protobuf from nixpkgs |
| 19 | + # ortools 9.12 requires protobuf >= 5.29.3 - currently nixpkgs 24.11 has |
| 20 | + # protobuf 5.28.3 |
| 21 | + protobuf_6_30_1 = python312Packages.buildPythonPackage rec { |
| 22 | + pname = "protobuf"; |
| 23 | + version = "6.30.1"; |
| 24 | + |
| 25 | + propagatedBuildInputs = [ |
| 26 | + python312Packages.setuptools |
| 27 | + ]; |
| 28 | + |
| 29 | + build-system = with python312Packages; [ |
| 30 | + setuptools |
| 31 | + ]; |
| 32 | + |
| 33 | + dontConfigure = true; |
| 34 | + nativeBuildInputs = |
| 35 | + [ |
| 36 | + cmake |
| 37 | + pkg-config |
| 38 | + ]; |
| 39 | + |
| 40 | + src = fetchPypi { |
| 41 | + inherit pname version; |
| 42 | + hash = "sha256-U1+05E0CNok9XPEmOg9wbxFgtomnq5YunaipzkBQt4A="; |
| 43 | + }; |
| 44 | + }; |
| 45 | + |
| 46 | + |
| 47 | + ortools912 = python312Packages.buildPythonPackage rec { |
20 | 48 | pname = "ortools"; |
21 | | - version = "9.7.2996"; |
| 49 | + version = "9.12.4544"; |
22 | 50 |
|
23 | 51 | format = "wheel"; |
24 | 52 |
|
25 | 53 | src = fetchPypi { |
26 | 54 | inherit pname version; |
27 | 55 | format = "wheel"; |
28 | | - dist = "cp311"; |
29 | | - python = "cp311"; |
30 | | - abi = "cp311"; |
| 56 | + dist = "cp312"; |
| 57 | + python = "cp312"; |
| 58 | + abi = "cp312"; |
31 | 59 | platform = |
32 | 60 | if stdenv.isDarwin then |
33 | 61 | if stdenv.isAarch64 then "macosx_11_0_arm64" |
34 | 62 | else "macosx_10_15_x86_64" |
35 | 63 | else if stdenv.isLinux then |
36 | | - if stdenv.isAarch64 then "manylinux_2_17_aarch64.manylinux2014_aarch64" |
37 | | - else "manylinux_2_17_x86_64.manylinux2014_x86_64" |
| 64 | + if stdenv.isAarch64 then "manylinux_2_27_aarch64.manylinux_2_28_aarch64" |
| 65 | + else "manylinux_2_27_x86_64.manylinux_2_28_x86_64" |
38 | 66 | else throw "Unsupported platform"; |
39 | 67 |
|
40 | 68 | hash = |
41 | 69 | if stdenv.isDarwin then |
42 | | - if stdenv.isAarch64 then "sha256-Oc8xz9iRuOiDyZBc85qlS57u0efP/f4cDpi2k9ZlCQI=" |
43 | | - else "sha256-0ax/I7604BumV+VRV7Y5fNDs0XrxkK+ocr9yU1oFMDQ=" |
| 70 | + if stdenv.isAarch64 then "sha256-Z/4bhlMndFZ4okBm2CbbJaEBmqIH6pAXygGvLPIUVlI=" |
| 71 | + else "sha256-FnaLGfyzBT9EvYTEYMuXjyop1046XZugYSNYn+sQrxI=" |
44 | 72 | else if stdenv.isLinux then |
45 | | - if stdenv.isAarch64 then "sha256-B8QfDoYT2OxrpoUzSQTNduRbxG2j1S8XPpMBZo/yI90=" |
46 | | - else "sha256-pUerlb2cykE9cYraz68MnuBKDM4V1Du0Ta3yve16K/o=" |
| 73 | + if stdenv.isAarch64 then "sha256-VVD+nuVSt7jtAcrZHVimjsDkjNQN0necELGZFCmncFg=" |
| 74 | + else "sha256-kiEh1vSPjuseuIqMZF/wC2H2CFYxkxTOK48iD6uJYIM=" |
47 | 75 | else throw "Unsupported platform"; |
48 | 76 | }; |
49 | 77 |
|
50 | | - propagatedBuildInputs = with python311Packages; [ |
| 78 | + propagatedBuildInputs = with python312Packages; [ |
51 | 79 | numpy |
52 | 80 | pandas |
53 | | - protobuf |
| 81 | + protobuf_6_30_1 |
54 | 82 | ]; |
55 | 83 |
|
56 | 84 | }; |
57 | 85 |
|
58 | | - unicorn_2_1_3 = python311Packages.buildPythonPackage rec { |
| 86 | + # TODO: switch to unicorn from nixpkgs |
| 87 | + # nixpkgs 24.11 currently has 2.1.1 - we are experiencing some issues with |
| 88 | + # that version on MacOS. 2.1.2/2.1.3 (and also some older versions) don't |
| 89 | + # have that problem |
| 90 | + unicorn_2_1_3 = python312Packages.buildPythonPackage rec { |
59 | 91 | pname = "unicorn"; |
60 | 92 | version = "2.1.3"; |
61 | 93 |
|
62 | 94 | propagatedBuildInputs = [ |
63 | | - python311Packages.setuptools |
| 95 | + python312Packages.setuptools |
64 | 96 | ]; |
65 | 97 |
|
66 | | - build-system = with python311Packages; [ |
| 98 | + build-system = with python312Packages; [ |
67 | 99 | setuptools |
68 | 100 | ]; |
69 | 101 |
|
|
80 | 112 | }; |
81 | 113 | }; |
82 | 114 |
|
83 | | - pythonEnv = python311.withPackages (ps: with ps; [ |
84 | | - ortools97 |
| 115 | + pythonEnv = python312.withPackages (ps: with ps; [ |
| 116 | + ortools912 |
85 | 117 | sympy |
86 | 118 | unicorn_2_1_3 |
87 | 119 | ]); |
|
0 commit comments