summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2016-05-28 18:34:43 +0200
committerJörg Thalheim <joerg@higgsboson.tk>2016-10-21 23:15:32 +0200
commit213ebc94e0723869de19b4da7155cf92878d1a2a (patch)
treefab88e3e2900cb23078f9e901794094c5c0d3e9d /pkgs
parent8a37554f010717720874b95a50fba476b58b3128 (diff)
downloadnixlib-213ebc94e0723869de19b4da7155cf92878d1a2a.tar
nixlib-213ebc94e0723869de19b4da7155cf92878d1a2a.tar.gz
nixlib-213ebc94e0723869de19b4da7155cf92878d1a2a.tar.bz2
nixlib-213ebc94e0723869de19b4da7155cf92878d1a2a.tar.lz
nixlib-213ebc94e0723869de19b4da7155cf92878d1a2a.tar.xz
nixlib-213ebc94e0723869de19b4da7155cf92878d1a2a.tar.zst
nixlib-213ebc94e0723869de19b4da7155cf92878d1a2a.zip
fava: init at 1.0
fixes #15785
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/office/fava/default.nix45
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/applications/office/fava/default.nix b/pkgs/applications/office/fava/default.nix
new file mode 100644
index 000000000000..5ed7d25667ea
--- /dev/null
+++ b/pkgs/applications/office/fava/default.nix
@@ -0,0 +1,45 @@
+{ stdenv, pkgs, fetchurl, python3Packages, fetchFromGitHub, fetchzip, python3, beancount }:
+
+python3Packages.buildPythonApplication rec {
+  version = "1.0";
+  name = "fava-${version}";
+
+  src = fetchFromGitHub {
+    owner = "aumayr";
+    repo = "fava";
+    rev = "v${version}";
+    sha256 = "0dm4x6z80m04r9qa55psvz7f41qnh13hnj2qhvxkrk22yqmkqrka";
+  };
+
+  assets = fetchzip {
+    url = "https://github.com/aumayr/fava/releases/download/v${version}/beancount-fava-${version}.tar.gz";
+    sha256 = "1vvidwfn5882dslz6qqkkd84m7w52kd34x10qph8yhipyjv1dimc";
+  };
+
+  buildInputs = with python3Packages; [ pytest_30 ];
+
+  checkPhase = ''
+    # pyexcel is optional
+    # the other 2 tests fail due non-unicode locales
+    PATH=$out/bin:$PATH pytest tests \
+      --ignore tests/test_util_excel.py \
+      --ignore tests/test_cli.py \
+      --ignore tests/test_translations.py \
+  '';
+
+  postInstall = ''
+    cp -r $assets/fava/static/gen $out/${python3.sitePackages}/fava/static
+  '';
+
+  propagatedBuildInputs = with python3Packages;
+    [ flask dateutil pygments wheel markdown2 flaskbabel tornado
+      click beancount ];
+
+  meta = {
+    homepage = https://github.com/aumayr/fava;
+    description = "Web interface for beancount";
+    license = stdenv.lib.licenses.mit;
+    maintainers = with stdenv.lib.maintainers; [ matthiasbeyer ];
+  };
+}
+
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 3d4985231ede..75729fcdd226 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -15469,6 +15469,8 @@ in
 
   fairymax = callPackage ../games/fairymax {};
 
+  fava = callPackage ../applications/office/fava {};
+
   fish-fillets-ng = callPackage ../games/fish-fillets-ng {};
 
   flightgear = qt5.callPackage ../games/flightgear { };