From 7a6f7f034244621ba8454647938a0371e6ebad2e Mon Sep 17 00:00:00 2001 From: adisbladis Date: Thu, 1 Oct 2020 15:57:14 +0200 Subject: [PATCH] mk-poetry-dep: Add pep508 evaluation to dependency selection Poetry 1.1.0 changed the marker format in https://github.com/python-poetry/poetry/pull/2361 --- default.nix | 2 +- mk-poetry-dep.nix | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/default.nix b/default.nix index 1321cb6d3..a967e9f4e 100644 --- a/default.nix +++ b/default.nix @@ -106,7 +106,7 @@ lib.makeScope pkgs.newScope (self: { in { mkPoetryDep = self.callPackage ./mk-poetry-dep.nix { - inherit pkgs lib python poetryLib; + inherit pkgs lib python poetryLib evalPep508; }; poetry = if __isBootstrap then null else poetryPkg; # The canonical name is setuptools-scm diff --git a/mk-poetry-dep.nix b/mk-poetry-dep.nix index 557ff754a..8d73fad2e 100644 --- a/mk-poetry-dep.nix +++ b/mk-poetry-dep.nix @@ -4,6 +4,7 @@ , python , buildPythonPackage , poetryLib +, evalPep508 }: { name , version @@ -126,8 +127,9 @@ pythonPackages.callPackage n: v: let constraints = v.python or ""; + pep508Markers = v.markers or ""; in - compat constraints + compat constraints && evalPep508 pep508Markers ) dependencies );