21 lines
389 B
Markdown
21 lines
389 B
Markdown
|
|
# 22-fetchers-and-fixed-output
|
||
|
|
|
||
|
|
This example shows a pinned fetcher with `fetchurl`.
|
||
|
|
|
||
|
|
It includes:
|
||
|
|
|
||
|
|
- one upstream tarball fetched with `fetchurl`,
|
||
|
|
- a declared content hash,
|
||
|
|
- a small package that consumes the fetched file, and
|
||
|
|
- a check that verifies the tarball hash and contents.
|
||
|
|
|
||
|
|
Useful commands:
|
||
|
|
|
||
|
|
```bash
|
||
|
|
nix build
|
||
|
|
./result/bin/show-fetched-hello-source
|
||
|
|
|
||
|
|
nix run
|
||
|
|
nix flake check
|
||
|
|
```
|