too lazy to write but it works

This commit is contained in:
alsaiduq-lab 2025-03-22 22:33:01 -06:00
parent 4b536b9b11
commit 3a7ec9f943
6 changed files with 145 additions and 90 deletions

View file

@ -1,23 +1,52 @@
{lib, python311Packages, fetchurl}:
{ lib
, python311Packages
, fetchPypi
, stdenv
, makeWrapper
, cmake
, pkg-config
}:
python311Packages.buildPythonPackage rec {
pname = "opencv-python-headless";
version = "4.9.0.80";
format = "wheel";
version = "4.11.0.86";
format = "setuptools";
src = fetchurl {
url = "https://files.pythonhosted.org/packages/71/19/3c65483a80a1d062d46ae20faf5404712d25cb1dfdcaf371efbd67c38544/opencv_python_headless-4.9.0.80-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl";
sha256 = "976656362d68d9f40a5c66f83901430538002465f7db59142784f3893918f3df";
src = fetchPypi {
pname = "opencv-python-headless";
inherit version;
format = "setuptools";
sha256 = "mW6ygspLQ+xqOXJBTeDiMx9dnNorQQkaSXOcGfuEN5g=";
};
nativeBuildInputs = with python311Packages; [
cmake
pkg-config
makeWrapper
scikit-build
];
buildInputs = with python311Packages; [
scikit-build
];
propagatedBuildInputs = with python311Packages; [
numpy
setuptools
];
dontUseCmakeConfigure = true;
doCheck = false;
pythonImportsCheck = [ "cv2" ];
postFixup = ''
wrapPythonProgramsIn "$out/lib/python3.11/site-packages" "${stdenv.cc.cc.lib}"
'';
meta = with lib; {
description = "Wrapper package for OpenCV python bindings";
description = "Wrapper package for OpenCV python bindings (headless)";
homepage = "https://github.com/opencv/opencv-python";
license = licenses.mit;
platforms = platforms.linux;