Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fastimport, 6 fetchFromGitHub, 7 gevent, 8 geventhttpclient, 9 git, 10 glibcLocales, 11 gnupg, 12 gpgme, 13 paramiko, 14 pytestCheckHook, 15 pythonOlder, 16 setuptools, 17 setuptools-rust, 18 urllib3, 19}: 20 21buildPythonPackage rec { 22 pname = "dulwich"; 23 version = "0.22.8"; 24 pyproject = true; 25 26 disabled = pythonOlder "3.9"; 27 28 src = fetchFromGitHub { 29 owner = "jelmer"; 30 repo = "dulwich"; 31 tag = "dulwich-${version}"; 32 hash = "sha256-T0Tmu5sblTkqiak9U4ltkGbWw8ZE91pTlhPVMRi5Pxk="; 33 }; 34 35 build-system = [ 36 setuptools 37 setuptools-rust 38 ]; 39 40 propagatedBuildInputs = [ 41 urllib3 42 ]; 43 44 optional-dependencies = { 45 fastimport = [ fastimport ]; 46 https = [ urllib3 ]; 47 pgp = [ 48 gpgme 49 gnupg 50 ]; 51 paramiko = [ paramiko ]; 52 }; 53 54 nativeCheckInputs = [ 55 gevent 56 geventhttpclient 57 git 58 glibcLocales 59 pytestCheckHook 60 ] 61 ++ lib.flatten (lib.attrValues optional-dependencies); 62 63 enabledTestPaths = [ "tests" ]; 64 65 disabledTests = [ 66 # AssertionError: 'C:\\\\foo.bar\\\\baz' != 'C:\\foo.bar\\baz' 67 "test_file_win" 68 ]; 69 70 disabledTestPaths = [ 71 # requires swift config file 72 "tests/contrib/test_swift_smoke.py" 73 ]; 74 75 __darwinAllowLocalNetworking = true; 76 77 pythonImportsCheck = [ "dulwich" ]; 78 79 meta = with lib; { 80 description = "Implementation of the Git file formats and protocols"; 81 longDescription = '' 82 Dulwich is a Python implementation of the Git file formats and protocols, which 83 does not depend on Git itself. All functionality is available in pure Python. 84 ''; 85 homepage = "https://www.dulwich.io/"; 86 changelog = "https://github.com/jelmer/dulwich/blob/dulwich-${src.tag}/NEWS"; 87 license = with licenses; [ 88 asl20 89 gpl2Plus 90 ]; 91 maintainers = with maintainers; [ koral ]; 92 }; 93}