Commit 10534f21 authored by Robert Schütz's avatar Robert Schütz
Browse files

python3Packages.qh3: init at 1.5.4

parent 402cfc38
Loading
Loading
Loading
Loading
+74 −0
Original line number Diff line number Diff line
{
  buildPythonPackage,
  cmake,
  cryptography,
  fetchFromGitHub,
  lib,
  pytest-asyncio,
  pytest-mock,
  pytestCheckHook,
  rustPlatform,
  stdenv,
}:

buildPythonPackage rec {
  pname = "qh3";
  version = "1.5.4";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "jawah";
    repo = "qh3";
    tag = "v${version}";
    hash = "sha256-VlqkZk+7803dzwMBFpsSSQUSVu5/1jKouwuK7jNuMGU=";
  };

  cargoDeps = rustPlatform.fetchCargoVendor {
    inherit pname version src;
    hash = "sha256-Dgx7CSH+XyVZSVHAcr65QULsY//rxgeQe5jYQQkSjHc=";
  };

  nativeBuildInputs = [
    cmake
    rustPlatform.bindgenHook
    rustPlatform.cargoSetupHook
    rustPlatform.maturinBuildHook
  ];

  dontUseCmakeConfigure = true;

  env.NIX_CFLAGS_COMPILE = toString (
    lib.optionals stdenv.cc.isGNU [
      "-Wno-error=stringop-overflow"
    ]
  );

  pythonImportsCheck = [ "qh3" ];

  nativeCheckInputs = [
    cryptography
    pytest-asyncio
    pytest-mock
    pytestCheckHook
  ];

  __darwinAllowLocalNetworking = true;

  preCheck = ''
    # import from $out
    rm -r qh3
  '';

  disabledTests = lib.optionals stdenv.buildPlatform.isDarwin [
    # ConnectionError
    "test_connect_and_serve_ipv4"
  ];

  meta = {
    changelog = "https://github.com/jawah/qh3/blob/${src.tag}/CHANGELOG.rst";
    description = "Lightweight QUIC and HTTP/3 implementation in Python";
    homepage = "https://github.com/jawah/qh3";
    license = lib.licenses.bsd3;
    maintainers = with lib.maintainers; [ dotlambda ];
  };
}
+4 −0
Original line number Diff line number Diff line
@@ -15327,6 +15327,10 @@ self: super: with self; {
  qgrid = callPackage ../development/python-modules/qgrid { };
  qh3 = callPackage ../development/python-modules/qh3 {
    inherit (pkgs) cmake;
  };
  qiling = callPackage ../development/python-modules/qiling { };
  qimage2ndarray = callPackage ../development/python-modules/qimage2ndarray { };