-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate.sh
executable file
·31 lines (28 loc) · 1.15 KB
/
update.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env bash
# Update `flake.lock`. `nix flake update` doesn't suffice because that won't
# force-update nested dependencies like karamel.
nix flake update \
--override-input hax "github:hacspec/hax" \
--override-input charon "github:aeneasverif/charon" \
--override-input aeneas "github:aeneasverif/aeneas" \
--override-input eurydice "github:aeneasverif/eurydice" \
--override-input eurydice/karamel "github:FStarLang/karamel" \
--override-input eurydice/karamel/fstar "github:FStarLang/fstar" \
--override-input libcrux "github:cryspen/libcrux" \
--override-input bertie "github:cryspen/bertie"
# Generates a `Cargo.lock` for the given project.
function generate_cargo_lock() {
PROJECT="$1"
COMMIT="$(jq -r .nodes."$PROJECT".locked.rev flake.lock)"
OWNER="$(jq -r .nodes."$PROJECT".locked.owner flake.lock)"
REPO="$(jq -r .nodes."$PROJECT".locked.repo flake.lock)"
git clone "https://github.com/$OWNER/$REPO" tmp
cd tmp
git checkout "$COMMIT"
nix develop --command cargo generate-lockfile
cd ..
mv tmp/Cargo.lock "$PROJECT"-Cargo.lock
rm -rf tmp
}
generate_cargo_lock libcrux
generate_cargo_lock bertie