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