1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchFromGitHub,
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.9.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-vvwKbzGlvv2LTbXfJxQVM3nUXFGntgJxsku6cbRxCzw=";
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 = [ "poetry.core" ];
47
48 # Allow for package to use pep420's native namespaces
49 pythonNamespaces = [ "poetry" ];
50
51 env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-int-conversion";
52
53 meta = with lib; {
54 changelog = "https://github.com/python-poetry/poetry-core/blob/${src.rev}/CHANGELOG.md";
55 description = "Core utilities for Poetry";
56 homepage = "https://github.com/python-poetry/poetry-core/";
57 license = licenses.mit;
58 maintainers = with maintainers; [ jonringer ];
59 };
60}