17 os.environ['PATH'] = os.environ['PATH'] + ':${ninja}/bin'
20 buildPythonPackage rec {
25 src = fetchFromGitHub {
29 hash = "sha256-DOOy+B12jgwJzQ90qzX50OFxYLPRcVdVYSE5gi3pqDM=";
32 # unable to find ninja although it is available, most likely because it looks for its pip version
34 substituteInPlace setup.cfg --replace "ninja" ""
36 # Adding ninja to the path forcibly
37 mv src/deepwave/__init__.py tmp
38 echo "${linePatch}" > src/deepwave/__init__.py
39 cat tmp >> src/deepwave/__init__.py
43 # The source files are compiled at runtime and cached at the
44 # $HOME/.cache folder, so for the check phase it is needed to
45 # have a temporary home. This is also the reason ninja is not
46 # needed at the nativeBuildInputs, since it will only be used
49 export HOME=$(mktemp -d)
52 propagatedBuildInputs = [
64 pythonImportsCheck = [ "deepwave" ];
67 description = "Wave propagation modules for PyTorch";
68 homepage = "https://github.com/ar4/deepwave";
69 license = licenses.mit;
70 platforms = intersectLists platforms.x86_64 platforms.linux;
71 maintainers = with maintainers; [ atila ];