musl linux compilation working from now on
This commit is contained in:
11
.env_template_musl
Normal file
11
.env_template_musl
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
JWT_SECRET=<GENERATE-A-SECRET>
|
||||||
|
RUST_DB_MODE=embedded
|
||||||
|
KOMP_AC_POSTGRES_DIR=./data/postgresql
|
||||||
|
RUST_DB_NAME=komp_ac
|
||||||
|
RUST_DB_USER=postgres
|
||||||
|
RUST_DB_PASSWORD=<GENERATE-A-DATABASE-PASSWORD>
|
||||||
|
RUST_DB_HOST=127.0.0.1
|
||||||
|
RUST_DB_PORT=5433
|
||||||
|
RUST_DB_MAX_CONNECTIONS=5
|
||||||
|
GRPC_LISTEN_ADDRESS=[::1]:50051
|
||||||
|
PG_DUMP_DIR=./data/dumps
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -16,3 +16,4 @@ AGENT_TESTING_NOTES.md
|
|||||||
AGENT_TESTING_NOTES_CLIENT.md
|
AGENT_TESTING_NOTES_CLIENT.md
|
||||||
AGENT_TESTING_NOTES_WEB.md
|
AGENT_TESTING_NOTES_WEB.md
|
||||||
run_bins/
|
run_bins/
|
||||||
|
result
|
||||||
|
|||||||
2
client
2
client
Submodule client updated: e7ae5a9ff6...be0c552638
@@ -21,7 +21,7 @@ Output: `result/bin/server`.
|
|||||||
The resulting executable is intended for 64-bit Linux kernels. Run it normally:
|
The resulting executable is intended for 64-bit Linux kernels. Run it normally:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cp .env_template .env
|
cp .env_template_musl .env
|
||||||
# Replace JWT_SECRET in .env before starting.
|
# Replace JWT_SECRET in .env before starting.
|
||||||
./result/bin/server server
|
./result/bin/server server
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -157,9 +157,14 @@ bootstrapRustPlatform.buildRustPackage {
|
|||||||
SQLX_OFFLINE = "true";
|
SQLX_OFFLINE = "true";
|
||||||
RUSTFLAGS = "-Ctarget-feature=+crt-static";
|
RUSTFLAGS = "-Ctarget-feature=+crt-static";
|
||||||
|
|
||||||
|
preBuild = ''
|
||||||
|
cp -r ${source}/.sqlx .sqlx
|
||||||
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
file "$out/bin/server" | grep -q 'statically linked'
|
test -x "$out/bin/server"
|
||||||
! readelf -l "$out/bin/server" | grep -q 'Requesting program interpreter'
|
! readelf -l "$out/bin/server" | grep -q 'Requesting program interpreter'
|
||||||
|
! readelf -d "$out/bin/server" | grep -q '(NEEDED)'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|||||||
2
server
2
server
Submodule server updated: f075e3a1f4...f8371df81f
Reference in New Issue
Block a user