Something went wrong. Try again.
lol
Something went wrong. Try again.
3.2 kB · 174 lines
Nix
at master
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175{ lib, buildPythonPackage, fetchFromGitHub,
setuptools, setuptools-scm,
bottle, certifi, filelock, isodate, jaconv, jsonschema, lxml, numpy, openpyxl, pillow, pyparsing, python-dateutil, regex, truststore, typing-extensions,
gui ? true, tkinter,
aniso8601, cheroot, graphviz, holidays, matplotlib, pg8000, pycryptodome, pymysql, pyodbc, pytz, rdflib, tinycss2, tornado,
sphinxHook, sphinx-autodoc2, myst-parser, sphinx-copybutton, furo,
writableTmpDirAsHomeHook, pytestCheckHook, boto3,}:
buildPythonPackage (finalAttrs: { pname = "arelle${lib.optionalString (!gui) "-headless"}"; version = "2.38.7"; pyproject = true;
src = fetchFromGitHub { owner = "Arelle"; repo = "Arelle"; tag = finalAttrs.version; hash = "sha256-9ARMEXqoiBuAnj8hRrA1PqArmTMmRMP1BwASekOTQoc="; };
outputs = [ "out" "doc" ];
postPatch = '' substituteInPlace pyproject.toml --replace-fail \ 'requires = ["setuptools>=80.9,<81", "wheel>=0.45,<1", "setuptools_scm[toml]>=9.2,<10"]' \ 'requires = ["setuptools", "wheel", "setuptools_scm[toml]"]' '';
pythonRelaxDeps = [ "pillow" # pillow's current version is above what arelle officially supports, but it should be fine ];
build-system = [ setuptools setuptools-scm ];
dependencies = [ bottle certifi filelock isodate jaconv jsonschema lxml numpy openpyxl pillow pyparsing python-dateutil regex truststore typing-extensions ] ++ lib.optionals gui [ tkinter ];
optional-dependencies = { crypto = [ pycryptodome ]; db = [ # cx-oracle # Unfree pg8000 pymysql pyodbc rdflib ]; efm = [ aniso8601 holidays matplotlib pytz ]; esef = [ tinycss2 ]; objectmaker = [ graphviz ]; # viewer = [ ixbrl-viewer ]; # Not yet packaged webserver = [ cheroot tornado ]; xule = [ aniso8601 ]; };
nativeBuildInputs = [ # deps for docs sphinxHook sphinx-autodoc2 myst-parser sphinx-copybutton furo ];
# the arelleGUI executable doesn't work when the gui option is false postInstall = lib.optionalString (!gui) '' find $out/bin -name "*arelleGUI*" -delete '';
nativeCheckInputs = [ writableTmpDirAsHomeHook pytestCheckHook boto3 ] ++ lib.concatAttrValues finalAttrs.passthru.optional-dependencies;
disabledTestPaths = [ "tests/integration_tests" ] ++ lib.optionals (!gui) [ # these tests import tkinter "tests/unit_tests/arelle/test_updater.py" "tests/unit_tests/arelle/test_import.py" ];
meta = { description = "Open source XBRL platform"; longDescription = '' 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"}. ''; mainProgram = "arelle"; homepage = "http://arelle.org/"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ tomasajt roberth ]; };})