1{ lib
2, stdenv
3, buildPythonPackage
4, fetchPypi
5, pkgs
6}:
7
8buildPythonPackage rec {
9 pname = "fusepy";
10 version = "3.0.1";
11
12 src = fetchPypi {
13 inherit pname version;
14 sha256 = "1gg69qfi9pjcic3g98l8ya64rw2vc1bp8gsf76my6gglq8z7izvj";
15 };
16
17 propagatedBuildInputs = [ pkgs.fuse ];
18
19 # No tests included
20 doCheck = false;
21
22 # On macOS, users are expected to install macFUSE. This means fusepy should
23 # be able to find libfuse in /usr/local/lib.
24 patchPhase = lib.optionalString (!stdenv.isDarwin) ''
25 substituteInPlace fuse.py --replace \
26 "find_library('fuse')" "'${pkgs.fuse}/lib/libfuse.so'"
27 '';
28
29 meta = with lib; {
30 description = "Simple ctypes bindings for FUSE";
31 longDescription = ''
32 Python module that provides a simple interface to FUSE and MacFUSE.
33 It's just one file and is implemented using ctypes.
34 '';
35 homepage = "https://github.com/terencehonles/fusepy";
36 license = licenses.isc;
37 platforms = platforms.unix;
38 };
39
40}