2021-01-24 00:29:22 +00:00
|
|
|
{ lib
|
2018-10-15 20:16:03 +01:00
|
|
|
, buildPythonPackage
|
|
|
|
, pkgs
|
|
|
|
, requests
|
|
|
|
, numpy
|
|
|
|
, graphviz
|
|
|
|
, python
|
|
|
|
, isPy3k
|
|
|
|
}:
|
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
buildPythonPackage {
|
2018-10-15 20:16:03 +01:00
|
|
|
inherit (pkgs.mxnet) name version src meta;
|
|
|
|
|
|
|
|
buildInputs = [ pkgs.mxnet ];
|
|
|
|
propagatedBuildInputs = [ requests numpy graphviz ];
|
|
|
|
|
2021-01-24 00:29:22 +00:00
|
|
|
LD_LIBRARY_PATH = lib.makeLibraryPath [ pkgs.mxnet ];
|
2018-10-15 20:16:03 +01:00
|
|
|
|
|
|
|
doCheck = !isPy3k;
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace python/setup.py \
|
2021-01-18 22:13:36 +00:00
|
|
|
--replace "graphviz<0.9.0," "graphviz"
|
2018-10-15 20:16:03 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
cd python
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
rm -rf $out/mxnet
|
|
|
|
ln -s ${pkgs.mxnet}/lib/libmxnet.so $out/${python.sitePackages}/mxnet
|
|
|
|
'';
|
|
|
|
|
|
|
|
}
|