Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 128 lines 2.6 kB view raw
1{ 2 lib, 3 fetchgit, 4 fetchzip, 5 fetchpatch2, 6 python311, 7 rtlcss, 8 wkhtmltopdf, 9 nixosTests, 10}: 11 12let 13 odoo_version = "17.0"; 14 odoo_release = "20250506"; 15 python = python311.override { 16 self = python; 17 packageOverrides = final: prev: { 18 # requirements.txt fixes docutils at 0.17; the default 0.21.1 tested throws exceptions 19 docutils-0_17 = prev.docutils.overridePythonAttrs (old: rec { 20 version = "0.17"; 21 src = fetchgit { 22 url = "git://repo.or.cz/docutils.git"; 23 rev = "docutils-${version}"; 24 hash = "sha256-O/9q/Dg1DBIxKdNBOhDV16yy5ez0QANJYMjeovDoWX8="; 25 }; 26 buildInputs = with prev; [ setuptools ]; 27 }); 28 }; 29 }; 30in 31python.pkgs.buildPythonApplication rec { 32 pname = "odoo"; 33 version = "${odoo_version}.${odoo_release}"; 34 35 format = "setuptools"; 36 37 # latest release is at https://github.com/odoo/docker/blob/master/17.0/Dockerfile 38 src = fetchzip { 39 url = "https://nightly.odoo.com/${odoo_version}/nightly/src/odoo_${version}.zip"; 40 name = "odoo-${version}"; 41 hash = "sha256-V15Oe3AOBJ1agt5WmpFZnC7EkyoKyxTH8Iqdf2/9aec="; # odoo 42 }; 43 patches = [ 44 (fetchpatch2 { 45 url = "https://github.com/odoo/odoo/commit/ade3200e8138a9c28eb9b294a4efd2753a8e5591.patch?full_index=1"; 46 hash = "sha256-EFKjrR38eg9bxlNmRNoLSXem+MjQKqPcR3/mSgs0cDs="; 47 }) 48 ]; 49 50 makeWrapperArgs = [ 51 "--prefix" 52 "PATH" 53 ":" 54 "${lib.makeBinPath [ 55 wkhtmltopdf 56 rtlcss 57 ]}" 58 ]; 59 60 propagatedBuildInputs = with python.pkgs; [ 61 babel 62 chardet 63 cryptography 64 decorator 65 docutils-0_17 # sphinx has a docutils requirement >= 18 66 ebaysdk 67 freezegun 68 geoip2 69 gevent 70 greenlet 71 idna 72 jinja2 73 libsass 74 lxml 75 lxml-html-clean 76 markupsafe 77 num2words 78 ofxparse 79 passlib 80 pillow 81 polib 82 psutil 83 psycopg2 84 pydot 85 pyopenssl 86 pypdf2 87 pyserial 88 python-dateutil 89 python-ldap 90 python-stdnum 91 pytz 92 pyusb 93 qrcode 94 reportlab 95 requests 96 rjsmin 97 urllib3 98 vobject 99 werkzeug 100 xlrd 101 xlsxwriter 102 xlwt 103 zeep 104 105 setuptools 106 mock 107 ]; 108 109 # takes 5+ minutes and there are not files to strip 110 dontStrip = true; 111 112 passthru = { 113 updateScript = ./update.sh; 114 tests = { 115 inherit (nixosTests) odoo17; 116 }; 117 }; 118 119 meta = { 120 description = "Open Source ERP and CRM"; 121 homepage = "https://www.odoo.com/"; 122 license = lib.licenses.lgpl3Only; 123 maintainers = with lib.maintainers; [ 124 mkg20001 125 siriobalmelli 126 ]; 127 }; 128}