Unverified Commit ffdcdd03 authored by Weijia Wang's avatar Weijia Wang Committed by GitHub
Browse files

liboprf: 0.8.0 -> 0.9.2; python313Packages.ble-serial: init at 3.0.0 (#439603)

parents c9823917 96258eb7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
{ python3Packages }: with python3Packages; toPythonApplication ble-serial
+7 −0
Original line number Diff line number Diff line
@@ -28,6 +28,13 @@ stdenv.mkDerivation (finalAttrs: {
    liboprf
  ];

  # expand_message_xmd has been renamed to oprf_expand_message_xmd in liboprf
  # TODO: remove in the next release
  postPatch = ''
    substituteInPlace opaque.c \
      --replace-fail 'expand_message_xmd' 'oprf_expand_message_xmd'
  '';

  postInstall = ''
    mkdir -p ${placeholder "out"}/lib/pkgconfig
    cp ../libopaque.pc ${placeholder "out"}/lib/pkgconfig/
+2 −2
Original line number Diff line number Diff line
@@ -9,13 +9,13 @@

stdenv.mkDerivation (finalAttrs: {
  pname = "liboprf";
  version = "0.8.0";
  version = "0.9.2";

  src = fetchFromGitHub {
    owner = "stef";
    repo = "liboprf";
    tag = "v${finalAttrs.version}";
    hash = "sha256-xDE9UkHDAaA7zC6IxxEIUG7ziS1yYNLJbmVJZLJyL7U=";
    hash = "sha256-Toja0rR0321i7L1dsB9YxrwNJwKUzuSfK5LLR3tex7U=";
  };

  sourceRoot = "${finalAttrs.src.name}/src";
+57 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  hatchling,
  bleak,
  coloredlogs,
  pyserial,
  bless,
}:

buildPythonPackage rec {
  pname = "ble-serial";
  version = "3.0.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "Jakeler";
    repo = "ble-serial";
    tag = "v${version}";
    hash = "sha256-lbqu6VeE8XEIUvUILqKsTA+0/lxTr8GTbUBkSae/ruE=";
    fetchSubmodules = true;
  };

  build-system = [
    hatchling
  ];

  dependencies = [
    bleak
    coloredlogs
    pyserial
  ];

  optional-dependencies = {
    server = [
      bless
    ];
  };

  # Requires real hardware to test
  # https://github.com/Jakeler/ble-serial/blob/3f1a619208a0eb372a0993aadc086c4842946f21/tests/test.py
  doCheck = false;

  pythonImportsCheck = [
    "ble_serial.bluetooth.ble_client"
    "ble_serial.scan"
  ];

  meta = {
    description = "\"RFCOMM for BLE\" a Serial UART over Bluetooth low energy (4+) bridge";
    homepage = "https://github.com/Jakeler/ble-serial";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ eljamm ];
    platforms = lib.platforms.unix;
  };
}
+8 −0
Original line number Diff line number Diff line
@@ -4,7 +4,11 @@
  buildPythonPackage,
  liboprf,
  setuptools,
  ble-serial,
  pyserial,
  pyserial-asyncio,
  pysodium,
  pyudev,
  securestring,
  pytestCheckHook,
}:
@@ -32,7 +36,11 @@ buildPythonPackage rec {
  build-system = [ setuptools ];

  dependencies = [
    ble-serial
    pyserial
    pyserial-asyncio
    pysodium
    pyudev
    securestring
  ];

Loading