1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 poetry-core, 6 toml, 7 pytest-mock, 8 pytestCheckHook, 9 pythonOlder, 10}: 11 12buildPythonPackage rec { 13 pname = "single-source"; 14 version = "0.4.0"; 15 pyproject = true; 16 17 disabled = pythonOlder "3.8"; 18 19 src = fetchFromGitHub { 20 owner = "rabbit72"; 21 repo = "single-source"; 22 tag = "v${version}"; 23 hash = "sha256-4l9ochlscQoWJVkYN8Iq2DsiU7qoOf7nUFYgBOebK/g="; 24 }; 25 26 build-system = [ poetry-core ]; 27 28 nativeCheckInputs = [ 29 toml 30 pytest-mock 31 pytestCheckHook 32 ]; 33 34 pythonImportsCheck = [ "single_source" ]; 35 36 meta = { 37 description = "Access to the project version in Python code for PEP 621-style projects"; 38 homepage = "https://github.com/rabbit72/single-source"; 39 changelog = "https://github.com/rabbit72/single-source/releases/tag/v${version}"; 40 license = lib.licenses.mit; 41 maintainers = with lib.maintainers; [ nickcao ]; 42 }; 43}