Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at gcc-offload 76 lines 1.4 kB view raw
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.4.0"; 20 pyproject = true; 21 22 disabled = pythonOlder "3.8"; 23 24 src = fetchFromGitHub { 25 owner = "libfuse"; 26 repo = "pyfuse3"; 27 rev = "refs/tags/${version}"; 28 hash = "sha256-J4xHiaV8GCtUQ9GJS8YRXpMsuzuwbtnzspvuIonHT24="; 29 }; 30 31 postPatch = '' 32 substituteInPlace setup.py \ 33 --replace-fail "'pkg-config'" "'$(command -v $PKG_CONFIG)'" 34 ''; 35 36 build-system = [ 37 cython 38 setuptools 39 ]; 40 41 nativeBuildInputs = [ pkg-config ]; 42 43 buildInputs = [ fuse3 ]; 44 45 dependencies = [ 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}