Skip to content

Commit

Permalink
Merge pull request NixOS#265575 from natsukium/zxing-cpp
Browse files Browse the repository at this point in the history
python311Packages.zxing-cpp: rename from zxing_cpp
  • Loading branch information
natsukium authored Nov 6, 2023
2 parents ae52f96 + 60404c1 commit eecc845
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 35 deletions.
4 changes: 2 additions & 2 deletions pkgs/applications/misc/yubioath-flutter/helper.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
, yubikey-manager
, fido2
, mss
, zxing_cpp
, zxing-cpp
, pillow
, cryptography

Expand Down Expand Up @@ -43,7 +43,7 @@ buildPythonApplication {
yubikey-manager
fido2
mss
zxing_cpp
zxing-cpp
pillow
cryptography
];
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/office/paperless-ngx/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ python.pkgs.buildPythonApplication rec {
whoosh
zipp
zope_interface
zxing_cpp
zxing-cpp
]
++ redis.optional-dependencies.hiredis
++ twisted.optional-dependencies.tls
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/libraries/zxing-cpp/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ stdenv.mkDerivation (finalAttrs: {

passthru = {
tests = {
inherit (python3.pkgs) zxing_cpp;
inherit (python3.pkgs) zxing-cpp;
};
updateScript = gitUpdater {
rev-prefix = "v";
Expand Down
53 changes: 53 additions & 0 deletions pkgs/development/python-modules/zxing-cpp/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{ lib
, buildPythonPackage
, cmake
, setuptools-scm
, numpy
, pillow
, pybind11
, libzxing-cpp
, pytestCheckHook
}:

buildPythonPackage rec {
pname = "zxing-cpp";
inherit (libzxing-cpp) src version meta;
pyproject = true;

sourceRoot = "${src.name}/wrappers/python";

# we don't need pybind11 in the root environment
# https://pybind11.readthedocs.io/en/stable/installing.html#include-with-pypi
postPatch = ''
substituteInPlace pyproject.toml \
--replace "pybind11[global]" "pybind11"
'';

dontUseCmakeConfigure = true;

propagatedBuildInputs = [
numpy
];

buildInputs = [
pybind11
];

nativeBuildInputs = [
cmake
setuptools-scm
];

nativeCheckInputs = [
pillow
pytestCheckHook
];

pytestFlagsArray = [
"test.py"
];

pythonImportsCheck = [
"zxingcpp"
];
}
30 changes: 0 additions & 30 deletions pkgs/development/python-modules/zxing_cpp/default.nix

This file was deleted.

1 change: 1 addition & 0 deletions pkgs/top-level/python-aliases.nix
Original file line number Diff line number Diff line change
Expand Up @@ -450,4 +450,5 @@ mapAliases ({
zope_i18nmessageid = zope-i18nmessageid; # added 2023-07-29
zope_lifecycleevent = zope-lifecycleevent; # added 2023-10-11
zope_proxy = zope-proxy; # added 2023-10-07
zxing_cpp = zxing-cpp; # added 2023-11-05
})
4 changes: 3 additions & 1 deletion pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16113,5 +16113,7 @@ self: super: with self; {

zxcvbn = callPackage ../development/python-modules/zxcvbn { };

zxing_cpp = callPackage ../development/python-modules/zxing_cpp { };
zxing-cpp = callPackage ../development/python-modules/zxing-cpp {
libzxing-cpp = pkgs.zxing-cpp;
};
}

0 comments on commit eecc845

Please sign in to comment.