Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 buildPythonPackage, 3 fetchFromGitHub, 4 fetchpatch, 5 lib, 6 mock, 7 packaging, 8 ply, 9 pytestCheckHook, 10 pythonOlder, 11 setuptools, 12 six, 13}: 14 15buildPythonPackage rec { 16 pname = "stone"; 17 version = "3.3.6"; 18 pyproject = true; 19 20 disabled = pythonOlder "3.7"; 21 22 patches = [ 23 # fix distutils issue 24 # fix versions in tests to conform pep 440 25 # See https://github.com/dropbox/stone/pull/334 26 (fetchpatch { 27 name = "no-distutils.patch"; 28 url = "https://github.com/dropbox/stone/commit/f772d8d3b7e2ce62b14b4fb208a478bc8e54c7f2.patch"; 29 hash = "sha256-SH4gG5S13n/pXppm62LvH9poGfeQGGonW7bkzdYh73Q="; 30 }) 31 (fetchpatch { 32 name = "fix-test-pep-440.patch"; 33 url = "https://github.com/dropbox/stone/commit/f36de56b1f87eae61829258b2f16aa8319bbcc5c.patch"; 34 hash = "sha256-sBJukNk02RmQQza1qhLAkyx1OJRck0/zQOeRaXD9tkY="; 35 }) 36 ]; 37 38 src = fetchFromGitHub { 39 owner = "dropbox"; 40 repo = "stone"; 41 rev = "refs/tags/v${version}"; 42 hash = "sha256-Og0hUUCCd9wRdHUhZBl62rDAunP2Bph5COsCw/T1kUA="; 43 }; 44 45 postPatch = '' 46 substituteInPlace setup.py \ 47 --replace-fail "'pytest-runner == 5.3.2'," "" 48 ''; 49 50 build-system = [ setuptools ]; 51 52 dependencies = [ 53 ply 54 six 55 packaging 56 ]; 57 58 nativeCheckInputs = [ 59 pytestCheckHook 60 mock 61 ]; 62 63 pythonImportsCheck = [ "stone" ]; 64 65 meta = with lib; { 66 description = "Official Api Spec Language for Dropbox"; 67 homepage = "https://github.com/dropbox/stone"; 68 changelog = "https://github.com/dropbox/stone/releases/tag/v${version}"; 69 license = licenses.mit; 70 maintainers = [ ]; 71 mainProgram = "stone"; 72 }; 73}