1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-30 00:00:11 +01:00
VILLASnode/packaging/nix/python.nix
Steffen Vogel 143e59e3bf python: Add protobuf format and test
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
2024-06-18 12:39:42 +02:00

34 lines
693 B
Nix

# SPDX-FileCopyrightText: 2023 OPAL-RT Germany GmbH
# SPDX-License-Identifier: Apache-2.0
{
src,
pkgs,
python3Packages,
villas-minimal,
}:
python3Packages.buildPythonPackage {
name = "villas-python";
src = "${src}/python";
format = "pyproject";
propagatedBuildInputs = with python3Packages; [
linuxfd
requests
protobuf
];
build-system = with python3Packages; [
setuptools
];
nativeCheckInputs = with python3Packages; [
black
flake8
mypy
pytest
types-requests
pytestCheckHook
];
postPatch = ''
${pkgs.protobuf}/bin/protoc --proto_path ${src}/lib/formats --python_out=villas/node/ ${src}/lib/formats/villas.proto
'';
}