2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, pkgs
|
|
|
|
, requests
|
|
|
|
, numpy
|
|
|
|
, graphviz
|
|
|
|
, python
|
|
|
|
, isPy3k
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage {
|
2021-03-20 04:20:00 +00:00
|
|
|
inherit (pkgs.mxnet) pname version src meta;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [ pkgs.mxnet ];
|
|
|
|
propagatedBuildInputs = [ requests numpy graphviz ];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
LD_LIBRARY_PATH = lib.makeLibraryPath [ pkgs.mxnet ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
doCheck = !isPy3k;
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace python/setup.py \
|
2021-02-05 17:12:51 +00:00
|
|
|
--replace "graphviz<0.9.0," "graphviz"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
cd python
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
rm -rf $out/mxnet
|
|
|
|
ln -s ${pkgs.mxnet}/lib/libmxnet.so $out/${python.sitePackages}/mxnet
|
|
|
|
'';
|
|
|
|
|
|
|
|
}
|