about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/office/fava
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/office/fava')
-rw-r--r--nixpkgs/pkgs/applications/office/fava/default.nix55
1 files changed, 55 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/office/fava/default.nix b/nixpkgs/pkgs/applications/office/fava/default.nix
new file mode 100644
index 000000000000..9cdc5d1b5014
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/fava/default.nix
@@ -0,0 +1,55 @@
+{ lib, python3, fetchPypi }:
+
+python3.pkgs.buildPythonApplication rec {
+  pname = "fava";
+  version = "1.27.2";
+  format = "pyproject";
+
+  src = fetchPypi {
+    inherit pname version;
+    hash = "sha256-kLQAWFHDmzsBjVMm/ZUn+TFkM52W0h0jg0wSp1tmPZQ=";
+  };
+
+  nativeBuildInputs = with python3.pkgs; [ setuptools-scm ];
+
+  propagatedBuildInputs = with python3.pkgs; [
+    babel
+    beancount
+    cheroot
+    click
+    flask
+    flask-babel
+    jaraco-functools
+    jinja2
+    markdown2
+    ply
+    simplejson
+    werkzeug
+  ];
+
+  nativeCheckInputs = with python3.pkgs; [
+    pytestCheckHook
+  ];
+
+  postPatch = ''
+    substituteInPlace pyproject.toml \
+      --replace 'setuptools_scm>=8.0' 'setuptools_scm'
+  '';
+
+  preCheck = ''
+    export HOME=$TEMPDIR
+  '';
+
+  disabledTests = [
+    # runs fava in debug mode, which tries to interpret bash wrapper as Python
+    "test_cli"
+  ];
+
+  meta = with lib; {
+    description = "Web interface for beancount";
+    homepage = "https://beancount.github.io/fava";
+    changelog = "https://beancount.github.io/fava/changelog.html";
+    license = licenses.mit;
+    maintainers = with maintainers; [ bhipple ];
+  };
+}