mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-04 16:51:40 -05:00
Add composable defaults to README
This commit is contained in:
parent
f648dd5099
commit
e195d917f9
1 changed files with 23 additions and 0 deletions
23
README.md
23
README.md
|
@ -154,6 +154,29 @@ poetry2nix.cleanPythonSources {
|
|||
}
|
||||
```
|
||||
|
||||
### Creating a custom Poetry2nix instance
|
||||
Sometimes when it can be convenient to create a custom instance of `poetry2nix` with a different set of default overrides.
|
||||
|
||||
#### Example
|
||||
```nix
|
||||
let
|
||||
# self & super refers to poetry2nix
|
||||
p2nix = poetry2nix.overrideScope' (self: super: {
|
||||
|
||||
# pyself & pysuper refers to python packages
|
||||
defaultPoetryOverrides = super.defaultPoetryOverrides.extend (pyself: pysuper: {
|
||||
|
||||
my-custom-pkg = super.my-custom-pkg.overridePythonAttrs (oldAttrs: { });
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
in
|
||||
p2nix.mkPoetryApplication {
|
||||
projectDir = ./.;
|
||||
}
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue