Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 pythonOlder, 5 fetchFromGitHub, 6 cython, 7 pkg-config, 8 setuptools, 9 fuse3, 10 trio, 11 python, 12 pytestCheckHook, 13 pytest-trio, 14 which, 15}: 16 17buildPythonPackage rec { 18 pname = "pyfuse3"; 19 version = "3.3.0"; 20 21 disabled = pythonOlder "3.8"; 22 23 format = "pyproject"; 24 25 src = fetchFromGitHub { 26 owner = "libfuse"; 27 repo = "pyfuse3"; 28 rev = "refs/tags/${version}"; 29 hash = "sha256-GLGuTFdTA16XnXKSBD7ET963a8xH9EG/JfPNu6/3DOg="; 30 }; 31 32 postPatch = '' 33 substituteInPlace setup.py \ 34 --replace "'pkg-config'" "'$(command -v $PKG_CONFIG)'" 35 ''; 36 37 nativeBuildInputs = [ 38 cython 39 pkg-config 40 setuptools 41 ]; 42 43 buildInputs = [ fuse3 ]; 44 45 propagatedBuildInputs = [ trio ]; 46 47 preBuild = '' 48 ${python.pythonOnBuildForHost.interpreter} setup.py build_cython 49 ''; 50 51 nativeCheckInputs = [ 52 pytestCheckHook 53 pytest-trio 54 which 55 fuse3 56 ]; 57 58 # Checks if a /usr/bin directory exists, can't work on NixOS 59 disabledTests = [ "test_listdir" ]; 60 61 pythonImportsCheck = [ 62 "pyfuse3" 63 "pyfuse3_asyncio" 64 ]; 65 66 meta = with lib; { 67 description = "Python 3 bindings for libfuse 3 with async I/O support"; 68 homepage = "https://github.com/libfuse/pyfuse3"; 69 license = licenses.lgpl2Plus; 70 maintainers = with maintainers; [ 71 nyanloutre 72 dotlambda 73 ]; 74 changelog = "https://github.com/libfuse/pyfuse3/blob/${version}/Changes.rst"; 75 }; 76}