2021-01-18 22:50:56 -08:00
|
|
|
{ lib, stdenv, fetchPypi, fetchpatch, buildPythonPackage, pkg-config, pytest, fuse, attr, which
|
2021-03-19 11:45:03 -07:00
|
|
|
, contextlib2, macfuse-stubs, DiskArbitration
|
2017-10-29 07:57:39 -07:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2017-11-09 03:26:09 -08:00
|
|
|
pname = "llfuse";
|
2020-12-07 12:03:47 -08:00
|
|
|
version = "1.3.8";
|
2017-10-29 07:57:39 -07:00
|
|
|
|
2020-12-07 12:03:47 -08:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "1g2cdhdqrb6m7655qp61pn61pwj1ql61cdzhr2jvl3w4i8877ddr";
|
2017-10-29 07:57:39 -07:00
|
|
|
};
|
|
|
|
|
2020-12-07 12:07:49 -08:00
|
|
|
patches = [
|
|
|
|
# fix tests with pytest 6
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/python-llfuse/python-llfuse/commit/1ed8b280d2544eedf8bf209761bef0d2519edd17.diff";
|
|
|
|
sha256 = "0wailfrr1i0n2m9ylwpr00jh79s7z3l36w7x19jx1x4djcz2hdps";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-01-18 22:50:56 -08:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2021-01-23 16:29:22 -08:00
|
|
|
|
2020-01-24 11:09:03 -08:00
|
|
|
buildInputs =
|
2021-01-23 16:29:22 -08:00
|
|
|
lib.optionals stdenv.isLinux [ fuse ]
|
2021-03-19 11:45:03 -07:00
|
|
|
++ lib.optionals stdenv.isDarwin [ DiskArbitration macfuse-stubs ];
|
2021-01-23 16:29:22 -08:00
|
|
|
|
2020-12-07 13:52:38 -08:00
|
|
|
checkInputs = [ pytest which ] ++
|
2021-01-23 16:29:22 -08:00
|
|
|
lib.optionals stdenv.isLinux [ attr ];
|
2017-10-29 07:57:39 -07:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ contextlib2 ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
2021-01-23 16:29:22 -08:00
|
|
|
py.test -k "not test_listdir" ${lib.optionalString stdenv.isDarwin ''-m "not uses_fuse"''}
|
2017-10-29 07:57:39 -07:00
|
|
|
'';
|
|
|
|
|
2021-01-10 23:54:33 -08:00
|
|
|
meta = with lib; {
|
2017-10-29 07:57:39 -07:00
|
|
|
description = "Python bindings for the low-level FUSE API";
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://github.com/python-llfuse/python-llfuse";
|
2017-10-29 07:57:39 -07:00
|
|
|
license = licenses.lgpl2Plus;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ bjornfor ];
|
|
|
|
};
|
|
|
|
}
|