9 , x11Support ? stdenv.hostPlatform.isLinux
10 # pypinput is marked as broken for darwin
11 , pynputSupport ? stdenv.hostPlatform.isLinux
12 # Experimental Drag & Drop support requires x11 & pyinput suport
13 , hasDndSupport ? x11Support && pynputSupport
14 , enableDragAndDrop ? false
17 lib.throwIf (enableDragAndDrop && !hasDndSupport)
18 "Drag and drop support is only available for linux with xorg."
20 python3.pkgs.buildPythonApplication rec {
21 pname = "tuifimanager";
25 src = fetchFromGitHub {
27 repo = "TUIFIManager";
29 hash = "sha256-2yYD1YFGoN0uj3HzcYxEs3zbwfUIDLLzvfTcZILx5h4=";
33 python3.pkgs.setuptools
34 python3.pkgs.setuptools-scm
35 ] ++ (lib.optionals enableDragAndDrop [
40 propagatedBuildInputs = [
41 python3.pkgs.send2trash
42 python3.pkgs.unicurses
43 ] ++ (lib.optionals enableDragAndDrop [
53 # fix missing 'adwaita' warning missing with ncurses tui
54 # see: https://github.com/NixOS/nixpkgs/issues/60918
55 theme = gnome-themes-extra;
57 lib.optionalString enableDragAndDrop ''
58 wrapProgram $out/bin/tuifi \
59 --prefix GTK_PATH : "${theme}/lib/gtk-2.0" \
60 --set tuifi_synth_dnd True
63 pythonImportsCheck = [ "TUIFIManager" ];
66 description = "Cross-platform terminal-based termux-oriented file manager";
68 A cross-platform terminal-based termux-oriented file manager (and component),
69 meant to be used with a Uni-Curses project or as is. This project is mainly an
70 attempt to get more attention to the Uni-Curses project.
72 homepage = "https://github.com/GiorgosXou/TUIFIManager";
73 license = lib.licenses.gpl3Only;
74 maintainers = with lib.maintainers; [ michaelBelsanti sigmanificient ];
75 mainProgram = "tuifi";