mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2025-01-04 09:56:13 +03:00
poetry2nix: 1.6.1 -> 1.7.0
This commit is contained in:
parent
bee6c1a445
commit
dda52a4571
@ -8,11 +8,16 @@ import json
|
||||
import sys
|
||||
|
||||
|
||||
argparser = argparse.ArgumentParser(description="Generate overrides for git hashes",)
|
||||
argparser.add_argument(
|
||||
argparser = argparse.ArgumentParser(description="Poetry2nix CLI")
|
||||
|
||||
subparsers = argparser.add_subparsers(dest="subcommand")
|
||||
subparsers.required = True
|
||||
|
||||
parser_lock = subparsers.add_parser("lock", help="Generate overrides for git hashes",)
|
||||
parser_lock.add_argument(
|
||||
"--lock", default="poetry.lock", help="Path to input poetry.lock",
|
||||
)
|
||||
argparser.add_argument(
|
||||
parser_lock.add_argument(
|
||||
"--out", default="poetry-git-overlay.nix", help="Output file",
|
||||
)
|
||||
|
||||
@ -92,7 +97,7 @@ if __name__ == "__main__":
|
||||
|
||||
expr = "\n".join(lines)
|
||||
|
||||
with open(args.out, "w") as f:
|
||||
f.write(expr)
|
||||
with open(args.out, "w") as fout:
|
||||
fout.write(expr)
|
||||
|
||||
print(f"Wrote {args.out}")
|
||||
|
@ -7,7 +7,7 @@ let
|
||||
inherit (poetryLib) isCompatible readTOML;
|
||||
|
||||
# Poetry2nix version
|
||||
version = "1.6.1";
|
||||
version = "1.7.0";
|
||||
|
||||
/* The default list of poetry2nix override overlays */
|
||||
defaultPoetryOverrides = (import ./overrides.nix { inherit pkgs lib; });
|
||||
@ -79,6 +79,7 @@ let
|
||||
source = pkgMeta.source or null;
|
||||
files = lockFiles.${name};
|
||||
pythonPackages = self;
|
||||
sourceSpec = pyProject.tool.poetry.dependencies.${name} or pyProject.tool.poetry.dev-dependencies.${name};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
@ -14,6 +14,7 @@
|
||||
, pythonPackages
|
||||
, python-versions
|
||||
, pwd
|
||||
, sourceSpec
|
||||
, supportedExtensions ? lib.importJSON ./extensions.json
|
||||
, ...
|
||||
}:
|
||||
@ -147,6 +148,7 @@ pythonPackages.callPackage (
|
||||
builtins.fetchGit {
|
||||
inherit (source) url;
|
||||
rev = source.reference;
|
||||
ref = sourceSpec.branch or sourceSpec.rev or sourceSpec.tag or "HEAD";
|
||||
}
|
||||
) else if isLocal then (poetryLib.cleanPythonSources { src = localDepPath; }) else fetchFromPypi {
|
||||
pname = name;
|
||||
|
@ -104,6 +104,12 @@ self: super:
|
||||
}
|
||||
);
|
||||
|
||||
fastparquet = super.fastparquet.overrideAttrs (
|
||||
old: {
|
||||
buildInputs = old.buildInputs ++ [ self.pytest-runner ];
|
||||
}
|
||||
);
|
||||
|
||||
grandalf = super.grandalf.overrideAttrs (
|
||||
old: {
|
||||
buildInputs = old.buildInputs ++ [ self.pytest-runner ];
|
||||
|
Loading…
Reference in New Issue
Block a user