2021-03-20 04:20:00 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
|
|
|
, contextlib2
|
|
|
|
, cython
|
|
|
|
, fuse
|
|
|
|
, pkg-config
|
|
|
|
, pytestCheckHook
|
|
|
|
, python
|
|
|
|
, which
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "llfuse";
|
2021-03-20 04:20:00 +00:00
|
|
|
version = "1.4.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
disabled = pythonOlder "3.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "python-llfuse";
|
|
|
|
repo = "python-llfuse";
|
|
|
|
rev = "release-${version}";
|
|
|
|
sha256 = "1dcpdg6cpkmdbyg66fgrylj7dp9zqzg5bf23y6m6673ykgxlv480";
|
|
|
|
};
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
nativeBuildInputs = [ cython pkg-config ];
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
buildInputs = [ fuse ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ contextlib2 ];
|
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
preBuild = ''
|
|
|
|
${python.interpreter} setup.py build_cython
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
# On Darwin, the test requires macFUSE to be installed outside of Nix.
|
|
|
|
doCheck = !stdenv.isDarwin;
|
|
|
|
checkInputs = [ pytestCheckHook which ];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
"test_listdir" # accesses /usr/bin
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Python bindings for the low-level FUSE API";
|
|
|
|
homepage = "https://github.com/python-llfuse/python-llfuse";
|
|
|
|
license = licenses.lgpl2Plus;
|
|
|
|
platforms = platforms.unix;
|
2021-03-20 04:20:00 +00:00
|
|
|
maintainers = with maintainers; [ bjornfor dotlambda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|