about summary refs log tree commit diff
path: root/pkgs/development/python-modules/parso/default.nix
blob: a68f535d29db19c273c029dcd57eeb82982c7855 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{ lib
, buildPythonPackage
, fetchPypi
, fetchpatch
, pythonOlder
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "parso";
  version = "0.8.1";
  disabled = pythonOlder "3.6";

  src = fetchPypi {
    inherit pname version;
    sha256 = "8519430ad07087d4c997fda3a7918f7cfa27cb58972a8c89c2a0295a1c940e9e";
  };

  patches = [
    # Fix the flaky test due to slow moving time on Apple Silicon chips.
    # Remove when https://github.com/davidhalter/parso/pull/177 is in the next release.
    (fetchpatch {
      url = "https://github.com/davidhalter/parso/pull/177/commits/2799a7a3c2cf87fdc2d0c19a0890acea425091ce.patch";
      sha256 = "sha256-A5EQly1wR/7lo+L8Pp0UPSUIhC0WcblXEWQNvRMlZYA=";
    })
  ];

  checkInputs = [ pytestCheckHook ];

  meta = with lib; {
    description = "A Python Parser";
    homepage = "https://parso.readthedocs.io/en/latest/";
    changelog = "https://github.com/davidhalter/parso/blob/master/CHANGELOG.rst";
    license = licenses.mit;
  };
}