2022-04-15 01:41:22 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2021-04-26 19:14:03 +00:00
|
|
|
, mock
|
|
|
|
, ply
|
|
|
|
, pytestCheckHook
|
|
|
|
, six
|
2023-02-02 18:25:31 +00:00
|
|
|
, pythonOlder
|
2021-04-26 19:14:03 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "stone";
|
2022-04-15 01:41:22 +00:00
|
|
|
version = "3.3.1";
|
2023-02-02 18:25:31 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2022-04-15 01:41:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dropbox";
|
|
|
|
repo = pname;
|
2023-02-02 18:25:31 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2022-04-15 01:41:22 +00:00
|
|
|
hash = "sha256-0FWdYbv+paVU3Wj6g9OrSNUB0pH8fLwTkhVIBPeFB/U=";
|
2021-04-26 19:14:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2023-02-02 18:25:31 +00:00
|
|
|
# https://github.com/dropbox/stone/issues/288
|
|
|
|
substituteInPlace stone/frontend/ir_generator.py \
|
|
|
|
--replace "inspect.getargspec" "inspect.getfullargspec"
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "'pytest-runner == 5.2.0'," ""
|
2021-04-26 19:14:03 +00:00
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
ply
|
|
|
|
six
|
|
|
|
];
|
2021-04-26 19:14:03 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
mock
|
2021-04-26 19:14:03 +00:00
|
|
|
];
|
2023-02-02 18:25:31 +00:00
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
disabledTests = [
|
|
|
|
"test_type_name_with_module"
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"stone"
|
|
|
|
];
|
2021-04-26 19:14:03 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Official Api Spec Language for Dropbox";
|
|
|
|
homepage = "https://github.com/dropbox/stone";
|
2023-02-02 18:25:31 +00:00
|
|
|
changelog = "https://github.com/dropbox/stone/releases/tag/v${version}";
|
2021-04-26 19:14:03 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ jonringer ];
|
|
|
|
};
|
|
|
|
}
|