Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 105 lines 1.8 kB view raw
1{ 2 lib, 3 fetchzip, 4 python311, 5 rtlcss, 6 wkhtmltopdf, 7 nixosTests, 8}: 9 10let 11 odoo_version = "16.0"; 12 odoo_release = "20250506"; 13 python = python311.override { 14 self = python; 15 }; 16in 17python.pkgs.buildPythonApplication rec { 18 pname = "odoo"; 19 version = "${odoo_version}.${odoo_release}"; 20 21 format = "setuptools"; 22 23 # latest release is at https://github.com/odoo/docker/blob/master/16.0/Dockerfile 24 src = fetchzip { 25 url = "https://nightly.odoo.com/${odoo_version}/nightly/src/odoo_${version}.zip"; 26 name = "odoo-${version}"; 27 hash = "sha256-dBqRZ3cf4/udP9hm+u9zhuUCkH176uG2NPAy5sujyNc="; # odoo 28 }; 29 30 patches = [ ./fix-test.patch ]; 31 32 makeWrapperArgs = [ 33 "--prefix" 34 "PATH" 35 ":" 36 "${lib.makeBinPath [ 37 wkhtmltopdf 38 rtlcss 39 ]}" 40 ]; 41 42 propagatedBuildInputs = with python.pkgs; [ 43 babel 44 chardet 45 cryptography 46 decorator 47 docutils 48 ebaysdk 49 freezegun 50 gevent 51 greenlet 52 idna 53 jinja2 54 libsass 55 lxml 56 lxml-html-clean 57 markupsafe 58 num2words 59 ofxparse 60 passlib 61 pillow 62 polib 63 psutil 64 psycopg2 65 pydot 66 pyopenssl 67 pypdf2 68 pyserial 69 python-dateutil 70 python-ldap 71 python-stdnum 72 pytz 73 pyusb 74 qrcode 75 reportlab 76 requests 77 urllib3 78 vobject 79 werkzeug 80 xlrd 81 xlsxwriter 82 xlwt 83 zeep 84 85 setuptools 86 mock 87 ]; 88 89 # takes 5+ minutes and there are not files to strip 90 dontStrip = true; 91 92 passthru = { 93 updateScript = ./update.sh; 94 tests = { 95 inherit (nixosTests) odoo16; 96 }; 97 }; 98 99 meta = { 100 description = "Open Source ERP and CRM"; 101 homepage = "https://www.odoo.com/"; 102 license = lib.licenses.lgpl3Only; 103 maintainers = with lib.maintainers; [ mkg20001 ]; 104 }; 105}