diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index e8c35b915c4d..9f4e4aaa9771 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -3136,6 +3136,11 @@ fingerprint = "9C56 1D64 30B2 8D6B DCBC 9CEB 73D5 E7FD EE3D E49A"; }]; }; + chrpinedo = { + github = "chrpinedo"; + githubId = 2324630; + name = "Christian Pinedo"; + }; chuahou = { email = "human+github@chuahou.dev"; github = "chuahou"; diff --git a/pkgs/development/python-modules/curlify/default.nix b/pkgs/development/python-modules/curlify/default.nix new file mode 100644 index 000000000000..dbe335c71dec --- /dev/null +++ b/pkgs/development/python-modules/curlify/default.nix @@ -0,0 +1,25 @@ +{ lib, buildPythonPackage, fetchFromGitHub, requests }: + +buildPythonPackage { + pname = "curlify"; + version = "2.2.1"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "ofw"; + repo = "curlify"; + rev = "b914625b12f9b05c39f305b47ebd0d1f061af24d"; + hash = "sha256-yDHmH35TtQDJB0na1V98RtBuVHX5TmKC72hzzs1DQK8="; + }; + + propagatedBuildInputs = [ + requests + ]; + + meta = with lib; { + description = "Convert python requests request object to cURL command"; + homepage = "https://github.com/ofw/curlify"; + license = licenses.mit; + maintainers = with maintainers; [ chrpinedo ]; + }; +} diff --git a/pkgs/tools/misc/pricehist/default.nix b/pkgs/tools/misc/pricehist/default.nix new file mode 100644 index 000000000000..04333a290731 --- /dev/null +++ b/pkgs/tools/misc/pricehist/default.nix @@ -0,0 +1,46 @@ +{ lib +, buildPythonApplication +, fetchFromGitLab +, requests +, lxml +, cssselect +, curlify +, poetry-core +, pytest-mock +, responses +, pytestCheckHook +}: + +buildPythonApplication rec { + pname = "pricehist"; + version = "1.4.6"; + format = "pyproject"; + + src = fetchFromGitLab { + owner = "chrisberkhout"; + repo = "pricehist"; + rev = version; + hash = "sha256-RMZKp0JXQLt9tBZPkb3e/au85lV/FkRBCRYzd2lgUPc="; + }; + + propagatedBuildInputs = [ + requests + lxml + cssselect + curlify + poetry-core + ]; + + nativeCheckInputs = [ + responses + pytest-mock + pytestCheckHook + ]; + meta = with lib; { + description = "A command-line tool for fetching and formatting historical price data, with support for multiple data sources and output formats"; + homepage = "https://gitlab.com/chrisberkhout/pricehist"; + license = licenses.mit; + mainProgram = "pricehist"; + maintainers = with maintainers; [ chrpinedo ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d102f9da4272..05f454333610 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1951,6 +1951,8 @@ with pkgs; polygon-cli = callPackage ../tools/networking/polygon-cli { }; + pricehist = python3Packages.callPackage ../tools/misc/pricehist { }; + proycon-wayout = callPackage ../tools/wayland/proycon-wayout { }; q = callPackage ../tools/networking/q { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a9863e844878..f44a7c9012a4 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2392,6 +2392,8 @@ self: super: with self; { curio = callPackage ../development/python-modules/curio { }; + curlify = callPackage ../development/python-modules/curlify { }; + curtsies = callPackage ../development/python-modules/curtsies { }; curve25519-donna = callPackage ../development/python-modules/curve25519-donna { };