From 9f0de7b8de6faf3cfe77d755d3cb8f284d25a936 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 20 Jan 2022 23:04:04 +0100 Subject: [PATCH] python3Packages.libtmux: fix build, enable tests --- .../python-modules/libtmux/default.nix | 31 +++++++++++++------ 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/libtmux/default.nix b/pkgs/development/python-modules/libtmux/default.nix index 7501744d37c1..7a7e116aa221 100644 --- a/pkgs/development/python-modules/libtmux/default.nix +++ b/pkgs/development/python-modules/libtmux/default.nix @@ -1,21 +1,32 @@ -{ lib, fetchPypi, buildPythonPackage, pytest }: +{ lib +, fetchFromGitHub +, buildPythonPackage +, poetry-core +, pytestCheckHook +, pkgs +}: buildPythonPackage rec { pname = "libtmux"; version = "0.10.3"; + format = "pyproject"; - src = fetchPypi { - inherit pname version; - sha256 = "c7fbd837f0a9e4d33a157523e4ca6ef95e80256842e094ffd766c3dbd78d1957"; + src = fetchFromGitHub { + owner = "tmux-python"; + repo = pname; + rev = "v${version}"; + hash = "sha256:0syj8m4x2mcq96b76b7h75dsmcai22m15pfgkk90rpg7rp6sn772"; }; - checkInputs = [ pytest ]; - postPatch = '' - sed -i 's/==.*$//' requirements/test.txt - ''; + nativeBuildInputs = [ + poetry-core + ]; - # No tests in archive - doCheck = false; + checkInputs = [ + pkgs.procps + pkgs.tmux + pytestCheckHook + ]; meta = with lib; { description = "Scripting library for tmux";