at master 1.4 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 pythonOlder, 6 fetchFromGitHub, 7 cython, 8 fuse, 9 pkg-config, 10 pytestCheckHook, 11 python, 12 setuptools, 13 which, 14}: 15 16buildPythonPackage rec { 17 pname = "llfuse"; 18 version = "1.5.1"; 19 20 format = "pyproject"; 21 22 disabled = pythonOlder "3.8"; 23 24 src = fetchFromGitHub { 25 owner = "python-llfuse"; 26 repo = "python-llfuse"; 27 tag = "release-${version}"; 28 hash = "sha256-wni/b1hEn6/G0RszCJi+wmBHx6F0Ov1cZ/sRf8PLmps="; 29 }; 30 31 nativeBuildInputs = [ 32 cython 33 pkg-config 34 setuptools 35 ]; 36 37 buildInputs = [ fuse ]; 38 39 preConfigure = '' 40 substituteInPlace setup.py \ 41 --replace "'pkg-config'" "'${stdenv.cc.targetPrefix}pkg-config'" 42 ''; 43 44 preBuild = '' 45 ${python.pythonOnBuildForHost.interpreter} setup.py build_cython 46 ''; 47 48 # On Darwin, the test requires macFUSE to be installed outside of Nix. 49 doCheck = !stdenv.hostPlatform.isDarwin; 50 nativeCheckInputs = [ 51 pytestCheckHook 52 which 53 ]; 54 55 disabledTests = [ 56 "test_listdir" # accesses /usr/bin 57 ]; 58 59 meta = with lib; { 60 description = "Python bindings for the low-level FUSE API"; 61 homepage = "https://github.com/python-llfuse/python-llfuse"; 62 changelog = "https://github.com/python-llfuse/python-llfuse/raw/release-${version}/Changes.rst"; 63 license = licenses.lgpl2Plus; 64 platforms = platforms.unix; 65 maintainers = with maintainers; [ 66 bjornfor 67 dotlambda 68 ]; 69 }; 70}