···23 # to still support the old standalone toolchains builds.
24 if [ -d $out/libexec/android-sdk/ndk ] && [ ! -d $out/libexec/android-sdk/ndk-bundle ]; then
25 ln -sf $out/libexec/android-sdk/ndk/${package.revision} $out/libexec/android-sdk/ndk-bundle
26- else
27 echo "The ndk-bundle layout has changed. The nix expressions have to be updated!"
28 exit 1
29 fi
···23 # to still support the old standalone toolchains builds.
24 if [ -d $out/libexec/android-sdk/ndk ] && [ ! -d $out/libexec/android-sdk/ndk-bundle ]; then
25 ln -sf $out/libexec/android-sdk/ndk/${package.revision} $out/libexec/android-sdk/ndk-bundle
26+ elif [ ! -d $out/libexec/android-sdk/ndk-bundle ]; then
27 echo "The ndk-bundle layout has changed. The nix expressions have to be updated!"
28 exit 1
29 fi
···10, pytestCheckHook
11}:
1200000013buildPythonPackage rec {
14 pname = "deepwave";
15- version = "0.0.11";
16 format = "pyproject";
1718 src = fetchFromGitHub {
19 owner = "ar4";
20 repo = pname;
21 rev = "v${version}";
22- sha256 = "sha256-d4EahmzHACHaeKoNZy63OKwWZdlHbUydrbr4fD43X8s=";
23 };
2425 # unable to find ninja although it is available, most likely because it looks for its pip version
26 postPatch = ''
27 substituteInPlace setup.cfg --replace "ninja" ""
00000028 '';
2930 # The source files are compiled at runtime and cached at the
31 # $HOME/.cache folder, so for the check phase it is needed to
32 # have a temporary home. This is also the reason ninja is not
33 # needed at the nativeBuildInputs, since it will only be used
34- # at runtime. The user will have to add it to its nix-shell
35- # along with deepwave
36 preBuild = ''
37 export HOME=$(mktemp -d)
38 '';
···40 propagatedBuildInputs = [ pytorch pybind11 ];
4142 checkInputs = [
43- ninja
44 which
45 scipy
46 pytest-xdist
···10, pytestCheckHook
11}:
1213+let
14+ linePatch = ''
15+ import os
16+ os.environ['PATH'] = os.environ['PATH'] + ':${ninja}/bin'
17+ '';
18+in
19buildPythonPackage rec {
20 pname = "deepwave";
21+ version = "0.0.12";
22 format = "pyproject";
2324 src = fetchFromGitHub {
25 owner = "ar4";
26 repo = pname;
27 rev = "v${version}";
28+ sha256 = "sha256-WWu0LyHlOwWMVPUy+LAszKF3VlgcqlcMlDi4oon4Dl8=";
29 };
3031 # unable to find ninja although it is available, most likely because it looks for its pip version
32 postPatch = ''
33 substituteInPlace setup.cfg --replace "ninja" ""
34+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
39+ rm tmp
40 '';
4142 # 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
46+ # at runtime.
047 preBuild = ''
48 export HOME=$(mktemp -d)
49 '';
···51 propagatedBuildInputs = [ pytorch pybind11 ];
5253 checkInputs = [
054 which
55 scipy
56 pytest-xdist