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