Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 attrs, 5 buildPythonPackage, 6 distro, 7 fetchFromGitHub, 8 parameterized, 9 jsonschema, 10 mock, 11 packaging, 12 pytestCheckHook, 13 pythonOlder, 14 setuptools, 15 testfixtures, 16 zipfile2, 17}: 18 19buildPythonPackage rec { 20 pname = "okonomiyaki"; 21 version = "2.0.0"; 22 pyproject = true; 23 24 disabled = pythonOlder "3.9"; 25 26 src = fetchFromGitHub { 27 owner = "enthought"; 28 repo = "okonomiyaki"; 29 tag = version; 30 hash = "sha256-JQZhw0H4iSdxoyS6ODICJz1vAZsOISQitX7wTgSS1xc="; 31 }; 32 33 postPatch = '' 34 # Fixed for >= 2.0.0 35 substituteInPlace setup.cfg \ 36 --replace-fail "long_description_content_type = rst" "long_description_content_type = text/x-rst" 37 ''; 38 39 build-system = [ setuptools ]; 40 41 optional-dependencies = { 42 all = [ 43 attrs 44 distro 45 jsonschema 46 zipfile2 47 ]; 48 platforms = [ 49 attrs 50 distro 51 ]; 52 formats = [ 53 attrs 54 distro 55 jsonschema 56 zipfile2 57 ]; 58 }; 59 60 nativeCheckInputs = [ 61 packaging 62 parameterized 63 pytestCheckHook 64 testfixtures 65 ] 66 ++ lib.flatten (builtins.attrValues optional-dependencies); 67 68 preCheck = '' 69 substituteInPlace okonomiyaki/runtimes/tests/test_runtime.py \ 70 --replace-fail 'runtime_info = PythonRuntime.from_running_python()' 'raise unittest.SkipTest() #' 71 '' 72 + lib.optionalString stdenv.hostPlatform.isDarwin '' 73 substituteInPlace okonomiyaki/platforms/tests/test_pep425.py \ 74 --replace-fail 'self.assertEqual(platform_tag, self.tag.platform)' 'raise unittest.SkipTest()' 75 ''; 76 77 pythonImportsCheck = [ "okonomiyaki" ]; 78 79 meta = with lib; { 80 description = "Experimental library aimed at consolidating a lot of low-level code used for Enthought's eggs"; 81 homepage = "https://github.com/enthought/okonomiyaki"; 82 changelog = "https://github.com/enthought/okonomiyaki/releases/tag/${version}"; 83 maintainers = with maintainers; [ genericnerdyusername ]; 84 license = licenses.bsd3; 85 }; 86}