mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-05 09:11:39 -05:00
README: recommend overriding env over mkShell
Resolve #186. The current documentation shows how to include dev-dependencies in environment *or* add external dependencies to the environment, but I suspect in the vast majority of cases both will be desired.
This commit is contained in:
parent
2df09faeff
commit
cd659414ca
1 changed files with 4 additions and 5 deletions
|
@ -110,7 +110,7 @@ in myAppEnv.env
|
|||
```
|
||||
|
||||
#### Example shell.nix with external dependencies
|
||||
For a shell environment including external dependencies, pass the app environment and dependency packages (for example, `pkgs.hello`) as build inputs to `pkgs.mkShell`.
|
||||
For a shell environment including external dependencies, override the `env` to add dependency packages (for example, `pkgs.hello`) as build inputs.
|
||||
```nix
|
||||
{ pkgs ? import <nixpkgs> {} }:
|
||||
let
|
||||
|
@ -120,10 +120,9 @@ let
|
|||
my-app = ./src;
|
||||
};
|
||||
};
|
||||
in
|
||||
pkgs.mkShell {
|
||||
buildInputs = [ myAppEnv pkgs.hello ];
|
||||
}
|
||||
in myAppEnv.env.overrideAttrs (oldAttrs: {
|
||||
buildInputs = [ pkgs.hello ]:
|
||||
})
|
||||
```
|
||||
|
||||
### mkPoetryPackages
|
||||
|
|
Loading…
Add table
Reference in a new issue