README: rewording
This commit is contained in:
parent
c6258630dd
commit
ec0ce68101
29
README.md
29
README.md
|
@ -6,18 +6,35 @@ The script relies on internal Nixpkgs tools that will download the sources in th
|
|||
|
||||
If you run it multiple times, nothing more will be downloaded but it takes a bit of time to ensure each file is in the store.
|
||||
|
||||
# how to use
|
||||
# Avoiding garbage collector
|
||||
|
||||
To download sources required to build `git` and `kakoune`:
|
||||
Files will be downloaded into a newly created directory `distfiles` relative to your current location. Each source file will be linked in this directory from the store to prevent the files to be removed by the garbage collector.
|
||||
|
||||
# How to use
|
||||
|
||||
To download sources required to build `git`:
|
||||
```
|
||||
./run.sh git kakoune
|
||||
./run.sh git kakoune | ./mirror.pl
|
||||
```
|
||||
|
||||
If you want to use a different nixpkgs version than the one in your system:
|
||||
To download sources required to build `git` and `mercurial`:
|
||||
```
|
||||
./run.sh -f ~/path/to/nixpkgs/ git kakoune
|
||||
./run.sh git mercurial | ./mirror.pl
|
||||
```
|
||||
|
||||
To download sources required to build `git` using a different nixpkgs:
|
||||
```
|
||||
./run.sh -f /path/to/nixpkgs/ git | ./mirror.pl
|
||||
```
|
||||
|
||||
# Internal details
|
||||
|
||||
The command `run.sh` is printing a JSON file on stdout containing each source information such as url, checksum value, checksum type, filename.
|
||||
|
||||
The command `mirror.pl` is reads a JSON structure on the standard input and will loop over each item.
|
||||
|
||||
By using this design, you can craft JSON files with custom scripts, and feed them to `mirror.pl`.
|
||||
|
||||
# BUGS
|
||||
|
||||
This requires https://github.com/NixOS/nixpkgs/pull/188626 to be merged
|
||||
This requires https://github.com/NixOS/nixpkgs/pull/188626 to be merged to include patches files.
|
||||
|
|
Loading…
Reference in New Issue