From c1aa53d9a5f7c6eb9a79164dbe6a703b3ef78f87 Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Thu, 20 Feb 2025 03:10:54 +0800 Subject: [PATCH 1/4] stig: use python3Package instead of python310Packages --- pkgs/by-name/st/stig/package.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/st/stig/package.nix b/pkgs/by-name/st/stig/package.nix index 7c6dec75cee6..03e1ea67b271 100644 --- a/pkgs/by-name/st/stig/package.nix +++ b/pkgs/by-name/st/stig/package.nix @@ -1,12 +1,12 @@ { lib, fetchFromGitHub, - python310Packages, + python3Packages, testers, stig, }: -python310Packages.buildPythonApplication rec { +python3Packages.buildPythonApplication rec { pname = "stig"; # This project has a different concept for pre release / alpha, # Read the project's README for details: https://github.com/rndusr/stig#stig @@ -19,7 +19,7 @@ python310Packages.buildPythonApplication rec { sha256 = "sha256-lSFI4/DxWl17KFgLXZ7c5nW/e5IUGN7s8Gm6wTM5ZWg="; }; - propagatedBuildInputs = with python310Packages; [ + propagatedBuildInputs = with python3Packages; [ urwid urwidtrees aiohttp @@ -30,7 +30,7 @@ python310Packages.buildPythonApplication rec { setproctitle ]; - nativeCheckInputs = with python310Packages; [ + nativeCheckInputs = with python3Packages; [ asynctest pytestCheckHook ]; From 75007d54ed7860afe4fd9f462dfecdbc2d30e07a Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Thu, 20 Feb 2025 04:56:27 +0800 Subject: [PATCH 2/4] stig: remove dontUseSetuptoolsCheck specification setuptooolsCheckHooks has been removed. --- pkgs/by-name/st/stig/package.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/by-name/st/stig/package.nix b/pkgs/by-name/st/stig/package.nix index 03e1ea67b271..307995c9bfc9 100644 --- a/pkgs/by-name/st/stig/package.nix +++ b/pkgs/by-name/st/stig/package.nix @@ -35,8 +35,6 @@ python3Packages.buildPythonApplication rec { pytestCheckHook ]; - dontUseSetuptoolsCheck = true; - preCheck = '' export LC_ALL=C ''; From a0a2932ac2fc0bfd338da1ccc5b077139a0ade99 Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Thu, 20 Feb 2025 03:15:20 +0800 Subject: [PATCH 3/4] stig: disable checks and get rid of checkInputs to resolve dependency conflicts. The chekck dependency asynctest is unmaintained by the upstream and only supports Python<=3.9. With such dependency, it is impossible to find a Python interpreter version for stig to evaluate. --- pkgs/by-name/st/stig/package.nix | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/pkgs/by-name/st/stig/package.nix b/pkgs/by-name/st/stig/package.nix index 307995c9bfc9..a9bf6a747d48 100644 --- a/pkgs/by-name/st/stig/package.nix +++ b/pkgs/by-name/st/stig/package.nix @@ -30,25 +30,11 @@ python3Packages.buildPythonApplication rec { setproctitle ]; - nativeCheckInputs = with python3Packages; [ - asynctest - pytestCheckHook - ]; - - preCheck = '' - export LC_ALL=C - ''; - - disabledTestPaths = [ - # Almost all tests fail in this file, it is reported upstream in: - # https://github.com/rndusr/stig/issues/214 , and upstream fails to - # reproduce the issue unfortunately. - "tests/client_test/aiotransmission_test/api_settings_test.py" - ]; - disabledTests = [ - # Another failure with similar circumstances to the above - "test_candidates_are_sorted_case_insensitively" - ]; + # According to the upstream author, + # stig no longer has working tests + # since asynctest (former test dependency) got abandoned. + # See https://github.com/rndusr/stig/issues/206#issuecomment-2669636320 + doCheck = false; passthru.tests = testers.testVersion { package = stig; @@ -56,9 +42,6 @@ python3Packages.buildPythonApplication rec { version = "stig version ${version}"; }; - # https://github.com/rndusr/stig/issues/214#issuecomment-1995651219 - dontUsePytestCheck = true; - meta = with lib; { description = "TUI and CLI for the BitTorrent client Transmission"; homepage = "https://github.com/rndusr/stig"; From 14fc7a9020804ba79bbdba888d6af252414cb194 Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Thu, 20 Feb 2025 06:00:23 +0800 Subject: [PATCH 4/4] stig: modernise MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Use "pyproject = true" and "build-system = [ setuptools ]" - Specify run-time Python dependencies via "dependencies" Co-authored-by: Robert Schütz --- pkgs/by-name/st/stig/package.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/st/stig/package.nix b/pkgs/by-name/st/stig/package.nix index a9bf6a747d48..1f82c837e928 100644 --- a/pkgs/by-name/st/stig/package.nix +++ b/pkgs/by-name/st/stig/package.nix @@ -11,6 +11,7 @@ python3Packages.buildPythonApplication rec { # This project has a different concept for pre release / alpha, # Read the project's README for details: https://github.com/rndusr/stig#stig version = "0.12.10a0"; + pyproject = true; src = fetchFromGitHub { owner = "rndusr"; @@ -19,7 +20,11 @@ python3Packages.buildPythonApplication rec { sha256 = "sha256-lSFI4/DxWl17KFgLXZ7c5nW/e5IUGN7s8Gm6wTM5ZWg="; }; - propagatedBuildInputs = with python3Packages; [ + build-system = with python3Packages; [ + setuptools + ]; + + dependencies = with python3Packages; [ urwid urwidtrees aiohttp