File tree 4 files changed +22
-27
lines changed
4 files changed +22
-27
lines changed Original file line number Diff line number Diff line change 1
- FROM rust:1.66.1-buster
1
+ FROM nixos/nix
2
2
3
- RUN apt-get update && \
4
- apt-get install -y \
5
- build-essential \
6
- cmake \
7
- clang \
8
- libclang-dev \
9
- llvm-dev \
10
- git \
11
- protobuf-compiler && \
12
- apt-get clean
13
-
14
- RUN rustup component add rustfmt clippy
15
- RUN rustup target add armv5te-unknown-linux-gnueabi
16
- RUN rustup target add armv7-unknown-linux-gnueabihf
17
- RUN cargo install cargo-bitbake
18
-
19
- # Install opkg-utils
20
- RUN git clone git://git.yoctoproject.org/opkg-utils /opt/opkg-utils && \
21
- cd /opt/opkg-utils && \
22
- make install
23
-
24
- ENV LLVM_CONFIG_PATH=llvm-config
25
3
ENV PROJECT_PATH=/chirpstack-udp-forwarder
26
- RUN mkdir -p $PROJECT_PATH
27
4
WORKDIR $PROJECT_PATH
5
+
6
+ ENTRYPOINT ["nix-shell"]
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ services:
7
7
volumes :
8
8
- ./:/chirpstack-udp-forwarder
9
9
- ./.rust/target:/chirpstack-udp-forwarder/target
10
- - ./.rust/.cargo/registry/index:/usr/local/cargo/registry/index
11
- - ./.rust/.cargo/registry/cache:/usr/local/cargo/registry/cache
12
- - ./.rust/.cargo/git/db:/usr/local/cargo/git/db
10
+ - ./.rust/rustup:/usr/local/rustup
11
+ - ./.rust/cargo/registry/index:/usr/local/cargo/registry/index
12
+ - ./.rust/cargo/registry/cache:/usr/local/cargo/registry/cache
13
+ - ./.rust/cargo/git/db:/usr/local/cargo/git/db
Original file line number Diff line number Diff line change
1
+ [toolchain ]
2
+ channel = " 1.69.0"
3
+ components = [" rustfmt" , " clippy" ]
4
+ targets = [" armv5te-unknown-linux-gnueabi" , " armv7-unknown-linux-gnueabihf" ]
5
+ profile = " default"
Original file line number Diff line number Diff line change
1
+ { pkgs ? import ( fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixos-22.11.tar.gz" ) { } } :
2
+
3
+ pkgs . mkShell {
4
+ buildInputs = [
5
+ pkgs . cacert
6
+ pkgs . rustup
7
+ pkgs . protobuf
8
+ pkgs . cargo-bitbake
9
+ ] ;
10
+ }
You can’t perform that action at this time.
0 commit comments