2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
mock,
|
|
|
|
ply,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonAtLeast,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
|
|
|
six,
|
2021-04-26 19:14:03 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "stone";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "3.3.6";
|
2024-05-15 15:35:15 +00:00
|
|
|
pyproject = true;
|
2023-02-02 18:25:31 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
# distutils removal, https://github.com/dropbox/stone/issues/323
|
|
|
|
disabled = pythonOlder "3.7" || pythonAtLeast "3.12";
|
2022-04-15 01:41:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dropbox";
|
2024-05-15 15:35:15 +00:00
|
|
|
repo = "stone";
|
2023-02-02 18:25:31 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-Og0hUUCCd9wRdHUhZBl62rDAunP2Bph5COsCw/T1kUA=";
|
2021-04-26 19:14:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2023-02-02 18:25:31 +00:00
|
|
|
substituteInPlace setup.py \
|
2024-05-15 15:35:15 +00:00
|
|
|
--replace-fail "'pytest-runner == 5.3.2'," ""
|
2021-04-26 19:14:03 +00:00
|
|
|
'';
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
dependencies = [
|
2023-02-02 18:25:31 +00:00
|
|
|
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
|
|
|
|
2024-05-15 15:35:15 +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 ];
|
2024-05-15 15:35:15 +00:00
|
|
|
mainProgram = "stone";
|
2021-04-26 19:14:03 +00:00
|
|
|
};
|
|
|
|
}
|