1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, mock
5, ply
6, pytestCheckHook
7, six
8, pythonOlder
9}:
10
11buildPythonPackage rec {
12 pname = "stone";
13 version = "3.3.1";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchFromGitHub {
19 owner = "dropbox";
20 repo = pname;
21 rev = "refs/tags/v${version}";
22 hash = "sha256-0FWdYbv+paVU3Wj6g9OrSNUB0pH8fLwTkhVIBPeFB/U=";
23 };
24
25 postPatch = ''
26 # https://github.com/dropbox/stone/issues/288
27 substituteInPlace stone/frontend/ir_generator.py \
28 --replace "inspect.getargspec" "inspect.getfullargspec"
29 substituteInPlace setup.py \
30 --replace "'pytest-runner == 5.2.0'," ""
31 '';
32
33 propagatedBuildInputs = [
34 ply
35 six
36 ];
37
38 nativeCheckInputs = [
39 pytestCheckHook
40 mock
41 ];
42
43 disabledTests = [
44 "test_type_name_with_module"
45 ];
46
47 pythonImportsCheck = [
48 "stone"
49 ];
50
51 meta = with lib; {
52 description = "Official Api Spec Language for Dropbox";
53 homepage = "https://github.com/dropbox/stone";
54 changelog = "https://github.com/dropbox/stone/releases/tag/v${version}";
55 license = licenses.mit;
56 maintainers = with maintainers; [ jonringer ];
57 };
58}