summary refs log tree commit diff
path: root/pkgs/tools/misc/pricehist/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/misc/pricehist/default.nix')
-rw-r--r--pkgs/tools/misc/pricehist/default.nix46
1 files changed, 46 insertions, 0 deletions
diff --git a/pkgs/tools/misc/pricehist/default.nix b/pkgs/tools/misc/pricehist/default.nix
new file mode 100644
index 00000000000..04333a29073
--- /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 ];
+  };
+}