zxing-cpp: 2.2.1 -> 2.3.0
Changelog: https://github.com/zxing-cpp/zxing-cpp/releases/tag/v2.3.0 Diff: https://github.com/zxing-cpp/zxing-cpp/compare/v2.2.1...v2.3.0
This commit is contained in:
@@ -1,38 +1,37 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
pkg-config,
|
||||
python3,
|
||||
fetchFromGitHub,
|
||||
gitUpdater,
|
||||
python3,
|
||||
stdenv,
|
||||
zint,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "zxing-cpp";
|
||||
version = "2.2.1";
|
||||
version = "2.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "zxing-cpp";
|
||||
repo = "zxing-cpp";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-teFspdATn9M7Z1vSr/7PdJx/xAv+TVai8rIekxqpBZk=";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-e3nSxjg8p+1DEUbZOh4C2zfnA6iGhNJMPiIe2oJEbRo=";
|
||||
};
|
||||
|
||||
# c++ 20 needed for char8_t or clang-19 build fails
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail "CMAKE_CXX_STANDARD 17" "CMAKE_CXX_STANDARD 20"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
zint
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBUILD_EXAMPLES=OFF"
|
||||
"-DBUILD_BLACKBOX_TESTS=OFF"
|
||||
"-DZXING_BLACKBOX_TESTS=OFF"
|
||||
"-DZXING_DEPENDENCIES=LOCAL"
|
||||
"-DZXING_EXAMPLES=OFF"
|
||||
"-DZXING_USE_BUNDLED_ZINT=OFF"
|
||||
];
|
||||
|
||||
passthru = {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
pybind11,
|
||||
libzxing-cpp,
|
||||
pytestCheckHook,
|
||||
zint,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
@@ -20,20 +21,28 @@ buildPythonPackage rec {
|
||||
# https://pybind11.readthedocs.io/en/stable/installing.html#include-with-pypi
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace "pybind11[global]" "pybind11"
|
||||
--replace-fail "pybind11[global]" "pybind11"
|
||||
|
||||
substituteInPlace setup.py \
|
||||
--replace-fail "cfg = 'Debug' if self.debug else 'Release'" "cfg = 'Release'" \
|
||||
--replace-fail " '-DVERSION_INFO=' + self.distribution.get_version()]" " '-DVERSION_INFO=' + self.distribution.get_version(), '-DZXING_DEPENDENCIES=LOCAL', '-DZXING_USE_BUNDLED_ZINT=OFF']"
|
||||
'';
|
||||
|
||||
dontUseCmakeConfigure = true;
|
||||
|
||||
propagatedBuildInputs = [ numpy ];
|
||||
build-system = [
|
||||
setuptools-scm
|
||||
pybind11
|
||||
];
|
||||
|
||||
buildInputs = [ pybind11 ];
|
||||
dependencies = [ numpy ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
setuptools-scm
|
||||
];
|
||||
|
||||
buildInputs = [ zint ];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pillow
|
||||
pytestCheckHook
|
||||
|
||||
Reference in New Issue
Block a user