{ lib, fetchzip, python311, rtlcss, wkhtmltopdf, nixosTests, }: let odoo_version = "16.0"; odoo_release = "20250506"; python = python311.override { self = python; }; in python.pkgs.buildPythonApplication rec { pname = "odoo"; version = "${odoo_version}.${odoo_release}"; format = "setuptools"; # latest release is at https://github.com/odoo/docker/blob/master/16.0/Dockerfile src = fetchzip { url = "https://nightly.odoo.com/${odoo_version}/nightly/src/odoo_${version}.zip"; name = "odoo-${version}"; hash = "sha256-dBqRZ3cf4/udP9hm+u9zhuUCkH176uG2NPAy5sujyNc="; # odoo }; patches = [ ./fix-test.patch ]; makeWrapperArgs = [ "--prefix" "PATH" ":" "${lib.makeBinPath [ wkhtmltopdf rtlcss ]}" ]; propagatedBuildInputs = with python.pkgs; [ babel chardet cryptography decorator docutils ebaysdk freezegun gevent greenlet idna jinja2 libsass lxml lxml-html-clean markupsafe num2words ofxparse passlib pillow polib psutil psycopg2 pydot pyopenssl pypdf2 pyserial python-dateutil python-ldap python-stdnum pytz pyusb qrcode reportlab requests urllib3 vobject werkzeug xlrd xlsxwriter xlwt zeep setuptools mock ]; # takes 5+ minutes and there are not files to strip dontStrip = true; passthru = { updateScript = ./update.sh; tests = { inherit (nixosTests) odoo16; }; }; meta = { description = "Open Source ERP and CRM"; homepage = "https://www.odoo.com/"; license = lib.licenses.lgpl3Only; maintainers = with lib.maintainers; [ mkg20001 ]; }; }