From bf321bbb85e76d3f2a2a8672c291c722d44869ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 9 Jul 2024 06:51:43 -0700 Subject: [PATCH 1/2] asciinema: don't use nose --- pkgs/tools/misc/asciinema/default.nix | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/pkgs/tools/misc/asciinema/default.nix b/pkgs/tools/misc/asciinema/default.nix index ff8d6cd4b1e50..9f76f7e88a25d 100644 --- a/pkgs/tools/misc/asciinema/default.nix +++ b/pkgs/tools/misc/asciinema/default.nix @@ -25,14 +25,7 @@ python3Packages.buildPythonApplication rec { --replace "python3" "${python3Packages.python}/bin/python" ''; - nativeCheckInputs = [ - glibcLocales - python3Packages.nose - ]; - - checkPhase = '' - LC_ALL=en_US.UTF-8 nosetests -v tests/config_test.py - ''; + nativeCheckInputs = [ python3Packages.pytestCheckHook ]; meta = { description = "Terminal session recorder and the best companion of asciinema.org"; From 84a5d6db4098677b4bae1b01703220ec09278083 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 9 Jul 2024 06:53:48 -0700 Subject: [PATCH 2/2] asciinema: modernize --- pkgs/tools/misc/asciinema/default.nix | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/pkgs/tools/misc/asciinema/default.nix b/pkgs/tools/misc/asciinema/default.nix index 9f76f7e88a25d..08d130513cd9e 100644 --- a/pkgs/tools/misc/asciinema/default.nix +++ b/pkgs/tools/misc/asciinema/default.nix @@ -1,13 +1,13 @@ -{ lib -, python3Packages -, fetchFromGitHub -, glibcLocales +{ + lib, + python3Packages, + fetchFromGitHub, }: python3Packages.buildPythonApplication rec { pname = "asciinema"; version = "2.4.0"; - format = "pyproject"; + pyproject = true; src = fetchFromGitHub { owner = "asciinema"; @@ -16,13 +16,11 @@ python3Packages.buildPythonApplication rec { hash = "sha256-UegLwpJ+uc9cW3ozLQJsQBjIGD7+vzzwzQFRV5gmDmI="; }; - nativeBuildInputs = [ - python3Packages.setuptools - ]; + build-system = [ python3Packages.setuptools ]; postPatch = '' substituteInPlace tests/pty_test.py \ - --replace "python3" "${python3Packages.python}/bin/python" + --replace-fail "python3" "${python3Packages.python.interpreter}" ''; nativeCheckInputs = [ python3Packages.pytestCheckHook ];