diff --git a/pkgs/development/python-modules/libtmux/default.nix b/pkgs/development/python-modules/libtmux/default.nix index 74515e1c1396..199f467fbbca 100644 --- a/pkgs/development/python-modules/libtmux/default.nix +++ b/pkgs/development/python-modules/libtmux/default.nix @@ -1,4 +1,5 @@ { lib +, stdenv , fetchFromGitHub , buildPythonPackage , poetry-core @@ -9,14 +10,14 @@ buildPythonPackage rec { pname = "libtmux"; - version = "0.11.0"; + version = "0.13.0"; format = "pyproject"; src = fetchFromGitHub { owner = "tmux-python"; repo = pname; - rev = "v${version}"; - hash = "sha256-QbKqS40la6UGZENyGEw5kXigzexp3q7ff43fKlQ9GqE="; + rev = "refs/tags/v${version}"; + hash = "sha256-u08lxVMuyO5CwFbmxn69QqdSWcvGaSMZgizRJlsHa0k="; }; nativeBuildInputs = [ @@ -30,10 +31,15 @@ buildPythonPackage rec { pytestCheckHook ]; + pytestFlagsArray = lib.optionals stdenv.isDarwin [ "--ignore=tests/test_test.py" ]; + + pythonImportsCheck = [ "libtmux" ]; + meta = with lib; { - description = "Scripting library for tmux"; - homepage = "https://libtmux.readthedocs.io/"; - license = licenses.bsd3; + description = "Typed scripting library / ORM / API wrapper for tmux"; + homepage = "https://libtmux.git-pull.com/"; + changelog = "https://github.com/tmux-python/libtmux/raw/v${version}/CHANGES"; + license = licenses.mit; maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/tools/misc/tmuxp/default.nix b/pkgs/tools/misc/tmuxp/default.nix index b24c3ead956d..768e4d33e3de 100644 --- a/pkgs/tools/misc/tmuxp/default.nix +++ b/pkgs/tools/misc/tmuxp/default.nix @@ -1,4 +1,4 @@ -{ lib, python3Packages }: +{ lib, python3Packages, installShellFiles }: let pypkgs = python3Packages; @@ -6,16 +6,23 @@ let in pypkgs.buildPythonApplication rec { pname = "tmuxp"; - version = "1.11.0"; + version = "1.12.1"; src = pypkgs.fetchPypi { inherit pname version; - sha256 = "sha256-N5kZ+e17ZgLOCvV/lcT/hdG1VNqLxh98QOQyM0BmZCA="; + sha256 = "078624c5ac7aa4142735f856fadb9281fcebb10e6b98d1be2b2f2bbd106613b9"; }; + postPatch = '' + substituteInPlace setup.py \ + --replace "libtmux>=0.12.0,<0.13.0" "libtmux" + ''; + # No tests in archive doCheck = false; + nativeBuildInputs = [ installShellFiles ]; + propagatedBuildInputs = with pypkgs; [ click colorama @@ -23,10 +30,18 @@ pypkgs.buildPythonApplication rec { libtmux ]; + postInstall = '' + installShellCompletion --cmd tmuxp \ + --bash <(_TMUXP_COMPLETE=bash_source $out/bin/tmuxp) \ + --fish <(_TMUXP_COMPLETE=fish_source $out/bin/tmuxp) \ + --zsh <(_TMUXP_COMPLETE=zsh_source $out/bin/tmuxp) + ''; + meta = with lib; { - description = "Manage tmux workspaces from JSON and YAML"; + description = "tmux session manager"; homepage = "https://tmuxp.git-pull.com/"; - license = licenses.bsd3; + changelog = "https://github.com/tmux-python/tmuxp/raw/v${version}/CHANGES"; + license = licenses.mit; maintainers = with maintainers; [ peterhoeg ]; }; }