https://github.com/determinatesystems/hash-mismatch-demo
A demonstration of automatic hash mismatch fixes
https://github.com/determinatesystems/hash-mismatch-demo
Last synced: 11 months ago
JSON representation
A demonstration of automatic hash mismatch fixes
- Host: GitHub
- URL: https://github.com/determinatesystems/hash-mismatch-demo
- Owner: DeterminateSystems
- Created: 2025-06-03T18:03:40.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-03T18:03:47.000Z (about 1 year ago)
- Last Synced: 2025-07-22T01:59:32.155Z (11 months ago)
- Language: Nix
- Size: 8.79 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Determinate Nix hash mismatch demo
First, try to build the package:
```shell
nix build
```
Uh-oh! There's a hash mismatch.
Now let's [install Determinate Nix][install].
Because with Determinate Nix, we can fix that automatically:
```shell
determinate-nixd fix hashes --auto-apply --since "1 minute"
```
This updates our [`flake.nix`](flake.nix) in place with the correct hash.
Now let's try building again:
```shell
nix build
```
And we're done!
Let's run our web server:
```shell
./result/bin/hash-mismatch-demo
```
In another terminal:
```shell
curl http://localhost:8080/ping
```
And we should see this as the output:
```json
{
"message": "pong"
}
```
[install]: https://docs.determinate.systems