mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-05 17:21: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
|
#### 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
|
```nix
|
||||||
{ pkgs ? import <nixpkgs> {} }:
|
{ pkgs ? import <nixpkgs> {} }:
|
||||||
let
|
let
|
||||||
|
@ -120,10 +120,9 @@ let
|
||||||
my-app = ./src;
|
my-app = ./src;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in myAppEnv.env.overrideAttrs (oldAttrs: {
|
||||||
pkgs.mkShell {
|
buildInputs = [ pkgs.hello ]:
|
||||||
buildInputs = [ myAppEnv pkgs.hello ];
|
})
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### mkPoetryPackages
|
### mkPoetryPackages
|
||||||
|
|
Loading…
Add table
Reference in a new issue