diff --git a/pkgs/by-name/pr/pricehist/package.nix b/pkgs/by-name/pr/pricehist/package.nix index 498227b709c7..72295b65be8a 100644 --- a/pkgs/by-name/pr/pricehist/package.nix +++ b/pkgs/by-name/pr/pricehist/package.nix @@ -1,44 +1 @@ -{ - lib, - python3Packages, - fetchFromGitLab, -}: - -python3Packages.buildPythonApplication (finalAttrs: { - pname = "pricehist"; - version = "1.4.14"; - pyproject = true; - - src = fetchFromGitLab { - owner = "chrisberkhout"; - repo = "pricehist"; - tag = finalAttrs.version; - hash = "sha256-BnyoSYVjs2odnOzSpvgMF860PDkz7tPNnM0s3Fep5G0="; - }; - - pythonRelaxDeps = [ "lxml" ]; - - dependencies = with python3Packages; [ - requests - lxml - cssselect - curlify - ]; - - build-system = with python3Packages; [ - poetry-core - ]; - - nativeCheckInputs = with python3Packages; [ - responses - pytest-mock - pytestCheckHook - ]; - - meta = { - description = "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 = lib.licenses.mit; - mainProgram = "pricehist"; - }; -}) +{ python3Packages }: python3Packages.toPythonApplication python3Packages.pricehist diff --git a/pkgs/development/python-modules/pricehist/default.nix b/pkgs/development/python-modules/pricehist/default.nix new file mode 100644 index 000000000000..2f46f477fac9 --- /dev/null +++ b/pkgs/development/python-modules/pricehist/default.nix @@ -0,0 +1,51 @@ +{ + lib, + fetchFromGitLab, + buildPythonPackage, + cssselect, + curlify, + lxml, + poetry-core, + pytest-mock, + pytestCheckHook, + requests, + responses, +}: +buildPythonPackage (finalAttrs: { + pname = "pricehist"; + version = "1.4.14"; + pyproject = true; + + src = fetchFromGitLab { + owner = "chrisberkhout"; + repo = "pricehist"; + tag = finalAttrs.version; + hash = "sha256-BnyoSYVjs2odnOzSpvgMF860PDkz7tPNnM0s3Fep5G0="; + }; + + pythonRelaxDeps = [ "lxml" ]; + + dependencies = [ + requests + lxml + cssselect + curlify + ]; + + build-system = [ + poetry-core + ]; + + nativeCheckInputs = [ + responses + pytest-mock + pytestCheckHook + ]; + + meta = { + description = "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 = lib.licenses.mit; + mainProgram = "pricehist"; + }; +}) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index dcbc1af01ac1..a4772f4b1f19 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -12925,6 +12925,8 @@ self: super: with self; { price-parser = callPackage ../development/python-modules/price-parser { }; + pricehist = callPackage ../development/python-modules/pricehist { }; + primecountpy = callPackage ../development/python-modules/primecountpy { }; primepy = callPackage ../development/python-modules/primepy { };