Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
2.9 kB · 158 lines
Nix
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159{ lib, buildPythonPackage, pythonAtLeast, fetchFromGitHub,
setuptools, setuptools-scm,
certifi, filelock, isodate, lxml, numpy, openpyxl, pyparsing, python-dateutil, regex,
gui ? true, tkinter,
pycryptodome, pg8000, pymysql, pyodbc, rdflib, holidays, pytz, tinycss2, graphviz, cheroot, cherrypy, tornado,
sphinxHook, sphinx-autodoc2, myst-parser, sphinx-copybutton, furo,
pytestCheckHook, boto3,}:
buildPythonPackage rec { pname = "arelle${lib.optionalString (!gui) "-headless"}"; version = "2.30.25"; pyproject = true;
disabled = pythonAtLeast "3.13"; # Note: when updating, check if this is still needed
src = fetchFromGitHub { owner = "Arelle"; repo = "Arelle"; tag = version; hash = "sha256-xzTrFie97HDIqPZ4nzCh+0p/w0bTK12cS0FSsuIi7tY="; };
outputs = [ "out" "doc" ];
postPatch = '' substituteInPlace pyproject.toml --replace-fail \ 'requires = ["setuptools~=73.0", "wheel~=0.44", "setuptools_scm[toml]~=8.1"]' \ 'requires = ["setuptools", "wheel", "setuptools_scm[toml]"]' '';
build-system = [ setuptools setuptools-scm ];
dependencies = [ certifi filelock isodate lxml numpy openpyxl pyparsing python-dateutil regex ] ++ lib.optionals gui [ tkinter ];
optional-dependencies = { crypto = [ pycryptodome ]; db = [ pg8000 pymysql pyodbc rdflib ]; efm = [ holidays pytz ]; esef = [ tinycss2 ]; objectmaker = [ graphviz ]; webserver = [ cheroot cherrypy tornado ]; };
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 = [ pytestCheckHook boto3 ] ++ lib.flatten (lib.attrValues optional-dependencies);
preCheck = '' export HOME=$(mktemp -d) '';
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 ]; };}