2 buildPythonPackage, fetchFromGitHub, lib,
3 sphinx, lxml, isodate, numpy, openpyxl,
4 tkinter ? null, py3to2, isPy3k, python,
7 buildPythonPackage rec {
8 pname = "arelle${lib.optionalString (!gui) "-headless"}";
13 # Releases are published at http://arelle.org/download/ but sadly no
14 # tags are published on github.
15 src = fetchFromGitHub {
18 rev = "edgr${version}";
19 sha256 = "12a94ipdp6xalqyds7rcp6cjwps6fbj3byigzfy403hlqc9n1g33";
21 outputs = ["out" "doc"];
25 postPatch = "rm testParser2.py";
30 propagatedBuildInputs = [
35 ] ++ lib.optionals gui [
39 # arelle-gui is useless without gui dependencies, so delete it when !gui.
40 postInstall = lib.optionalString (!gui) ''
41 find $out/bin -name "*arelle-gui*" -delete
43 # By default, not the entirety of the src dir is copied. This means we don't
44 # copy the `images` dir, which is needed for the gui version.
45 lib.optionalString (gui) ''
46 targetDir=$out/${python.sitePackages}
47 cp -vr $src/arelle $targetDir
52 (cd apidocs && make html && cp -r _build $doc)
63 An open source facility for XBRL, the eXtensible Business Reporting
64 Language supporting various standards, exposed through a Python or
65 REST API'' + lib.optionalString gui " and a graphical user interface";
66 homepage = "http://arelle.org/";
67 license = licenses.asl20;
68 platforms = platforms.all;
69 maintainers = with maintainers; [ roberth ];