Skip to content

Commit ea4b152

Browse files
committed
Add readme
1 parent 60feae3 commit ea4b152

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed

Dockerfile.dapper

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ RUN echo trusted-public-keys = \
1818
ARG CACHIX_AUTH_TOKEN
1919

2020
ENV CACHIX_AUTH_TOKEN $CACHIX_AUTH_TOKEN
21+
ENV DAPPER_OUTPUT result-bin/bin/rust-lambda-cloudtrail
2122
ENV SHELL /bin/sh
2223
RUN nix-env -iA cachix -f https://cachix.org/api/v1/install
2324
WORKDIR /source/

Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,18 @@ bin/dapper:
88
.DEFAULT_GOAL :=
99

1010
all: bin/dapper
11-
@bin/dapper
11+
@bin/dapper nix build
12+
13+
cache: bin/dapper
14+
@bin/dapper cachix watch-exec whslabs -- nix build
1215

1316
s shell: bin/dapper
1417
@bin/dapper \
1518
-m bind \
1619
-s \
1720
;
21+
22+
clean:
23+
rm -rf bin/
24+
rm -rf target/
25+
rm -rf result-bin

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ cargo lambda build
44
cargo lambda deploy --iam-role <my role>
55
```
66

7-
# Nix (musl)
7+
# Nix or make
88
```sh
99
nix build
10+
# or
11+
make # require docker
12+
1013
mkdir -p target/lambda/rust-lambda-cloudtrail/
1114
cp result-bin/bin/rust-lambda-cloudtrail target/lambda/rust-lambda-cloudtrail/bootstrap
1215
cargo lambda deploy --iam-role <my role>

dapper.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#! /bin/sh
22

3-
nix-env -i jq
3+
rm -rf result-bin
44

5-
nix build --json \
6-
| jq -r '.[].outputs | to_entries[].value' \
7-
| cachix push whslabs
5+
exec "$@"

0 commit comments

Comments
 (0)