|
4 | 4 | rust-overlay.url = "github:oxalica/rust-overlay/47beae969336c05e892e1e4a9dbaac9593de34ab";
|
5 | 5 | flake-utils.url = "github:numtide/flake-utils";
|
6 | 6 | crane.url = "github:ipetkov/crane";
|
7 |
| - movement.url = "github:movementlabsxyz/movement/ecb4dddebfdd6363af26977163c0803e57a0bbad"; |
| 7 | + movement.url = "github:movementlabsxyz/movement/278863e49276f280fb7c719c5fddeb3826fe85ee"; |
8 | 8 | };
|
9 | 9 |
|
10 | 10 | outputs = { nixpkgs, rust-overlay, flake-utils, crane, movement, ... }:
|
|
127 | 127 | export CPPFLAGS="-I/opt/homebrew/opt/zlib/include"
|
128 | 128 | fi
|
129 | 129 |
|
130 |
| - # Check if podman machine exists and is running |
131 |
| - if [ "$BUILD" != "docker" ]; then |
132 |
| - if ! podman machine inspect podman-machine-default &>/dev/null; then |
133 |
| - echo "Initializing podman machine..." |
134 |
| - podman machine init |
135 |
| - podman machine start |
136 |
| - elif ! podman machine inspect podman-machine-default --format '{{.State}}' | grep -q 'running'; then |
137 |
| - echo "Starting podman machine..." |
138 |
| - podman machine start |
| 130 | + # Always force recreation of the podman machine |
| 131 | + if podman machine inspect podman-machine-default &>/dev/null; then |
| 132 | + echo "Destroying existing podman machine..." |
| 133 | + if ! podman machine stop podman-machine-default 2>podman_stop_err.log; then |
| 134 | + echo "podman machine stop failed. Error output:" >&2 |
| 135 | + cat podman_stop_err.log >&2 |
139 | 136 | fi
|
140 |
| -
|
141 |
| - # Find the actual podman socket location |
142 |
| - PODMAN_SOCKET=$(find /tmp/nix-shell.*/podman -name "podman-machine-default-api.sock" -type s 2>/dev/null | head -n 1) |
143 |
| - if [ -n "$PODMAN_SOCKET" ]; then |
144 |
| - export DOCKER_HOST="unix://$PODMAN_SOCKET" |
145 |
| - echo "Set DOCKER_HOST to Podman socket: $DOCKER_HOST" |
146 |
| - else |
147 |
| - echo "Warning: Could not find Podman socket" |
| 137 | + if ! podman machine rm podman-machine-default -f 2>podman_rm_err.log; then |
| 138 | + echo "podman machine rm failed. Error output:" >&2 |
| 139 | + cat podman_rm_err.log >&2 |
| 140 | + exit 1 |
148 | 141 | fi
|
149 |
| - else |
150 |
| - echo "Build is docker podman will not be started." |
| 142 | + fi |
| 143 | +
|
| 144 | + echo "Initializing podman machine..." |
| 145 | + if ! podman machine init 2>podman_init_err.log; then |
| 146 | + echo "podman machine init failed. Error output:" >&2 |
| 147 | + cat podman_init_err.log >&2 |
| 148 | + exit 1 |
| 149 | + fi |
| 150 | + if ! podman machine start 2>podman_start_err.log; then |
| 151 | + echo "podman machine start failed. Error output:" >&2 |
| 152 | + cat podman_start_err.log >&2 |
| 153 | + exit 1 |
| 154 | + fi |
| 155 | +
|
| 156 | + echo "Podman machine is running" |
| 157 | +
|
| 158 | + # Find the actual podman socket location |
| 159 | + PODMAN_SOCKET=$(find /tmp/nix-shell.*/podman -name "podman-machine-default-api.sock" -type s 2>/dev/null | head -n 1) |
| 160 | + if [ -n "$PODMAN_SOCKET" ]; then |
| 161 | + export DOCKER_HOST="unix://$PODMAN_SOCKET" |
| 162 | + echo "Set DOCKER_HOST to Podman socket: $DOCKER_HOST" |
| 163 | + else |
| 164 | + echo "Warning: Could not find Podman socket" |
151 | 165 | fi
|
152 | 166 |
|
153 | 167 | # Add ./target/debug/* to PATH
|
|
0 commit comments