1{ lib
2, stdenv
3, buildPythonPackage
4, pythonOlder
5, fetchFromGitHub
6, contextlib2
7, cython
8, fuse
9, pkg-config
10, pytestCheckHook
11, python
12, which
13}:
14
15buildPythonPackage rec {
16 pname = "llfuse";
17 version = "1.4.1";
18
19 disabled = pythonOlder "3.5";
20
21 src = fetchFromGitHub {
22 owner = "python-llfuse";
23 repo = "python-llfuse";
24 rev = "release-${version}";
25 sha256 = "1dcpdg6cpkmdbyg66fgrylj7dp9zqzg5bf23y6m6673ykgxlv480";
26 };
27
28 nativeBuildInputs = [ cython pkg-config ];
29
30 buildInputs = [ fuse ];
31
32 propagatedBuildInputs = [ contextlib2 ];
33
34 preBuild = ''
35 ${python.interpreter} setup.py build_cython
36 '';
37
38 # On Darwin, the test requires macFUSE to be installed outside of Nix.
39 doCheck = !stdenv.isDarwin;
40 checkInputs = [ pytestCheckHook which ];
41
42 disabledTests = [
43 "test_listdir" # accesses /usr/bin
44 ];
45
46 meta = with lib; {
47 description = "Python bindings for the low-level FUSE API";
48 homepage = "https://github.com/python-llfuse/python-llfuse";
49 license = licenses.lgpl2Plus;
50 platforms = platforms.unix;
51 maintainers = with maintainers; [ bjornfor dotlambda ];
52 };
53}