2022-02-10 20:34:41 +00:00
|
|
|
{ lib, python3, fetchFromGitHub, fetchurl }:
|
|
|
|
let
|
|
|
|
python = python3.override {
|
|
|
|
# override resolvelib due to
|
|
|
|
# 1. pdm requiring a later version of resolvelib
|
|
|
|
# 2. Ansible being packaged as a library
|
|
|
|
# 3. Ansible being unable to upgrade to a later version of resolvelib
|
|
|
|
# see here for more details: https://github.com/NixOS/nixpkgs/pull/155380/files#r786255738
|
|
|
|
packageOverrides = self: super: {
|
|
|
|
resolvelib = super.resolvelib.overridePythonAttrs (attrs: rec {
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "0.9.0";
|
2022-02-10 20:34:41 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sarugaku";
|
|
|
|
repo = "resolvelib";
|
2023-01-20 10:41:00 +00:00
|
|
|
rev = "/refs/tags/${version}";
|
|
|
|
hash = "sha256-xzu8sMNMihJ80vezMdGkOT5Etx08qy3T/TkEn5EAY48=";
|
2022-02-10 20:34:41 +00:00
|
|
|
};
|
|
|
|
});
|
|
|
|
};
|
|
|
|
self = python;
|
|
|
|
};
|
|
|
|
in
|
|
|
|
|
|
|
|
with python.pkgs;
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "pdm";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "2.3.4";
|
2022-02-10 20:34:41 +00:00
|
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-01-20 10:41:00 +00:00
|
|
|
hash = "sha256-zaSNM5Ey4oI2MtUPYBHG0PCMgJdasVatwkjaRBrT1RQ=";
|
2022-02-10 20:34:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
blinker
|
2022-09-30 11:47:45 +00:00
|
|
|
cachecontrol
|
|
|
|
certifi
|
2022-04-15 01:41:22 +00:00
|
|
|
findpython
|
2022-02-10 20:34:41 +00:00
|
|
|
installer
|
|
|
|
packaging
|
|
|
|
pdm-pep517
|
|
|
|
pep517
|
|
|
|
pip
|
|
|
|
platformdirs
|
2023-01-20 10:41:00 +00:00
|
|
|
pyproject-hooks
|
2022-02-10 20:34:41 +00:00
|
|
|
python-dotenv
|
2022-09-30 11:47:45 +00:00
|
|
|
requests-toolbelt
|
2022-02-10 20:34:41 +00:00
|
|
|
resolvelib
|
2022-09-30 11:47:45 +00:00
|
|
|
rich
|
2022-02-10 20:34:41 +00:00
|
|
|
shellingham
|
|
|
|
tomli
|
|
|
|
tomlkit
|
2022-09-30 11:47:45 +00:00
|
|
|
unearth
|
|
|
|
virtualenv
|
|
|
|
]
|
|
|
|
++ cachecontrol.optional-dependencies.filecache
|
|
|
|
++ lib.optionals (pythonOlder "3.8") [
|
2022-02-10 20:34:41 +00:00
|
|
|
importlib-metadata
|
|
|
|
typing-extensions
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-02-10 20:34:41 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pytest-mock
|
|
|
|
pytest-xdist
|
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"-m 'not network'"
|
|
|
|
];
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$TMPDIR
|
|
|
|
'';
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
disabledTests = [
|
2022-09-30 11:47:45 +00:00
|
|
|
# fails to locate setuptools (maybe upstream bug)
|
|
|
|
"test_convert_setup_py_project"
|
2022-02-10 20:34:41 +00:00
|
|
|
# pythonfinder isn't aware of nix's python infrastructure
|
|
|
|
"test_use_wrapper_python"
|
2022-09-30 11:47:45 +00:00
|
|
|
"test_use_invalid_wrapper_python"
|
2022-02-10 20:34:41 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://pdm.fming.dev";
|
|
|
|
description = "A modern Python package manager with PEP 582 support";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ cpcloud ];
|
|
|
|
};
|
|
|
|
}
|