18 inherit (cntk) name version src;
20 nativeBuildInputs = [ swig mpi ];
21 buildInputs = [ cntk mpi ];
22 propagatedBuildInputs = [ numpy scipy enum34 protobuf pip ];
24 CNTK_LIB_PATH = "${cntk}/lib";
25 CNTK_COMPONENT_VERSION = cntk.version;
26 CNTK_VERSION = cntk.version;
27 CNTK_VERSION_BANNER = cntk.version;
31 sed -i 's,"libmpi.so.12","${mpi}/lib/libmpi.so",g' cntk/train/distributed.py
33 # Remove distro and libs checks; they aren't compatible with NixOS and besides we guarantee
34 # compatibility by providing a package.
35 cat <<EOF > cntk/cntk_py_init.py
36 def cntk_check_distro_info():
38 def cntk_check_libs():
44 rm -rf $out/${python.sitePackages}/cntk/libs
45 ln -s ${cntk}/lib $out/${python.sitePackages}/cntk/libs
46 # It's not installed for some reason.
47 cp cntk/cntk_py.py $out/${python.sitePackages}/cntk
50 # Actual tests are broken.
53 ${python.interpreter} -c "import cntk"
57 inherit (cntk.meta) homepage description license maintainers platforms;
58 # doesn't support Python 3.7
59 broken = lib.versionAtLeast python.version "3.7";