2022-06-16 17:23:12 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
2023-08-10 07:59:29 +00:00
|
|
|
, cython_3
|
2022-06-16 17:23:12 +00:00
|
|
|
, pkg-config
|
2023-08-10 07:59:29 +00:00
|
|
|
, setuptools
|
2022-06-16 17:23:12 +00:00
|
|
|
, fuse3
|
|
|
|
, trio
|
|
|
|
, python
|
|
|
|
, pytestCheckHook
|
|
|
|
, pytest-trio
|
|
|
|
, which
|
|
|
|
}:
|
2020-12-09 12:39:15 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyfuse3";
|
2023-08-10 07:59:29 +00:00
|
|
|
version = "3.3.0";
|
2020-12-09 12:39:15 +00:00
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
format = "pyproject";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "libfuse";
|
|
|
|
repo = "pyfuse3";
|
2022-09-30 11:47:45 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-08-10 07:59:29 +00:00
|
|
|
hash = "sha256-GLGuTFdTA16XnXKSBD7ET963a8xH9EG/JfPNu6/3DOg=";
|
2020-12-09 12:39:15 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "'pkg-config'" "'$(command -v $PKG_CONFIG)'"
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2023-08-10 07:59:29 +00:00
|
|
|
cython_3
|
2022-06-16 17:23:12 +00:00
|
|
|
pkg-config
|
2023-08-10 07:59:29 +00:00
|
|
|
setuptools
|
2022-06-16 17:23:12 +00:00
|
|
|
];
|
2020-12-09 12:39:15 +00:00
|
|
|
|
|
|
|
buildInputs = [ fuse3 ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ trio ];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
preBuild = ''
|
|
|
|
${python.pythonForBuild.interpreter} setup.py build_cython
|
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2020-12-09 12:39:15 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pytest-trio
|
|
|
|
which
|
|
|
|
fuse3
|
|
|
|
];
|
|
|
|
|
|
|
|
# Checks if a /usr/bin directory exists, can't work on NixOS
|
|
|
|
disabledTests = [ "test_listdir" ];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pyfuse3"
|
|
|
|
"pyfuse3_asyncio"
|
|
|
|
];
|
|
|
|
|
2020-12-09 12:39:15 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python 3 bindings for libfuse 3 with async I/O support";
|
|
|
|
homepage = "https://github.com/libfuse/pyfuse3";
|
2021-05-20 23:08:51 +00:00
|
|
|
license = licenses.lgpl2Plus;
|
2022-06-16 17:23:12 +00:00
|
|
|
maintainers = with maintainers; [ nyanloutre dotlambda ];
|
2023-07-15 17:15:38 +00:00
|
|
|
changelog = "https://github.com/libfuse/pyfuse3/blob/${version}/Changes.rst";
|
2020-12-09 12:39:15 +00:00
|
|
|
};
|
|
|
|
}
|