I am trying to build the pvporcupine
Python package (version 3.0.5) using buildPythonPackage
in NixOS, but I am encountering an issue during the build process. Specifically, the build fails with a FileExistsError
, and the error log mentions that the file /build/pvporcupine-3.0.5/pvporcupine
already exists.
Here is the relevant snippet of my Nix expression:
{ lib, buildPythonPackage, fetchPypi, setuptools, wheel, }:
buildPythonPackage rec {
pname = "pvporcupine";
version = "3.0.5";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-SPkqsQqQS4Eeaa+xgXXSvUhXzOyL4JT0JEmWGoD6KvE=";
};
buildInputs = [ setuptools wheel ];
pythonImportsCheck = [ "pvporcupine" ];
meta = {
description = "Porcupine wake word engine";
homepage = "https://pypi.org/project/pvporcupine/";
license = lib.licenses.unfree; # FIXME: nix-init did not find a license
maintainers = with lib.maintainers; [ ];
};
}
Error Log:
error: builder for '/nix/store/w96qbkynmh1k4ds7yqinpcdiw3bs5blb-python3.11-pvporcupine-3.0.5.drv' failed with exit code 1;
last 25 log lines:
> Creating a wheel...
> * Getting build dependencies for wheel...
> sh: git: not found
> Traceback (most recent call last):
> File "/nix/store/hjx1hz74ic3ls6s613513zr5l885hj1l-python3.11-pyproject-hooks-1.0.0/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
> main()
> File "/nix/store/hjx1hz74ic3ls6s613513zr5l885hj1l-python3.11-pyproject-hooks-1.0.0/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
> json_out['return_val'] = hook(**hook_input['kwargs'])
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/nix/store/hjx1hz74ic3ls6s613513zr5l885hj1l-python3.11-pyproject-hooks-1.0.0/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
> return hook(config_settings)
> ^^^^^^^^^^^^^^^^^^^^^
> File "/nix/store/g0lc2h0r8cc0w3k1qd7n5gr692qan4z9-python3.11-setuptools-68.2.2/lib/python3.11/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel
> return self._get_build_requires(config_settings, requirements=['wheel'])
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/nix/store/g0lc2h0r8cc0w3k1qd7n5gr692qan4z9-python3.11-setuptools-68.2.2/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires
> self.run_setup()
> File "/nix/store/g0lc2h0r8cc0w3k1qd7n5gr692qan4z9-python3.11-setuptools-68.2.2/lib/python3.11/site-packages/setuptools/build_meta.py", line 507, in run_setup
> super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
> File "/nix/store/g0lc2h0r8cc0w3k1qd7n5gr692qan4z9-python3.11-setuptools-68.2.2/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in run_setup
> exec(code, locals())
> File "<string>", line 20, in <module>
> FileExistsError: [Errno 17] File exists: '/build/pvporcupine-3.0.5/pvporcupine'
>
> ERROR Backend subprocess exited when trying to invoke get_requires_for_build_wheel