Skip to content
Snippets Groups Projects
Commit df66a61d authored by Millian Poquet's avatar Millian Poquet
Browse files

nix: build python protobuf lib

parent b0691ad8
No related branches found
No related tags found
No related merge requests found
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
}: }:
let self = rec { let self = rec {
python3 = pkgs.python3;
pythonPackages = pkgs.python3Packages; pythonPackages = pkgs.python3Packages;
simgrid = pkgs.simgrid; simgrid = pkgs.simgrid;
protocol-cpp = pkgs.stdenv.mkDerivation { protocol-cpp = pkgs.stdenv.mkDerivation {
...@@ -23,6 +24,22 @@ let self = rec { ...@@ -23,6 +24,22 @@ let self = rec {
ninja ninja
]; ];
}; };
protocol-python = pkgs.stdenv.mkDerivation {
pname = "protocol-python";
version = "local";
src = pkgs.lib.sourceByRegex ./protocol [
"hello\.proto"
];
propagatedBuildInputs = [
pkgs.protobuf
pythonPackages.protobuf
];
phases = [ "unpackPhase" "buildPhase" ];
buildPhase = ''
mkdir -p $out/lib/python${pkgs.lib.versions.majorMinor python3.version}/site-packages/protocol
protoc --python_out $out/lib/python${pkgs.lib.versions.majorMinor python3.version}/site-packages/protocol hello.proto
'';
};
}; };
in in
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment