mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-05 09:11:39 -05:00
Add Nixdoc compatible docstrings
This commit is contained in:
parent
927ae249ef
commit
4c24b3d49e
1 changed files with 8 additions and 8 deletions
16
default.nix
16
default.nix
|
@ -7,6 +7,7 @@
|
||||||
let
|
let
|
||||||
inherit (poetryLib) isCompatible readTOML;
|
inherit (poetryLib) isCompatible readTOML;
|
||||||
|
|
||||||
|
/* The default list of poetry2nix override overlays */
|
||||||
defaultPoetryOverrides = [ (import ./overrides.nix { inherit pkgs; }) ];
|
defaultPoetryOverrides = [ (import ./overrides.nix { inherit pkgs; }) ];
|
||||||
|
|
||||||
mkEvalPep508 = import ./pep508.nix {
|
mkEvalPep508 = import ./pep508.nix {
|
||||||
|
@ -114,9 +115,11 @@ let
|
||||||
poetryPackages = map (pkg: py.pkgs.${pkg.name}) compatible;
|
poetryPackages = map (pkg: py.pkgs.${pkg.name}) compatible;
|
||||||
};
|
};
|
||||||
|
|
||||||
#
|
/* Returns a package with a python interpreter and all packages specified in the poetry.lock lock file.
|
||||||
# Creates a python environment with the python packages from the specified lockfile
|
|
||||||
#
|
Example:
|
||||||
|
poetry2nix.mkPoetryEnv { poetrylock = ./poetry.lock; python = python3; }
|
||||||
|
*/
|
||||||
mkPoetryEnv =
|
mkPoetryEnv =
|
||||||
{ poetrylock
|
{ poetrylock
|
||||||
, overrides ? defaultPoetryOverrides
|
, overrides ? defaultPoetryOverrides
|
||||||
|
@ -134,10 +137,7 @@ let
|
||||||
in
|
in
|
||||||
py.python.withPackages (_: py.poetryPackages);
|
py.python.withPackages (_: py.poetryPackages);
|
||||||
|
|
||||||
|
/* Creates a Python application from pyproject.toml and poetry.lock */
|
||||||
#
|
|
||||||
# Creates a python application
|
|
||||||
#
|
|
||||||
mkPoetryApplication =
|
mkPoetryApplication =
|
||||||
{ src
|
{ src
|
||||||
, pyproject
|
, pyproject
|
||||||
|
@ -208,10 +208,10 @@ let
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/* Poetry2nix CLI used to supplement SHA-256 hashes for git dependencies */
|
||||||
cli = import ./cli.nix { inherit pkgs lib; };
|
cli = import ./cli.nix { inherit pkgs lib; };
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
inherit mkPoetryEnv mkPoetryApplication defaultPoetryOverrides cli;
|
inherit mkPoetryEnv mkPoetryApplication defaultPoetryOverrides cli;
|
||||||
mkPoetryPackage = attrs: builtins.trace "mkPoetryPackage is deprecated. Use mkPoetryApplication instead." (mkPoetryApplication attrs);
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue