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