mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-03-14 08:26:37 +01:00
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
52 lines
1.1 KiB
Nix
52 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
attrs,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
pytestCheckHook,
|
|
pythonAtLeast,
|
|
typish,
|
|
tzdata,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "jsons";
|
|
version = "1.6.3";
|
|
format = "setuptools";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ramonhagenaars";
|
|
repo = "jsons";
|
|
tag = "v${version}";
|
|
hash = "sha256-7OIByHvsqhKFOkb1q2kuxmbkkleryavYgp/T4U5hvGk=";
|
|
};
|
|
|
|
propagatedBuildInputs = [ typish ];
|
|
|
|
nativeCheckInputs = [
|
|
attrs
|
|
pytestCheckHook
|
|
tzdata
|
|
];
|
|
|
|
disabledTestPaths = [
|
|
# These tests are based on timings, which fail
|
|
# on slow or overloaded machines.
|
|
"tests/test_performance.py"
|
|
];
|
|
|
|
disabledTests = lib.optionals (pythonAtLeast "3.11") [
|
|
# https://github.com/ramonhagenaars/jsons/issues/187
|
|
"test_dump_load_parameterized_collections"
|
|
];
|
|
|
|
pythonImportsCheck = [ "jsons" ];
|
|
|
|
meta = {
|
|
description = "Turn Python objects into dicts or json strings and back";
|
|
homepage = "https://github.com/ramonhagenaars/jsons";
|
|
changelog = "https://github.com/ramonhagenaars/jsons/releases/tag/v${version}";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ fmoda3 ];
|
|
};
|
|
}
|