1
0
Fork 0
This commit is contained in:
mrtuxa 2023-04-23 02:34:29 +02:00
parent cd428559aa
commit de516d30c0
3 changed files with 26 additions and 2 deletions

11
Makefile Normal file
View File

@ -0,0 +1,11 @@
all: clean build_rs build_client
default: all
clean:
rm -rvf app/
build_rs:
cargo build --release
build_client:
sh build.sh

9
build.sh Normal file → Executable file
View File

@ -1,3 +1,8 @@
mkdir app
cd app
nix-shell -p pkg-config openssl pkg-config git gcc rustc cargo --command "git clone https://github.com/dezentrale/spaceapi-rs && cargo build --release && mkdir ~/dezentrale -p & cp target/release/spaceapi-dezentrale* ~/dezentrale && cd ~/pkgs/spaceapi && cargo build --release && cp target/release/pi ~/dezentrale"
cd app || exit
git clone https://github.com/dezentrale/spaceapi-rs app/spaceapi
cd app/spaceapi || exit
nix-shell -p pkg-config openssl --command "cargo build --release"
cd .. || exit
cp target/release/spaceapi-dezentrale-client .
cp ../target/release/pi .

8
shell.nix Normal file
View File

@ -0,0 +1,8 @@
with import <nixpkgs> {};
mkShell {
packages = [
cargo
rustc
rust-analyzer
];
}