mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-06 09:41:39 -05:00
Merge pull request #918 from hercules-ci/set-package-pos-to-lock-file
feat: Show lock location in package errors
This commit is contained in:
commit
388e3ffed8
2 changed files with 5 additions and 0 deletions
|
@ -137,6 +137,7 @@ lib.makeScope pkgs.newScope (self: {
|
|||
{ projectDir ? null
|
||||
, pyproject ? projectDir + "/pyproject.toml"
|
||||
, poetrylock ? projectDir + "/poetry.lock"
|
||||
, poetrylockPos ? { file = toString poetrylock; line = 0; column = 0; }
|
||||
, overrides ? self.defaultPoetryOverrides
|
||||
, python ? pkgs.python3
|
||||
, pwd ? projectDir
|
||||
|
@ -207,6 +208,7 @@ lib.makeScope pkgs.newScope (self: {
|
|||
value = self.mkPoetryDep (
|
||||
pkgMeta // {
|
||||
inherit pwd preferWheels;
|
||||
pos = poetrylockPos;
|
||||
source = pkgMeta.source or null;
|
||||
# Default to files from lock file version 2.0 and fall back to 1.1
|
||||
files = pkgMeta.files or lockFiles.${normalizedName};
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
}:
|
||||
{ name
|
||||
, version
|
||||
, pos ? __curPos
|
||||
, files
|
||||
, source
|
||||
, dependencies ? { }
|
||||
|
@ -147,6 +148,8 @@ pythonPackages.callPackage
|
|||
in
|
||||
builtins.map (n: pythonPackages.${normalizePackageName n}) depAttrs;
|
||||
|
||||
inherit pos;
|
||||
|
||||
meta = {
|
||||
broken = ! isCompatible (poetryLib.getPythonVersion python) python-versions;
|
||||
license = [ ];
|
||||
|
|
Loading…
Add table
Reference in a new issue