File tree 6 files changed +88
-10
lines changed
6 files changed +88
-10
lines changed Original file line number Diff line number Diff line change
1
+ use flake
Original file line number Diff line number Diff line change @@ -32,3 +32,6 @@ node_modules/
32
32
# Flatc compiler symlink
33
33
/flatc
34
34
/flatc.exe
35
+
36
+ # direnv has been claimed for Nix usage
37
+ .direnv /
Original file line number Diff line number Diff line change
1
+ {
2
+ description = "A hardware-agnostic serialization protocol for full body tracking (FBT) in VR" ;
3
+
4
+ inputs . nixpkgs . url = "nixpkgs/nixos-22.11" ;
5
+ inputs . flake-utils . url = "github:numtide/flake-utils" ;
6
+
7
+ outputs = {
8
+ self ,
9
+ nixpkgs ,
10
+ flake-utils ,
11
+ } :
12
+ flake-utils . lib . eachDefaultSystem
13
+ (
14
+ system : let
15
+ pkgs = nixpkgs . legacyPackages . ${ system } ;
16
+ in {
17
+ devShells . default = import ./shell.nix { inherit pkgs ; } ;
18
+ }
19
+ ) ;
20
+ }
Original file line number Diff line number Diff line change 1
- #! /bin/bash
1
+ #! /usr/ bin/env bash
2
2
set -e
3
3
VERSION=" 22.10.26"
4
4
5
- if [[ " $( ./flatc --version) " != " flatc version $VERSION " ]]; then
5
+ if [[ -f " ./flatc" ]]; then
6
+ PATH=" ./:$PATH "
7
+ fi
8
+
9
+ if [[ " $( flatc --version) " != " flatc version $VERSION " ]]; then
6
10
echo " Flatc must be $VERSION "
7
11
exit 1
8
12
fi
9
13
10
- rm -rf protocol/java/src
11
- rm -rf protocol/cpp/include/solarxr_protocol/generated
12
- rm -rf protocol/typescript/src
14
+ rm -rf protocol/java/src
15
+ rm -rf protocol/cpp/include/solarxr_protocol/generated
16
+ rm -rf protocol/typescript/src
13
17
rm -rf protocol/rust/src/generated
14
18
rm -rf protocol/kotlin/src
15
19
16
- ./ flatc --java --gen-object-api --gen-all -o ./protocol/java/src -I ./schema/ ./schema/all.fbs && \
17
- ./ flatc --cpp --scoped-enums --gen-all -o ./protocol/cpp/include/solarxr_protocol/generated -I ./schema/ ./schema/all.fbs && \
18
- ./ flatc --ts --gen-object-api --gen-all -o ./protocol/typescript/src -I ./schema/ ./schema/all.fbs && \
19
- ./ flatc --rust --rust-module-root-file --gen-all -o ./protocol/rust/src/generated ./schema/all.fbs && \
20
- ./ flatc --kotlin --gen-jvmstatic --gen-all -o ./protocol/kotlin/src -I ./schema/ ./schema/all.fbs
20
+ flatc --java --gen-object-api --gen-all -o ./protocol/java/src -I ./schema/ ./schema/all.fbs && \
21
+ flatc --cpp --scoped-enums --gen-all -o ./protocol/cpp/include/solarxr_protocol/generated -I ./schema/ ./schema/all.fbs && \
22
+ flatc --ts --gen-object-api --gen-all -o ./protocol/typescript/src -I ./schema/ ./schema/all.fbs && \
23
+ flatc --rust --rust-module-root-file --gen-all -o ./protocol/rust/src/generated ./schema/all.fbs && \
24
+ flatc --kotlin --gen-jvmstatic --gen-all -o ./protocol/kotlin/src -I ./schema/ ./schema/all.fbs
Original file line number Diff line number Diff line change
1
+ { pkgs ? import <nixpkgs> { } } :
2
+ with pkgs ;
3
+ mkShell {
4
+ nativeBuildInputs = [
5
+ flatbuffers
6
+ direnv
7
+ ] ;
8
+ }
You can’t perform that action at this time.
0 commit comments