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";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "1.4.2";
|
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}";
|
2022-06-16 17:23:12 +00:00
|
|
|
hash = "sha256-TnZnv439fLvg0WM96yx0dPSSz8Mrae6GDC9LiLFrgQ8=";
|
2021-03-20 04:20:00 +00:00
|
|
|
};
|
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-12-06 16:07:01 +00:00
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "'pkg-config'" "'${stdenv.cc.targetPrefix}pkg-config'"
|
|
|
|
'';
|
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
preBuild = ''
|
2021-12-06 16:07:01 +00:00
|
|
|
${python.pythonForBuild.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
|
|
|
};
|
|
|
|
}
|