nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fastnumbers,
5 fetchPypi,
6 glibcLocales,
7 hypothesis,
8 pyicu,
9 pytest-mock,
10 pytestCheckHook,
11}:
12
13buildPythonPackage rec {
14 pname = "natsort";
15 version = "8.4.0";
16 format = "setuptools";
17
18 src = fetchPypi {
19 inherit pname version;
20 hash = "sha256-RTEsSg5VB1k9oZPe3QSrsUaSU7YB7K9jRFrYDwoepYE=";
21 };
22
23 propagatedBuildInputs = [
24 fastnumbers
25 pyicu
26 ];
27
28 nativeCheckInputs = [
29 glibcLocales
30 hypothesis
31 pytest-mock
32 pytestCheckHook
33 ];
34
35 disabledTests = [
36 # timing sensitive test
37 # hypothesis.errors.DeadlineExceeded: Test took 524.23ms, which exceeds the deadline of 200.00ms
38 "test_string_component_transform_factory"
39 ];
40
41 pythonImportsCheck = [ "natsort" ];
42
43 meta = {
44 description = "Natural sorting for Python";
45 mainProgram = "natsort";
46 homepage = "https://github.com/SethMMorton/natsort";
47 changelog = "https://github.com/SethMMorton/natsort/blob/${version}/CHANGELOG.md";
48 license = lib.licenses.mit;
49 maintainers = [ ];
50 };
51}