1a04744f74
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:
pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
for f in $(find -name '*.nix'); do
grep -q "$pattern" "$f" || continue
sed -i "/$pattern/d" "$f"
if [ $(grep -c pythonOlder "$f") == 1 ]; then
sed -i '/^\s*pythonOlder,\s*$/d' "$f"
fi
nixfmt "$f"
done
67 lines
1.2 KiB
Nix
67 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
dateparser,
|
|
fetchFromGitHub,
|
|
freezegun,
|
|
humanize,
|
|
pendulum,
|
|
pytest-mock,
|
|
pytestCheckHook,
|
|
pytz,
|
|
setuptools,
|
|
snaptime,
|
|
tzlocal,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "maya";
|
|
version = "0.6.1";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "timofurrer";
|
|
repo = "maya";
|
|
tag = "v${version}";
|
|
hash = "sha256-4fUyUqVQk/AcQL3xMnU1cQlF5yiD/N9NPAsUPuDTTNY=";
|
|
};
|
|
|
|
postPatch = ''
|
|
# function was made private in humanize
|
|
substituteInPlace maya/core.py \
|
|
--replace-fail "humanize.time.abs_timedelta" "humanize.time._abs_timedelta"
|
|
'';
|
|
|
|
nativeBuildInputs = [ setuptools ];
|
|
|
|
propagatedBuildInputs = [
|
|
dateparser
|
|
humanize
|
|
pendulum
|
|
pytz
|
|
snaptime
|
|
tzlocal
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
freezegun
|
|
pytest-mock
|
|
pytestCheckHook
|
|
];
|
|
|
|
pythonImportsCheck = [ "maya" ];
|
|
|
|
disabledTests = [
|
|
# https://github.com/timofurrer/maya/issues/202
|
|
"test_parse_iso8601"
|
|
];
|
|
|
|
meta = {
|
|
description = "Datetimes for Humans";
|
|
homepage = "https://github.com/timofurrer/maya";
|
|
changelog = "https://github.com/timofurrer/maya/releases/tag/v${version}";
|
|
license = lib.licenses.mit;
|
|
maintainers = [ ];
|
|
};
|
|
}
|