1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00
VILLASnode/packaging/nix/python.nix
Steffen Vogel 8a3be3d8ba nix: Reformat with nixfmt
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
2024-04-10 08:50:04 +02:00

33 lines
727 B
Nix

# SPDX-FileCopyrightText: 2023 OPAL-RT Germany GmbH
# SPDX-License-Identifier: Apache-2.0
{
src,
pkgs,
python3Packages,
}:
python3Packages.buildPythonPackage {
name = "villas-node";
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
types-protobuf
mypy-protobuf
pytestCheckHook
];
postPatch = ''
${pkgs.protobuf}/bin/protoc --proto_path ${src}/lib/formats --mypy_out=villas/node --python_out=villas/node/ ${src}/lib/formats/villas.proto
'';
}