Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at gcc-offload 55 lines 1.8 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 python, 6 fetchPypi, 7}: 8 9let 10 format = "wheel"; 11 pyShortVersion = "cp" + builtins.replaceStrings [ "." ] [ "" ] python.pythonVersion; 12 platforms = rec { 13 aarch64-darwin = "macosx_10_9_universal2"; 14 aarch64-linux = "manylinux2014_aarch64.manylinux_2_17_aarch64"; 15 x86_64-darwin = aarch64-darwin; 16 x86_64-linux = "manylinux2014_x86_64.manylinux_2_17_x86_64"; 17 }; 18 platform = platforms.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}"); 19 hashes = rec { 20 cp311-aarch64-darwin = "sha256-KRC3fY7KUVCfI4u+TQQjgqLLIEunkzgIZxiuTol2/50="; 21 cp311-aarch64-linux = "sha256-/DiS49iND4oB2nXxL3QCPTmO9Zmp4a3WbtdjE3M+MPs="; 22 cp311-x86_64-darwin = cp311-aarch64-darwin; 23 cp311-x86_64-linux = "sha256-oI+0Kl58sCzbmTwTgci4xaO67tyt1W5yiNhFile4FEI="; 24 cp312-aarch64-darwin = "sha256-tcNcuYGmFScBaFUyTgVMrkc0lnhdtX8Ggr1W1YSpbu4="; 25 cp312-aarch64-linux = "sha256-+Ch951NcO5yX9KqHFpadcDAqlyvQnp07b71yZsoOq3I="; 26 cp312-x86_64-darwin = cp312-aarch64-darwin; 27 cp312-x86_64-linux = "sha256-kLukle+yXP9aOCYViv974pY30ugKzMOompjLhjCFYQY="; 28 }; 29 hash = 30 hashes."${pyShortVersion}-${stdenv.system}" 31 or (throw "Unsupported Python version: ${python.pythonVersion}"); 32in 33buildPythonPackage rec { 34 pname = "gurobipy"; 35 version = "12.0.0"; 36 inherit format; 37 38 src = fetchPypi { 39 inherit pname version; 40 python = pyShortVersion; 41 abi = pyShortVersion; 42 dist = pyShortVersion; 43 inherit format platform hash; 44 }; 45 46 pythonImportsCheck = [ "gurobipy" ]; 47 48 meta = { 49 description = "Python interface to Gurobi"; 50 homepage = "https://www.gurobi.com"; 51 license = lib.licenses.unfree; 52 maintainers = with lib.maintainers; [ wegank ]; 53 platforms = builtins.attrNames platforms; 54 }; 55}