From 09726de8632708408fa8edafc5c7f11f859500c6 Mon Sep 17 00:00:00 2001 From: quasigod-io Date: Tue, 27 Dec 2022 13:37:08 -0500 Subject: [PATCH 1/2] unicurses: init at 2.1.3 --- .../python-modules/unicurses/default.nix | 31 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/development/python-modules/unicurses/default.nix 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/python-packages.nix b/pkgs/top-level/python-packages.nix index 2c8945f53617..9b95fadfa8ef 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -11585,6 +11585,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 { }; From 0092b9bc72e7ba27b9ce2578d27fd5b7915aa4a0 Mon Sep 17 00:00:00 2001 From: quasigod-io Date: Tue, 27 Dec 2022 13:36:51 -0500 Subject: [PATCH 2/2] tuifimanager: init at 2.3.4 --- .../file-managers/tuifimanager/default.nix | 38 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 40 insertions(+) create mode 100644 pkgs/applications/file-managers/tuifimanager/default.nix 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/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 87376adb55f1..a64abd36f195 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2268,6 +2268,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 {