1{ lib 2, stdenv 3, buildPythonPackage 4, fetchFromGitHub 5, fetchpatch 6, pythonOlder 7, build 8, git 9, pytest-mock 10, pytestCheckHook 11, setuptools 12, tomli-w 13, virtualenv 14}: 15 16buildPythonPackage rec { 17 pname = "poetry-core"; 18 version = "1.7.0"; 19 format = "pyproject"; 20 21 disabled = pythonOlder "3.8"; 22 23 src = fetchFromGitHub { 24 owner = "python-poetry"; 25 repo = pname; 26 rev = version; 27 hash = "sha256-OfY2zc+5CgOrgbiPVnvMdT4h1S7Aek8S7iThl6azmsk="; 28 }; 29 30 nativeCheckInputs = [ 31 build 32 git 33 pytest-mock 34 pytestCheckHook 35 setuptools 36 tomli-w 37 virtualenv 38 ]; 39 40 # Requires git history to work correctly 41 disabledTests = [ 42 "default_with_excluded_data" 43 "default_src_with_excluded_data" 44 ]; 45 46 pythonImportsCheck = [ 47 "poetry.core" 48 ]; 49 50 # Allow for package to use pep420's native namespaces 51 pythonNamespaces = [ 52 "poetry" 53 ]; 54 55 env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-int-conversion"; 56 57 meta = with lib; { 58 changelog = "https://github.com/python-poetry/poetry-core/blob/${src.rev}/CHANGELOG.md"; 59 description = "Core utilities for Poetry"; 60 homepage = "https://github.com/python-poetry/poetry-core/"; 61 license = licenses.mit; 62 maintainers = with maintainers; [ jonringer ]; 63 }; 64}