mirror of
https://github.com/ihaveamac/ninfs.git
synced 2025-06-18 17:05:32 -04:00
move to mfusepy
fusepy is unmaintained, this fork has support for fuse3. This change is currently only tested on Linux.
This commit is contained in:
parent
bec4e62f29
commit
61eb12a2be
@ -2,5 +2,6 @@
|
||||
|
||||
rec {
|
||||
haccrypto = pkgs.python3Packages.callPackage ./haccrypto.nix {};
|
||||
ninfs = pkgs.python3Packages.callPackage ./ninfs.nix { haccrypto = haccrypto; };
|
||||
mfusepy = pkgs.python3Packages.callPackage ./mfusepy.nix {};
|
||||
ninfs = pkgs.python3Packages.callPackage ./ninfs.nix { haccrypto = haccrypto; mfusepy = mfusepy; };
|
||||
}
|
||||
|
@ -16,7 +16,8 @@
|
||||
|
||||
packages = rec {
|
||||
haccrypto = pkgs.python3Packages.callPackage ./haccrypto.nix {};
|
||||
ninfs = pkgs.python3Packages.callPackage ./ninfs.nix { haccrypto = haccrypto; pyctr = pyctr.packages.${system}.pyctr; };
|
||||
mfusepy = pkgs.python3Packages.callPackage ./mfusepy.nix {};
|
||||
ninfs = pkgs.python3Packages.callPackage ./ninfs.nix { haccrypto = haccrypto; mfusepy = mfusepy; pyctr = pyctr.packages.${system}.pyctr; };
|
||||
default = ninfs;
|
||||
};
|
||||
}
|
||||
|
12
ninfs.nix
12
ninfs.nix
@ -1,4 +1,4 @@
|
||||
{ lib, callPackage, buildPythonApplication, fetchPypi, pyctr, pycryptodomex, pypng, tkinter, setuptools, fusepy, haccrypto, stdenv }:
|
||||
{ lib, pkgs, callPackage, buildPythonApplication, fetchPypi, pyctr, pycryptodomex, pypng, tkinter, setuptools, mfusepy, haccrypto, stdenv }:
|
||||
|
||||
buildPythonApplication rec {
|
||||
pname = "ninfs";
|
||||
@ -13,18 +13,12 @@ buildPythonApplication rec {
|
||||
pycryptodomex
|
||||
pypng
|
||||
tkinter
|
||||
setuptools # missing from requirements.txt
|
||||
setuptools
|
||||
#fusepy # this gets added to PYTHONPATH manually in makeWrapperArgs
|
||||
haccrypto
|
||||
];
|
||||
|
||||
makeWrapperArgs = lib.optional (!stdenv.isDarwin) [ "--prefix PYTHONPATH : ${fusepy}/${fusepy.pythonModule.sitePackages}" ];
|
||||
|
||||
# ninfs includes its own copy of fusepy mainly for Windows support and fuse-t on macOS.
|
||||
# This isn't needed when running on Linux, and on macOS, macFUSE is required anyway.
|
||||
patchPhase = lib.optionalString (!stdenv.isDarwin) ''
|
||||
rm ninfs/fuse.py
|
||||
'';
|
||||
makeWrapperArgs = lib.optional (!stdenv.isDarwin) [ "--prefix PYTHONPATH : ${mfusepy}/${mfusepy.pythonModule.sitePackages}" ];
|
||||
|
||||
postInstall = lib.optionalString (!stdenv.isDarwin) ''
|
||||
mkdir -p $out/share/{applications,icons}
|
||||
|
1265
ninfs/fuse.py
1265
ninfs/fuse.py
File diff suppressed because it is too large
Load Diff
@ -153,7 +153,7 @@ class NinfsGUI(tk.Tk):
|
||||
|
||||
def check_fuse(self):
|
||||
try:
|
||||
import fuse
|
||||
import mfusepy
|
||||
except EnvironmentError as e:
|
||||
if e.args[0] == 'Unable to find libfuse':
|
||||
if is_windows:
|
||||
|
@ -29,7 +29,7 @@ python_cmd = 'py -3' if windows else 'python3'
|
||||
# TODO: switch to use_ns in all scripts
|
||||
# noinspection PyBroadException
|
||||
try:
|
||||
from fuse import FUSE, FuseOSError, Operations, fuse_get_context
|
||||
from mfusepy import FUSE, FuseOSError, Operations, fuse_get_context
|
||||
except Exception as e:
|
||||
exit(f'Failed to import the fuse module:\n'
|
||||
f'{type(e).__name__}: {e}')
|
||||
|
@ -2,3 +2,5 @@ pyctr>=0.5.1,<0.8
|
||||
haccrypto>=0.1
|
||||
pycryptodomex>=3.9,<4
|
||||
pypng>=0.0.21
|
||||
setuptools>=61.0.0
|
||||
mfusepy>=1.0.0
|
||||
|
2
setup.py
2
setup.py
@ -39,7 +39,7 @@ setup(
|
||||
'Programming Language :: Python :: 3.10',
|
||||
'Programming Language :: Python :: 3.11',
|
||||
],
|
||||
install_requires=['pycryptodomex>=3.9,<4', 'pyctr>=0.7,<0.8', 'haccrypto>=0.1', 'pypng>=0.0.21'],
|
||||
install_requires=['pycryptodomex>=3.9,<4', 'pyctr>=0.7,<0.8', 'haccrypto>=0.1', 'pypng>=0.0.21', 'setuptools>=61.0.0', 'mfusepy>=1.0.0'],
|
||||
python_requires='>=3.8.0',
|
||||
# fusepy should be added here once the main repo has a new release with Windows support.
|
||||
entry_points={'gui_scripts': ['ninfsw = ninfs.main:gui'],
|
||||
|
Loading…
Reference in New Issue
Block a user