Merge pull request #518 from nix-community/no-isbootstrap

Remove __isBootstrap hack
This commit is contained in:
adisbladis 2022-01-19 02:27:55 +12:00 committed by GitHub
commit ca33d25e5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 11 deletions

View file

@ -121,7 +121,6 @@ lib.makeScope pkgs.newScope (self: {
, preferWheels ? false , preferWheels ? false
# Example: { my-app = ./src; } # Example: { my-app = ./src; }
, editablePackageSources ? { } , editablePackageSources ? { }
, __isBootstrap ? false # Hack: Always add Poetry as a build input unless bootstrapping
, pyProject ? readTOML pyproject , pyProject ? readTOML pyproject
}@attrs: }@attrs:
let let
@ -180,7 +179,6 @@ lib.makeScope pkgs.newScope (self: {
value = self.mkPoetryDep ( value = self.mkPoetryDep (
pkgMeta // { pkgMeta // {
inherit pwd preferWheels; inherit pwd preferWheels;
inherit __isBootstrap;
source = pkgMeta.source or null; source = pkgMeta.source or null;
files = lockFiles.${name}; files = lockFiles.${name};
pythonPackages = self; pythonPackages = self;
@ -210,9 +208,9 @@ lib.makeScope pkgs.newScope (self: {
inherit pkgs lib python poetryLib evalPep508; inherit pkgs lib python poetryLib evalPep508;
}; };
# Use poetry-core from the poetry build (pep517/518 build-system) # # Use poetry-core from the poetry build (pep517/518 build-system)
poetry-core = if __isBootstrap then null else poetryPkg.passthru.python.pkgs.poetry-core; poetry-core = poetryPkg.passthru.python.pkgs.poetry-core;
poetry = if __isBootstrap then null else poetryPkg; poetry = poetryPkg;
__toPluginAble = toPluginAble self; __toPluginAble = toPluginAble self;
@ -329,12 +327,11 @@ lib.makeScope pkgs.newScope (self: {
, python ? pkgs.python3 , python ? pkgs.python3
, pwd ? projectDir , pwd ? projectDir
, preferWheels ? false , preferWheels ? false
, __isBootstrap ? false # Hack: Always add Poetry as a build input unless bootstrapping
, ... , ...
}@attrs: }@attrs:
let let
poetryPython = self.mkPoetryPackages { poetryPython = self.mkPoetryPackages {
inherit pyproject poetrylock overrides python pwd preferWheels __isBootstrap; inherit pyproject poetrylock overrides python pwd preferWheels;
}; };
py = poetryPython.python; py = poetryPython.python;

View file

@ -17,7 +17,6 @@
, sourceSpec , sourceSpec
, supportedExtensions ? lib.importJSON ./extensions.json , supportedExtensions ? lib.importJSON ./extensions.json
, preferWheels ? false , preferWheels ? false
, __isBootstrap ? false # Hack: Always add Poetry as a build input unless bootstrapping
, ... , ...
}: }:

View file

@ -14,9 +14,6 @@ poetry2nix.mkPoetryApplication {
inherit projectDir pyproject poetrylock; inherit projectDir pyproject poetrylock;
# Don't include poetry in inputs
__isBootstrap = true;
src = fetchFromGitHub (lib.importJSON ./src.json); src = fetchFromGitHub (lib.importJSON ./src.json);
# "Vendor" dependencies (for build-system support) # "Vendor" dependencies (for build-system support)