diff --git a/pkgs/applications/version-management/git-and-tools/gita/default.nix b/pkgs/applications/version-management/git-and-tools/gita/default.nix index d1a948f44e0f..5fe6b34fd3b5 100644 --- a/pkgs/applications/version-management/git-and-tools/gita/default.nix +++ b/pkgs/applications/version-management/git-and-tools/gita/default.nix @@ -1,6 +1,8 @@ { lib , buildPythonApplication , fetchFromGitHub +, git +, pytest , pyyaml , setuptools , installShellFiles @@ -24,6 +26,23 @@ buildPythonApplication rec { nativeBuildInputs = [ installShellFiles ]; + postUnpack = '' + for case in "\n" ""; do + substituteInPlace source/tests/test_main.py \ + --replace "'gita$case'" "'source$case'" + done + ''; + + checkInputs = [ + git + pytest + ]; + + checkPhase = '' + git init + pytest tests + ''; + postInstall = '' installShellCompletion --bash --name gita ${src}/.gita-completion.bash '';