From bd1ab1222fa0dfddc297ef76b85d69d80395b6f4 Mon Sep 17 00:00:00 2001 From: Claudio Bley Date: Fri, 23 Feb 2024 08:27:55 +0100 Subject: [PATCH 1/3] python3Packages.chainstream: init at 1.0.1 --- .../python-modules/chainstream/default.nix | 26 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 pkgs/development/python-modules/chainstream/default.nix diff --git a/pkgs/development/python-modules/chainstream/default.nix b/pkgs/development/python-modules/chainstream/default.nix new file mode 100644 index 000000000000..00c10a22e9ee --- /dev/null +++ b/pkgs/development/python-modules/chainstream/default.nix @@ -0,0 +1,26 @@ +{ lib, fetchPypi, python3Packages }: + +python3Packages.buildPythonPackage rec { + pname = "chainstream"; + version = "1.0.1"; + + pyproject = true; + + nativeBuildInputs = [ python3Packages.setuptools ]; + + src = fetchPypi { + inherit pname version; + hash = "sha256-302P1BixEmkODm+qTLZwaWLktrlf9cEziQ/TIVfI07c="; + }; + + pythonImportsCheck = [ + "chainstream" + ]; + + meta = with lib; { + description = "Chain I/O streams together into a single stream"; + homepage = "https://github.com/rrthomas/chainstream"; + license = licenses.cc-by-sa-40; + maintainers = with maintainers; [ cbley ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b50984ad81ce..22968ba80d3a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2005,6 +2005,8 @@ self: super: with self; { chainmap = callPackage ../development/python-modules/chainmap { }; + chainstream = callPackage ../development/python-modules/chainstream { }; + chalice = callPackage ../development/python-modules/chalice { }; chameleon = callPackage ../development/python-modules/chameleon { }; From 8a7bd071c80325951d4fc24652777a99d2d524d8 Mon Sep 17 00:00:00 2001 From: Claudio Bley Date: Wed, 21 Feb 2024 20:56:10 +0100 Subject: [PATCH 2/3] rpl: 1.10 -> 1.15.5 - remove argparse manpage patch - install man page - run tests --- pkgs/tools/text/rpl/default.nix | 38 +++++++++---------- .../text/rpl/remove-argparse-manpage.diff | 27 ------------- 2 files changed, 18 insertions(+), 47 deletions(-) delete mode 100644 pkgs/tools/text/rpl/remove-argparse-manpage.diff diff --git a/pkgs/tools/text/rpl/default.nix b/pkgs/tools/text/rpl/default.nix index 9f37fd260d71..c35c9a8163e9 100644 --- a/pkgs/tools/text/rpl/default.nix +++ b/pkgs/tools/text/rpl/default.nix @@ -1,38 +1,36 @@ -{ lib, fetchFromGitHub, python3Packages }: +{ lib, fetchPypi, python3Packages }: python3Packages.buildPythonApplication rec { pname = "rpl"; - version = "1.10"; + version = "1.15.5"; - # Tests not included in pip package. - doCheck = false; + pyproject = true; - - src = fetchFromGitHub { - owner = "rrthomas"; - repo = "rpl"; - rev = "4467bd46a7a798f738247a7f090c1505176bd597"; - sha256 = "0yf3pc3fws4nnh4nd8d3jpglmsyi69d17qqgpcnkpqca5l4cd25w"; + src = fetchPypi { + inherit pname version; + hash = "sha256-rhPS+hwbjqq3X/V1bL6pzGg2tVxBkeMyUhaCvmneG4M="; }; - patches = [ - ./remove-argparse-manpage.diff # quickfix for ImportError: No module named build_manpages.build_manpages + nativeBuildInputs = [ + python3Packages.setuptools + ]; + + nativeCheckInputs = [ + python3Packages.pytest-datafiles + python3Packages.pytestCheckHook ]; propagatedBuildInputs = [ - #python3Packages.argparse-manpage # TODO + python3Packages.argparse-manpage + python3Packages.chainstream python3Packages.chardet + python3Packages.regex ]; - installPhase = '' - mkdir -p $out/bin - mv rpl $out/bin - ''; - meta = with lib; { description = "Replace strings in files"; - homepage = "https://github.com/rrthomas/rpl"; - license = licenses.gpl2; + homepage = "https://github.com/rrthomas/rpl"; + license = licenses.gpl2; maintainers = with maintainers; [ teto ]; }; } diff --git a/pkgs/tools/text/rpl/remove-argparse-manpage.diff b/pkgs/tools/text/rpl/remove-argparse-manpage.diff deleted file mode 100644 index 8d3297699682..000000000000 --- a/pkgs/tools/text/rpl/remove-argparse-manpage.diff +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/setup.cfg b/setup.cfg -index 12e9198..38e5376 100644 ---- a/setup.cfg -+++ b/setup.cfg -@@ -15,7 +15,6 @@ classifiers = - [options] - scripts = rpl - python_requires = >=3 --setup_requires = argparse-manpage - install_requires = chardet - - [options.extras_require] -diff --git a/setup.py b/setup.py -index 96cade6..879fc44 100644 ---- a/setup.py -+++ b/setup.py -@@ -1,9 +1,8 @@ --from build_manpages.build_manpages import get_install_cmd - from setuptools import setup - from setuptools.command.install import install - - setup( - cmdclass={ -- 'install': get_install_cmd(install), -+ 'install': install, - } - ) From afc0e00116da5d0f9a65cc14f3fc9785cb6e0208 Mon Sep 17 00:00:00 2001 From: Claudio Bley Date: Fri, 23 Feb 2024 08:38:57 +0100 Subject: [PATCH 3/3] rpl: Set myself as maintainer --- pkgs/tools/text/rpl/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/text/rpl/default.nix b/pkgs/tools/text/rpl/default.nix index c35c9a8163e9..cc36f93baf0f 100644 --- a/pkgs/tools/text/rpl/default.nix +++ b/pkgs/tools/text/rpl/default.nix @@ -31,6 +31,6 @@ python3Packages.buildPythonApplication rec { description = "Replace strings in files"; homepage = "https://github.com/rrthomas/rpl"; license = licenses.gpl2; - maintainers = with maintainers; [ teto ]; + maintainers = with maintainers; [ cbley ]; }; }