mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-05 17:21:39 -05:00
commit
3df9d21b3b
2 changed files with 9 additions and 7 deletions
|
@ -148,7 +148,7 @@ Creates a Python application using the Python interpreter specified based on the
|
|||
- **python**: The Python interpreter to use (_default:_ `pkgs.python3`).
|
||||
- **preferWheels** : Use wheels rather than sdist as much as possible (_default_: `false`).
|
||||
- **groups**: Which Poetry 1.2.0+ dependency groups to install (_default_: `[ ]`).
|
||||
- **checkGroups**: Which Poetry 1.2.0+ dependency groups to run unit tests (_default_: `[ "dev" ]`).
|
||||
- **checkGroups**: Which Poetry 1.2.0+ dependency groups to install (independently of **groups**) to run unit tests (_default_: `[ "dev" ]`).
|
||||
- **extras**: Which Poetry `extras` to install (_default_: `[ "*" ]`, all extras).
|
||||
|
||||
Other attributes are passed through to `buildPythonApplication`.
|
||||
|
@ -206,7 +206,7 @@ Creates an environment that provides a Python interpreter along with all depende
|
|||
- **extraPackages**: A function taking a Python package set and returning a list of extra packages to include in the environment. This is intended for packages deliberately not added to `pyproject.toml` that you still want to include. An example of such a package may be `pip`. (_default:_ `(ps: [ ])`).
|
||||
- **preferWheels** : Use wheels rather than sdist as much as possible (_default_: `false`).
|
||||
- **groups**: Which Poetry 1.2.0+ dependency groups to install (_default_: `[ "dev" ]`).
|
||||
- **checkGroups**: Which Poetry 1.2.0+ dependency groups to run unit tests (_default_: `[ "dev" ]`).
|
||||
- **checkGroups**: Which Poetry 1.2.0+ dependency groups to install (independently of **groups**) to run unit tests (_default_: `[ "dev" ]`).
|
||||
- **extras**: Which Poetry `extras` to install (_default_: `[ "*" ]`, all extras).
|
||||
|
||||
#### Example
|
||||
|
@ -278,7 +278,7 @@ Creates an attribute set of the shape `{ python, poetryPackages, pyProject, poet
|
|||
- **editablePackageSources**: A mapping from package name to source directory, these will be installed in editable mode (_default:_ `{}`).
|
||||
- **preferWheels** : Use wheels rather than sdist as much as possible (_default_: `false`).
|
||||
- **groups**: Which Poetry 1.2.0+ dependency groups to install (_default_: `[ ]`).
|
||||
- **checkGroups**: Which Poetry 1.2.0+ dependency groups to run unit tests (_default_: `[ "dev" ]`).
|
||||
- **checkGroups**: Which Poetry 1.2.0+ dependency groups to install (independently of **groups**) to run unit tests (_default_: `[ "dev" ]`).
|
||||
- **extras**: Which Poetry `extras` to install (_default_: `[ "*" ]`, all extras).
|
||||
|
||||
#### Example
|
||||
|
|
10
default.nix
10
default.nix
|
@ -24,13 +24,15 @@ let
|
|||
knownBuildSystems = lib.importJSON ./known-build-systems.json;
|
||||
nixpkgsBuildSystems = lib.subtractLists [ "poetry" "poetry-core" ] knownBuildSystems;
|
||||
|
||||
checkGroupsDefault = [ "dev" ];
|
||||
|
||||
mkInputAttrs =
|
||||
{ py
|
||||
, pyProject
|
||||
, attrs
|
||||
, includeBuildSystem ? true
|
||||
, groups ? [ ]
|
||||
, checkGroups ? [ "dev" ]
|
||||
, checkGroups ? checkGroupsDefault
|
||||
, extras ? [ "*" ] # * means all extras, otherwise include the dependencies for a given extra
|
||||
}:
|
||||
let
|
||||
|
@ -144,7 +146,7 @@ lib.makeScope pkgs.newScope (self: {
|
|||
, editablePackageSources ? { }
|
||||
, pyProject ? readTOML pyproject
|
||||
, groups ? [ ]
|
||||
, checkGroups ? [ "dev" ]
|
||||
, checkGroups ? checkGroupsDefault
|
||||
, extras ? [ "*" ]
|
||||
}:
|
||||
let
|
||||
|
@ -311,7 +313,7 @@ lib.makeScope pkgs.newScope (self: {
|
|||
, editablePackageSources ? { }
|
||||
, extraPackages ? _ps: [ ]
|
||||
, groups ? [ "dev" ]
|
||||
, checkGroups ? [ "dev" ]
|
||||
, checkGroups ? checkGroupsDefault
|
||||
, extras ? [ "*" ]
|
||||
}:
|
||||
let
|
||||
|
@ -377,7 +379,7 @@ lib.makeScope pkgs.newScope (self: {
|
|||
, pwd ? projectDir
|
||||
, preferWheels ? false
|
||||
, groups ? [ ]
|
||||
, checkGroups ? [ "dev" ]
|
||||
, checkGroups ? checkGroupsDefault
|
||||
, extras ? [ "*" ]
|
||||
, ...
|
||||
}@attrs:
|
||||
|
|
Loading…
Add table
Reference in a new issue