1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonOlder, 6 pdm-backend, 7 tomli, 8 build, 9 hatchling, 10 pkginfo, 11 pytestCheckHook, 12}: 13 14buildPythonPackage rec { 15 pname = "pdm-build-locked"; 16 version = "0.3.5"; 17 pyproject = true; 18 19 src = fetchFromGitHub { 20 owner = "pdm-project"; 21 repo = "pdm-build-locked"; 22 tag = version; 23 hash = "sha256-TfQYWpeE+rN1GR84W89LFAs6Bs68E9FYQm0b6kPZH2E="; 24 }; 25 26 postPatch = '' 27 substituteInPlace tests/conftest.py \ 28 --replace-fail '"pdm.pytest"' "" 29 sed -i "/addopts/d" pyproject.toml 30 ''; 31 32 build-system = [ pdm-backend ]; 33 34 dependencies = lib.optionals (pythonOlder "3.11") [ tomli ]; 35 36 pythonImportsCheck = [ "pdm_build_locked" ]; 37 38 nativeCheckInputs = [ 39 build 40 hatchling 41 pkginfo 42 pytestCheckHook 43 ]; 44 45 disabledTestPaths = [ 46 # circular import of pdm 47 "tests/unit/test_build_command.py" 48 ]; 49 50 meta = { 51 description = "Pdm-build-locked is a pdm plugin to publish locked dependencies as optional-dependencies"; 52 homepage = "https://github.com/pdm-project/pdm-build-locked"; 53 changelog = "https://github.com/pdm-project/pdm-build-locked/releases/tag/${src.tag}"; 54 license = lib.licenses.mit; 55 maintainers = with lib.maintainers; [ natsukium ]; 56 }; 57}