Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dz-ci-prototype
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
poquet
dz-ci-prototype
Commits
b0691ad8
Commit
b0691ad8
authored
2 years ago
by
Millian Poquet
Browse files
Options
Downloads
Patches
Plain Diff
protobuf + nix setup
parent
c1b5402e
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitignore
+2
-0
2 additions, 0 deletions
.gitignore
default.nix
+29
-0
29 additions, 0 deletions
default.nix
protocol/hello.proto
+10
-0
10 additions, 0 deletions
protocol/hello.proto
protocol/meson.build
+21
-0
21 additions, 0 deletions
protocol/meson.build
with
62 additions
and
0 deletions
.gitignore
0 → 100644
+
2
−
0
View file @
b0691ad8
result
.vscode
This diff is collapsed.
Click to expand it.
default.nix
0 → 100644
+
29
−
0
View file @
b0691ad8
{
pkgs
?
import
(
fetchTarball
{
url
=
"https://github.com/NixOS/nixpkgs/archive/22.05.tar.gz"
;
sha256
=
"0d643wp3l77hv2pmg2fi7vyxn4rwy0iyr8djcw1h5x72315ck9ik"
;
})
{}
}:
let
self
=
rec
{
pythonPackages
=
pkgs
.
python3Packages
;
simgrid
=
pkgs
.
simgrid
;
protocol-cpp
=
pkgs
.
stdenv
.
mkDerivation
{
pname
=
"protocol-cpp"
;
version
=
"local"
;
src
=
pkgs
.
lib
.
sourceByRegex
./protocol
[
"hello
\.
proto"
"meson
\.
build"
];
propagatedBuildInputs
=
with
pkgs
;
[
protobuf
];
buildInputs
=
with
pkgs
;
[
meson
pkg-config
ninja
];
};
};
in
self
This diff is collapsed.
Click to expand it.
protocol/hello.proto
0 → 100644
+
10
−
0
View file @
b0691ad8
syntax
=
"proto2"
;
package
hello
;
message
Hello
{
optional
string
name
=
1
;
}
message
Bye
{
}
This diff is collapsed.
Click to expand it.
protocol/meson.build
0 → 100644
+
21
−
0
View file @
b0691ad8
project
(
'protocol-cpp'
,
'cpp'
,
version
:
'0.1.0'
,
default_options
:
[
'cpp_std=c++17'
])
protoc
=
find_program
(
'protoc'
,
required
:
true
)
protobuf_dep
=
dependency
(
'protobuf'
,
required
:
true
)
gen
=
generator
(
protoc
,
\
output
:
[
'@BASENAME@.pb.cc'
,
'@BASENAME@.pb.h'
],
arguments
:
[
'--proto_path=@CURRENT_SOURCE_DIR@'
,
'--cpp_out=@BUILD_DIR@'
,
'@INPUT@'
])
proto_generated_cpp
=
custom_target
(
'protobuf-generated-sources'
,
input
:
[
'hello.proto'
],
output
:
[
'hello.pb.h'
,
'hello.pb.cc'
],
command
:
[
protoc
,
'--proto_path=@CURRENT_SOURCE_DIR@'
,
'--cpp_out=@OUTDIR@'
,
'@INPUT@'
],
install
:
true
,
install_dir
:
[
get_option
(
'includedir'
),
false
],
)
lib
=
shared_library
(
'protocol'
,
proto_generated_cpp
,
dependencies
:
protobuf_dep
,
install
:
true
)
pkg
=
import
(
'pkgconfig'
)
pkg
.
generate
(
lib
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment