mirror of
https://github.com/nmattia/niv.git
synced 2024-09-19 11:27:40 +03:00
Add subpath handling to FAQ
This commit is contained in:
parent
0d30bfd7b0
commit
c0a61e6283
13
README.md
13
README.md
@ -417,3 +417,16 @@ netrc-file = /PATH/TO/.netrc
|
||||
GITHUB_TOKEN=$YOUR_GITHUB_TOKEN niv add ...
|
||||
```
|
||||
|
||||
### How do I import a subpath of a source?
|
||||
|
||||
In order to use the directory `dir` of a `my-package`, use the following
|
||||
pattern:
|
||||
|
||||
``` nix
|
||||
let
|
||||
sources = import ./nix/sources.nix;
|
||||
in sources.my-package + "/dir"
|
||||
```
|
||||
|
||||
where `sources.my-package` is the root directory, and `+ "/dir"` appends the
|
||||
subdirectory.
|
||||
|
@ -294,3 +294,16 @@ netrc-file = /PATH/TO/.netrc
|
||||
GITHUB_TOKEN=$YOUR_GITHUB_TOKEN niv add ...
|
||||
```
|
||||
|
||||
### How do I import a subpath of a source?
|
||||
|
||||
In order to use the directory `dir` of a `my-package`, use the following
|
||||
pattern:
|
||||
|
||||
``` nix
|
||||
let
|
||||
sources = import ./nix/sources.nix;
|
||||
in sources.my-package + "/dir"
|
||||
```
|
||||
|
||||
where `sources.my-package` is the root directory, and `+ "/dir"` appends the
|
||||
subdirectory.
|
||||
|
Loading…
Reference in New Issue
Block a user