diff --git a/pkgs/applications/file-managers/tuifimanager/default.nix b/pkgs/applications/file-managers/tuifimanager/default.nix new file mode 100644 index 000000000000..e9bb2b3e8064 --- /dev/null +++ b/pkgs/applications/file-managers/tuifimanager/default.nix @@ -0,0 +1,38 @@ +{ lib, python3Packages, fetchFromGitHub }: + +python3Packages.buildPythonApplication rec { + pname = "tuifimanager"; + version = "2.3.4"; + format = "setuptools"; + + src = fetchFromGitHub { + repo = pname; + owner = "GiorgosXou"; + rev = "v.${version}"; + hash = "sha256-KJYPpeBALyg6Gd1GQgJbvGdJbAT47qO9FnSH7GhO4oQ="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace "Send2Trash == 1.8.0" "Send2Trash >= 1.8.0" + ''; + + propagatedBuildInputs = with python3Packages; [ unicurses send2trash ]; + pythonImportsCheck = [ "TUIFIManager" ]; + + # Tests currently cause build to fail + doCheck = false; + + meta = with lib; { + description = "A cross-platform terminal-based termux-oriented file manager"; + longDescription = '' + A cross-platform terminal-based termux-oriented file manager (and component), + meant to be used with a Uni-Curses project or as is. This project is mainly an + attempt to get more attention to the Uni-Curses project. + ''; + homepage = "https://github.com/GiorgosXou/TUIFIManager"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ michaelBelsanti ]; + mainProgram = "tuifi"; + }; +} diff --git a/pkgs/development/python-modules/unicurses/default.nix b/pkgs/development/python-modules/unicurses/default.nix new file mode 100644 index 000000000000..0d4f75264ca2 --- /dev/null +++ b/pkgs/development/python-modules/unicurses/default.nix @@ -0,0 +1,31 @@ +{ lib, buildPythonPackage, fetchPypi, ncurses, x256 }: + +buildPythonPackage rec { + pname = "unicurses"; + version = "2.1.3"; + format = "setuptools"; + + src = fetchPypi { + inherit version; + pname = "Uni-Curses"; + hash = "sha256-uzSiF0jAZzI0iZngM/GuJ60o+UbLQ5XQzycTPito34w="; + }; + + propagatedBuildInputs = [ x256 ]; + + # Necessary because ctypes.util.find_library does not find the ncurses libraries + postPatch = '' + substituteInPlace './unicurses/__init__.py' \ + --replace "find_library('ncursesw')" '"${ncurses}/lib/libncursesw.so.6"' \ + --replace "find_library('panelw')" '"${ncurses}/lib/libpanelw.so.6"' + ''; + + pythonImportsCheck = [ "unicurses" ]; + + meta = with lib; { + description = "Unified Curses Wrapper for Python"; + homepage = "https://github.com/unicurses/unicurses"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ michaelBelsanti ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2a4fbe689b29..806f0e9b71c5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2493,6 +2493,8 @@ with pkgs; spaceFM = callPackage ../applications/file-managers/spacefm { }; + tuifimanager = callPackage ../applications/file-managers/tuifimanager { }; + vifm = callPackage ../applications/file-managers/vifm { }; vifm-full = vifm.override { diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index be55b7f0b340..82374abcafb2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -12236,6 +12236,8 @@ self: super: with self; { unicorn-emu = pkgs.unicorn; }; + unicurses = callPackage ../development/python-modules/unicurses { }; + unicrypto = callPackage ../development/python-modules/unicrypto { }; unidecode = callPackage ../development/python-modules/unidecode { };