2018-10-15 20:16:03 +01:00
|
|
|
{ stdenv
|
|
|
|
, 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 ];
|
|
|
|
|
|
|
|
LD_LIBRARY_PATH = stdenv.lib.makeLibraryPath [ pkgs.mxnet ];
|
|
|
|
|
|
|
|
doCheck = !isPy3k;
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace python/setup.py \
|
2019-03-07 22:06:11 +00:00
|
|
|
--replace "graphviz<0.9.0," "graphviz" \
|
2019-06-02 18:11:58 +01:00
|
|
|
--replace "numpy<=1.15.2," "numpy" \
|
2019-03-07 22:06:11 +00:00
|
|
|
--replace "requests<2.19.0," "requests"
|
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
|
|
|
|
'';
|
|
|
|
|
|
|
|
}
|