2016-05-28 16:34:43 +00:00
|
|
|
{ stdenv, pkgs, fetchurl, python3Packages, fetchFromGitHub, fetchzip, python3, beancount }:
|
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
2017-11-03 21:40:44 +00:00
|
|
|
version = "1.5";
|
2016-05-28 16:34:43 +00:00
|
|
|
name = "fava-${version}";
|
|
|
|
|
2017-04-13 14:29:26 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "beancount";
|
|
|
|
repo = "fava";
|
|
|
|
rev = "v${version}";
|
2017-11-03 21:40:44 +00:00
|
|
|
sha256 = "03wgggc2lzma1d57l1l4z8q7dsqxlg90alg2p1734jhavskfqw63";
|
2016-05-28 16:34:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
assets = fetchzip {
|
2017-04-13 14:29:26 +00:00
|
|
|
url = "https://github.com/beancount/fava/releases/download/v${version}/fava-${version}.tar.gz";
|
|
|
|
sha256 = "0yn2psbn436g1w5ixn94z8ca6dfd54izg98979arn0k7slpiccvz";
|
2016-05-28 16:34:43 +00:00
|
|
|
};
|
|
|
|
|
2017-08-25 15:38:35 +00:00
|
|
|
checkInputs = with python3Packages; [ pytest ];
|
2016-05-28 16:34:43 +00:00
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|