2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
fetchFromGitHub,
|
|
|
|
cython,
|
|
|
|
fuse,
|
|
|
|
pkg-config,
|
|
|
|
pytestCheckHook,
|
|
|
|
python,
|
|
|
|
setuptools,
|
|
|
|
which,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "llfuse";
|
2023-08-10 07:59:29 +00:00
|
|
|
version = "1.5.0";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "python-llfuse";
|
|
|
|
repo = "python-llfuse";
|
2023-05-24 13:37:59 +00:00
|
|
|
rev = "refs/tags/release-${version}";
|
2023-08-10 07:59:29 +00:00
|
|
|
hash = "sha256-6/iW5eHmX6ODVPLFkOo3bN9yW8ixqy2MHwQ2r9FA0iI=";
|
2021-03-20 04:20:00 +00:00
|
|
|
};
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cython
|
|
|
|
pkg-config
|
|
|
|
setuptools
|
|
|
|
];
|
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
|
|
|
|
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 = ''
|
2023-11-16 04:20:00 +00:00
|
|
|
${python.pythonOnBuildForHost.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;
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
which
|
|
|
|
];
|
2021-03-20 04:20:00 +00:00
|
|
|
|
|
|
|
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";
|
2023-05-24 13:37:59 +00:00
|
|
|
changelog = "https://github.com/python-llfuse/python-llfuse/raw/release-${version}/Changes.rst";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.lgpl2Plus;
|
|
|
|
platforms = platforms.unix;
|
2024-06-05 15:53:02 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
bjornfor
|
|
|
|
dotlambda
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|