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:
parent
99294393ce
commit
6afd01ca7c
2 changed files with 12 additions and 3 deletions
|
@ -70,7 +70,7 @@
|
|||
default = villas;
|
||||
|
||||
villas-python = pkgs.callPackage (nixDir + "/python.nix") {
|
||||
src = ./python;
|
||||
src = ./.;
|
||||
};
|
||||
|
||||
villas-minimal = pkgs.callPackage (nixDir + "/villas.nix") {
|
||||
|
|
|
@ -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
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue