1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, mock
5, ply
6, pytestCheckHook
7, six
8}:
9
10buildPythonPackage rec {
11 pname = "stone";
12 version = "3.3.1";
13
14 # pypi sdist misses requirements.txt
15 src = fetchFromGitHub {
16 owner = "dropbox";
17 repo = pname;
18 rev = "v${version}";
19 hash = "sha256-0FWdYbv+paVU3Wj6g9OrSNUB0pH8fLwTkhVIBPeFB/U=";
20 };
21
22 postPatch = ''
23 sed -i '/pytest-runner/d' setup.py
24 '';
25
26 propagatedBuildInputs = [ ply six ];
27
28 checkInputs = [ pytestCheckHook mock ];
29
30 # try to import from `test` directory, which is exported by the python interpreter
31 # and cannot be overriden without removing some py3 to py2 support
32 disabledTestPaths = [
33 "test/test_tsd_types.py"
34 "test/test_js_client.py"
35 ];
36 disabledTests = [
37 "test_type_name_with_module"
38 ];
39
40 pythonImportsCheck = [ "stone" ];
41
42 meta = with lib; {
43 description = "Official Api Spec Language for Dropbox";
44 homepage = "https://github.com/dropbox/stone";
45 license = licenses.mit;
46 maintainers = with maintainers; [ jonringer ];
47 };
48}