at 25.11-pre 889 B view raw
1{ 2 lib, 3 buildPythonPackage, 4 pkgs, 5 setuptools, 6 distutils, 7 requests, 8 numpy, 9 graphviz, 10 python, 11 isPy3k, 12}: 13 14buildPythonPackage { 15 inherit (pkgs.mxnet) pname version src; 16 pyproject = true; 17 18 build-system = [ setuptools ]; 19 20 buildInputs = [ pkgs.mxnet ]; 21 22 dependencies = [ 23 distutils 24 requests 25 numpy 26 graphviz 27 ]; 28 29 pythonRelaxDeps = [ 30 "graphviz" 31 "numpy" 32 ]; 33 34 LD_LIBRARY_PATH = lib.makeLibraryPath [ pkgs.mxnet ]; 35 36 doCheck = !isPy3k; 37 38 postPatch = '' 39 # Required to support numpy >=1.24 where np.bool is removed in favor of just bool 40 substituteInPlace python/mxnet/numpy/utils.py \ 41 --replace-fail "bool = onp.bool" "bool = bool" 42 ''; 43 44 preConfigure = '' 45 cd python 46 ''; 47 48 postInstall = '' 49 rm -rf $out/mxnet 50 ln -s ${pkgs.mxnet}/lib/libmxnet.so $out/${python.sitePackages}/mxnet 51 ''; 52 53 meta = pkgs.mxnet.meta; 54}