nixpkgs/pkgs/development/python-modules/mxnet/default.nix
Mitchell Pleune 5aa1fe8ea9 mxnet: remove cuda support
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.
2025-02-17 18:46:55 +00:00

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;
}