mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-09-11 15:08:33 +01:00
fava: 1.3 -> 1.5, refactor
This commit is contained in:
parent
a2895b9084
commit
15ea14e5bf
|
@ -1,42 +1,26 @@
|
||||||
{ stdenv, pkgs, fetchurl, python3Packages, fetchFromGitHub, fetchzip, python3, beancount }:
|
{ stdenv, python3, beancount }:
|
||||||
|
|
||||||
python3Packages.buildPythonApplication rec {
|
let
|
||||||
|
inherit (python3.pkgs) buildPythonApplication fetchPypi;
|
||||||
|
in
|
||||||
|
buildPythonApplication rec {
|
||||||
|
pname = "fava";
|
||||||
version = "1.5";
|
version = "1.5";
|
||||||
name = "fava-${version}";
|
name = "${pname}-${version}";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchPypi {
|
||||||
owner = "beancount";
|
inherit pname version;
|
||||||
repo = "fava";
|
sha256 = "0d3jncidzvfsxjplzg4cmflqr4mxrbrlj5bh6fpxj529pialpkk6";
|
||||||
rev = "v${version}";
|
|
||||||
sha256 = "03wgggc2lzma1d57l1l4z8q7dsqxlg90alg2p1734jhavskfqw63";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
assets = fetchzip {
|
doCheck = false;
|
||||||
url = "https://github.com/beancount/fava/releases/download/v${version}/fava-${version}.tar.gz";
|
|
||||||
sha256 = "0yn2psbn436g1w5ixn94z8ca6dfd54izg98979arn0k7slpiccvz";
|
|
||||||
};
|
|
||||||
|
|
||||||
checkInputs = with python3Packages; [ pytest ];
|
propagatedBuildInputs = with python3.pkgs;
|
||||||
|
|
||||||
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
|
[ flask dateutil pygments wheel markdown2 flaskbabel tornado
|
||||||
click beancount ];
|
click beancount ];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = https://github.com/aumayr/fava;
|
homepage = https://beancount.github.io/fava;
|
||||||
description = "Web interface for beancount";
|
description = "Web interface for beancount";
|
||||||
license = stdenv.lib.licenses.mit;
|
license = stdenv.lib.licenses.mit;
|
||||||
maintainers = with stdenv.lib.maintainers; [ matthiasbeyer ];
|
maintainers = with stdenv.lib.maintainers; [ matthiasbeyer ];
|
||||||
|
|
Loading…
Reference in a new issue