From e96b070d899e34ac8bd54321879d30cca3b64c50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81tila=20Saraiva=20Quintela=20Soares?= Date: Mon, 25 Jul 2022 10:08:14 -0300 Subject: [PATCH] deepwave: 0.0.11 -> 0.0.12 (#182024) --- .../python-modules/deepwave/default.nix | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/deepwave/default.nix b/pkgs/development/python-modules/deepwave/default.nix index 837259380ae4..c45115e53722 100644 --- a/pkgs/development/python-modules/deepwave/default.nix +++ b/pkgs/development/python-modules/deepwave/default.nix @@ -10,29 +10,40 @@ , pytestCheckHook }: +let + linePatch = '' + import os + os.environ['PATH'] = os.environ['PATH'] + ':${ninja}/bin' + ''; +in buildPythonPackage rec { pname = "deepwave"; - version = "0.0.11"; + version = "0.0.12"; format = "pyproject"; src = fetchFromGitHub { owner = "ar4"; repo = pname; rev = "v${version}"; - sha256 = "sha256-d4EahmzHACHaeKoNZy63OKwWZdlHbUydrbr4fD43X8s="; + sha256 = "sha256-WWu0LyHlOwWMVPUy+LAszKF3VlgcqlcMlDi4oon4Dl8="; }; # unable to find ninja although it is available, most likely because it looks for its pip version postPatch = '' substituteInPlace setup.cfg --replace "ninja" "" + + # Adding ninja to the path forcibly + mv src/deepwave/__init__.py tmp + echo "${linePatch}" > src/deepwave/__init__.py + cat tmp >> src/deepwave/__init__.py + rm tmp ''; # The source files are compiled at runtime and cached at the # $HOME/.cache folder, so for the check phase it is needed to # have a temporary home. This is also the reason ninja is not # needed at the nativeBuildInputs, since it will only be used - # at runtime. The user will have to add it to its nix-shell - # along with deepwave + # at runtime. preBuild = '' export HOME=$(mktemp -d) ''; @@ -40,7 +51,6 @@ buildPythonPackage rec { propagatedBuildInputs = [ pytorch pybind11 ]; checkInputs = [ - ninja which scipy pytest-xdist