mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-03-14 08:26:37 +01:00
mxnet is unmaintained, and requires cuda<=11 to compile. Removed support completely as most projects are migrating away from mxnet, and nixpkgs will soon stop supporting these old cuda versions.
54 lines
889 B
Nix
54 lines
889 B
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
pkgs,
|
|
setuptools,
|
|
distutils,
|
|
requests,
|
|
numpy,
|
|
graphviz,
|
|
python,
|
|
isPy3k,
|
|
}:
|
|
|
|
buildPythonPackage {
|
|
inherit (pkgs.mxnet) pname version src;
|
|
pyproject = true;
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
buildInputs = [ pkgs.mxnet ];
|
|
|
|
dependencies = [
|
|
distutils
|
|
requests
|
|
numpy
|
|
graphviz
|
|
];
|
|
|
|
pythonRelaxDeps = [
|
|
"graphviz"
|
|
"numpy"
|
|
];
|
|
|
|
LD_LIBRARY_PATH = lib.makeLibraryPath [ pkgs.mxnet ];
|
|
|
|
doCheck = !isPy3k;
|
|
|
|
postPatch = ''
|
|
# Required to support numpy >=1.24 where np.bool is removed in favor of just bool
|
|
substituteInPlace python/mxnet/numpy/utils.py \
|
|
--replace-fail "bool = onp.bool" "bool = bool"
|
|
'';
|
|
|
|
preConfigure = ''
|
|
cd python
|
|
'';
|
|
|
|
postInstall = ''
|
|
rm -rf $out/mxnet
|
|
ln -s ${pkgs.mxnet}/lib/libmxnet.so $out/${python.sitePackages}/mxnet
|
|
'';
|
|
|
|
meta = pkgs.mxnet.meta;
|
|
}
|