1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

nix: Fix villas-python package and include Protobuf generated code

Signed-off-by: Steffen Vogel <post@steffenvogel.de>
This commit is contained in:
Steffen Vogel 2024-03-26 13:50:12 +01:00 committed by pipeacosta
parent 99294393ce
commit 6afd01ca7c
2 changed files with 12 additions and 3 deletions

View file

@ -70,7 +70,7 @@
default = villas;
villas-python = pkgs.callPackage (nixDir + "/python.nix") {
src = ./python;
src = ./.;
};
villas-minimal = pkgs.callPackage (nixDir + "/villas.nix") {

View file

@ -2,16 +2,21 @@
# SPDX-License-Identifier: Apache-2.0
{
src,
pkgs,
python3Packages,
villas-minimal,
}:
python3Packages.buildPythonPackage {
name = "villas-python";
src = src;
src = "${src}/python";
format = "pyproject";
propagatedBuildInputs = with python3Packages; [
linuxfd
requests
villas-minimal
protobuf
];
build-system = with python3Packages; [
setuptools
];
nativeCheckInputs = with python3Packages; [
black
@ -20,4 +25,8 @@ python3Packages.buildPythonPackage {
pytest
types-requests
];
postPatch = ''
${pkgs.protobuf}/bin/protoc --proto_path ${src}/lib/formats --python_out=villas/node/ ${src}/lib/formats/villas.proto
'';
}