Merge pull request #208023 from michaelBelsanti/tuifimanager

This commit is contained in:
Sandro 2023-04-12 01:00:24 +02:00 committed by GitHub
commit bca7aaf8ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 73 additions and 0 deletions

View file

@ -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";
};
}

View file

@ -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 ];
};
}

View file

@ -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 {

View file

@ -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 { };