mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-19 02:44:17 +03:00
38 lines
700 B
Nix
38 lines
700 B
Nix
{ stdenv
|
|
, buildPythonPackage
|
|
, pkgs
|
|
, requests
|
|
, numpy
|
|
, graphviz
|
|
, python
|
|
, isPy3k
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
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 \
|
|
--replace "graphviz<0.9.0," "graphviz" \
|
|
--replace "numpy<=1.15.2," "numpy" \
|
|
--replace "requests<2.19.0," "requests"
|
|
'';
|
|
|
|
preConfigure = ''
|
|
cd python
|
|
'';
|
|
|
|
postInstall = ''
|
|
rm -rf $out/mxnet
|
|
ln -s ${pkgs.mxnet}/lib/libmxnet.so $out/${python.sitePackages}/mxnet
|
|
'';
|
|
|
|
}
|