Unverified Commit bca7aaf8 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

Merge pull request #208023 from michaelBelsanti/tuifimanager

parents 3c5a6e58 0092b9bc
Loading
Loading
Loading
Loading
+38 −0
Original line number Diff line number Diff line
{ 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";
  };
}
+31 −0
Original line number Diff line number Diff line
{ 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 ];
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -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 {
+2 −0
Original line number Diff line number Diff line
@@ -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 { };