Skip to content

Commit 34e8797

Browse files
authored
python313Packages.pyzbar: switch to pyproject = true, misc cleanup; use minimal zbar library (#380152)
2 parents 3787e47 + 8b14bd4 commit 34e8797

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

pkgs/development/python-modules/pyzbar/default.nix

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,32 @@
77
pillow,
88
zbar,
99
pytestCheckHook,
10+
setuptools,
1011
}:
1112

13+
let
14+
zbar' = zbar.override {
15+
enableVideo = false;
16+
withXorg = false;
17+
};
18+
in
1219
buildPythonPackage rec {
1320
pname = "pyzbar";
1421
version = "0.1.9";
15-
format = "setuptools";
22+
pyproject = true;
1623

1724
src = fetchFromGitHub {
1825
owner = "NaturalHistoryMuseum";
1926
repo = "pyzbar";
20-
rev = "v${version}";
27+
tag = "v${version}";
2128
sha256 = "8IZQY6qB4r1SUPItDlTDnVQuPs0I38K3yJ6LiPJuwbU=";
2229
};
2330

24-
buildInputs = [ zbar ];
31+
build-system = [ setuptools ];
32+
33+
buildInputs = [ zbar' ];
2534

26-
propagatedBuildInputs = [
35+
dependencies = [
2736
pillow
2837
numpy
2938
];
@@ -34,9 +43,9 @@ buildPythonPackage rec {
3443
# https://github.com/NixOS/nixpkgs/issues/7307
3544
postPatch = ''
3645
substituteInPlace pyzbar/zbar_library.py \
37-
--replace \
46+
--replace-fail \
3847
"find_library('zbar')" \
39-
'"${lib.getLib zbar}/lib/libzbar${stdenv.hostPlatform.extensions.sharedLibrary}"'
48+
'"${lib.getLib zbar'}/lib/libzbar${stdenv.hostPlatform.extensions.sharedLibrary}"'
4049
'';
4150

4251
disabledTests = [

0 commit comments

Comments
 (0)