Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / zxing-cpp / default.nix
blobdbdc4c50effd53a4ae3f91a02dacd4b260c59488
1 { lib
2 , buildPythonPackage
3 , cmake
4 , setuptools-scm
5 , numpy
6 , pillow
7 , pybind11
8 , libzxing-cpp
9 , pytestCheckHook
12 buildPythonPackage rec {
13   pname = "zxing-cpp";
14   inherit (libzxing-cpp) src version meta;
15   pyproject = true;
17   sourceRoot = "${src.name}/wrappers/python";
19   # we don't need pybind11 in the root environment
20   # https://pybind11.readthedocs.io/en/stable/installing.html#include-with-pypi
21   postPatch = ''
22     substituteInPlace pyproject.toml \
23       --replace "pybind11[global]" "pybind11"
24   '';
26   dontUseCmakeConfigure = true;
28   propagatedBuildInputs = [
29     numpy
30   ];
32   buildInputs = [
33     pybind11
34   ];
36   nativeBuildInputs = [
37     cmake
38     setuptools-scm
39   ];
41   nativeCheckInputs = [
42     pillow
43     pytestCheckHook
44   ];
46   pytestFlagsArray = [
47     "test.py"
48   ];
50   pythonImportsCheck = [
51     "zxingcpp"
52   ];