nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchFromGitHub,
6 cython,
7 fuse,
8 pkg-config,
9 pytestCheckHook,
10 python,
11 setuptools,
12 which,
13}:
14
15buildPythonPackage rec {
16 pname = "llfuse";
17 version = "1.5.2";
18
19 pyproject = true;
20
21 src = fetchFromGitHub {
22 owner = "python-llfuse";
23 repo = "python-llfuse";
24 tag = "release-${version}";
25 hash = "sha256-PFnY+gmm1tjZhptc27XTE9yxF0IaJ+U4Ng/OGhNDDPI=";
26 };
27
28 nativeBuildInputs = [
29 cython
30 pkg-config
31 setuptools
32 ];
33
34 buildInputs = [ fuse ];
35
36 preConfigure = ''
37 substituteInPlace setup.py \
38 --replace "'pkg-config'" "'${stdenv.cc.targetPrefix}pkg-config'"
39 '';
40
41 preBuild = ''
42 ${python.pythonOnBuildForHost.interpreter} setup.py build_cython
43 '';
44
45 # On Darwin, the test requires macFUSE to be installed outside of Nix.
46 doCheck = !stdenv.hostPlatform.isDarwin;
47 nativeCheckInputs = [
48 pytestCheckHook
49 which
50 ];
51
52 disabledTests = [
53 "test_listdir" # accesses /usr/bin
54 ];
55
56 meta = {
57 description = "Python bindings for the low-level FUSE API";
58 homepage = "https://github.com/python-llfuse/python-llfuse";
59 changelog = "https://github.com/python-llfuse/python-llfuse/raw/release-${src.tag}/Changes.rst";
60 license = lib.licenses.lgpl2Plus;
61 platforms = lib.platforms.unix;
62 maintainers = with lib.maintainers; [
63 bjornfor
64 dotlambda
65 ];
66 };
67}