nixpkgs/pkgs/development/python-modules/arelle/default.nix

59 lines
1.5 KiB
Nix
Raw Normal View History

2017-06-21 11:49:21 +01:00
{ gui ? true,
buildPythonPackage, fetchFromGitHub, lib,
sphinx_1_2, lxml, isodate, numpy, pytest,
2017-09-15 20:59:12 +01:00
tkinter ? null, py3to2, isPy3k,
2017-06-21 11:49:21 +01:00
... }:
2017-09-15 20:59:12 +01:00
buildPythonPackage rec {
name = "arelle-${version}${lib.optionalString (!gui) "-headless"}";
version = "2017-08-24";
disabled = !isPy3k;
2017-06-21 11:49:21 +01:00
# Releases are published at http://arelle.org/download/ but sadly no
# tags are published on github.
src = fetchFromGitHub {
owner = "Arelle";
repo = "Arelle";
2017-09-15 20:59:12 +01:00
rev = "cb24e35d57b562a864ae3dd4542c4d9fcf3865fe";
sha256 = "1sbvhb3xlfnyvf1xj9dxwpcrfiaf7ikkdwvvap7aaxfxgiz85ip2";
2017-06-21 11:49:21 +01:00
};
outputs = ["out" "doc"];
2017-09-15 20:59:12 +01:00
patches = [
./tests.patch
];
2017-06-21 11:49:21 +01:00
postPatch = "rm testParser2.py";
buildInputs = [
sphinx_1_2
pytest
2017-09-14 19:28:29 +01:00
py3to2
2017-06-21 11:49:21 +01:00
];
propagatedBuildInputs = [
lxml
isodate
numpy
] ++ lib.optional gui [
tkinter
];
# arelle-gui is useless without gui dependencies, so delete it when !gui.
postInstall = lib.optionalString (!gui) ''
find $out/bin -name "*arelle-gui*" -delete
'';
# Documentation
postBuild = ''
(cd apidocs && make html && cp -r _build $doc)
'';
2017-09-15 20:59:12 +01:00
doCheck = if gui then true else false;
2017-06-21 11:49:21 +01:00
meta = {
description = "An open source facility for XBRL, the eXtensible Business Reporting Language supporting various standards, exposed through a python or REST API" + lib.optionalString gui " and a graphical user interface";
homepage = http://arelle.org/;
license = lib.licenses.asl20;
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ roberth ];
};
}