2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
2024-06-20 14:57:18 +00:00
|
|
|
fetchpatch,
|
|
|
|
lib,
|
2024-05-15 15:35:15 +00:00
|
|
|
mock,
|
2024-06-20 14:57:18 +00:00
|
|
|
packaging,
|
2024-05-15 15:35:15 +00:00
|
|
|
ply,
|
|
|
|
pytestCheckHook,
|
|
|
|
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-06-20 14:57:18 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
# fix distutils issue
|
|
|
|
# fix versions in tests to conform pep 440
|
|
|
|
# See https://github.com/dropbox/stone/pull/334
|
|
|
|
(fetchpatch {
|
|
|
|
name = "no-distutils.patch";
|
|
|
|
url = "https://github.com/dropbox/stone/commit/f772d8d3b7e2ce62b14b4fb208a478bc8e54c7f2.patch";
|
|
|
|
hash = "sha256-SH4gG5S13n/pXppm62LvH9poGfeQGGonW7bkzdYh73Q=";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
name = "fix-test-pep-440.patch";
|
|
|
|
url = "https://github.com/dropbox/stone/commit/f36de56b1f87eae61829258b2f16aa8319bbcc5c.patch";
|
|
|
|
hash = "sha256-sBJukNk02RmQQza1qhLAkyx1OJRck0/zQOeRaXD9tkY=";
|
|
|
|
})
|
|
|
|
];
|
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
|
2024-06-20 14:57:18 +00:00
|
|
|
packaging
|
2023-02-02 18:25:31 +00:00
|
|
|
];
|
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;
|
2024-07-01 15:47:52 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2024-05-15 15:35:15 +00:00
|
|
|
mainProgram = "stone";
|
2021-04-26 19:14:03 +00:00
|
|
|
};
|
|
|
|
}
|