16 os.environ['PATH'] = os.environ['PATH'] + ':${ninja}/bin'
19 buildPythonPackage rec {
24 src = fetchFromGitHub {
28 sha256 = "sha256-k1MUrnIkllxGIpkEScTZBEDBBNHgJHxau1e/L8TOEKc=";
31 # unable to find ninja although it is available, most likely because it looks for its pip version
33 substituteInPlace setup.cfg --replace "ninja" ""
35 # Adding ninja to the path forcibly
36 mv src/deepwave/__init__.py tmp
37 echo "${linePatch}" > src/deepwave/__init__.py
38 cat tmp >> src/deepwave/__init__.py
42 # The source files are compiled at runtime and cached at the
43 # $HOME/.cache folder, so for the check phase it is needed to
44 # have a temporary home. This is also the reason ninja is not
45 # needed at the nativeBuildInputs, since it will only be used
48 export HOME=$(mktemp -d)
51 propagatedBuildInputs = [ torch pybind11 ];
60 pythonImportsCheck = [ "deepwave" ];
63 description = "Wave propagation modules for PyTorch";
64 homepage = "https://github.com/ar4/deepwave";
65 license = licenses.mit;
66 platforms = intersectLists platforms.x86_64 platforms.linux;
67 maintainers = with maintainers; [ atila ];