Files
nixpkgs/pkgs/development/python-modules/mfusepy/default.nix
T
2025-12-17 23:45:21 +00:00

43 lines
1.1 KiB
Nix

{
lib,
stdenv,
buildPythonPackage,
fetchFromGitHub,
setuptools,
fuse3,
}:
let
version = "3.0.0";
in
buildPythonPackage {
pname = "mfusepy";
inherit version;
pyproject = true;
src = fetchFromGitHub {
owner = "mxmlnkn";
repo = "mfusepy";
tag = "v${version}";
hash = "sha256-a0F8zcPfKwkYgbXMrLZZ3+kkMfn+ohqoBFa98yNr8uE=";
};
# If fuse library path cannot be found, use fuse library path in nixpkgs
postPatch = lib.optionalString stdenv.hostPlatform.isLinux ''
substituteInPlace mfusepy.py \
--replace-fail "_libfuse_path = find_library('fuse3')" '_libfuse_path = "${lib.getLib fuse3}/lib/libfuse3.so.4"'
'';
build-system = [ setuptools ];
# https://github.com/NixOS/nixpkgs/blob/1e1947e8b7962c914b725e8b821e311229e632ae/doc/packages/fuse.section.md?plain=1#L10
pythonImportsCheck = lib.optionals stdenv.hostPlatform.isLinux [ "mfusepy" ];
meta = {
description = "Ctypes bindings for the high-level API in libfuse 2 and 3";
homepage = "https://github.com/mxmlnkn/mfusepy";
license = lib.licenses.isc;
maintainers = with lib.maintainers; [ kyehn ];
};
}