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"}";
10 format = "setuptools";
14 # Releases are published at http://arelle.org/download/ but sadly no
15 # tags are published on github.
16 src = fetchFromGitHub {
19 rev = "edgr${version}";
20 sha256 = "12a94ipdp6xalqyds7rcp6cjwps6fbj3byigzfy403hlqc9n1g33";
22 outputs = ["out" "doc"];
26 postPatch = "rm testParser2.py";
31 propagatedBuildInputs = [
36 ] ++ lib.optionals gui [
40 # arelle-gui is useless without gui dependencies, so delete it when !gui.
41 postInstall = lib.optionalString (!gui) ''
42 find $out/bin -name "*arelle-gui*" -delete
44 # By default, not the entirety of the src dir is copied. This means we don't
45 # copy the `images` dir, which is needed for the gui version.
46 lib.optionalString (gui) ''
47 targetDir=$out/${python.sitePackages}
48 cp -vr $src/arelle $targetDir
53 (cd apidocs && make html && cp -r _build $doc)
64 An open source facility for XBRL, the eXtensible Business Reporting
65 Language supporting various standards, exposed through a Python or
66 REST API'' + lib.optionalString gui " and a graphical user interface";
67 mainProgram = "arelle";
68 homepage = "http://arelle.org/";
69 license = licenses.asl20;
70 platforms = platforms.all;
71 maintainers = with maintainers; [ roberth ];