lol

odoo15: init at 15.0-20230720

This contribution adds `odoo15` as a fixed version. To allow reusing the
existing test for Odoo, I made the package attribute configurable. To
reference the test for `odoo15` in `passthru` I added it to
`all-tests.nix`.

+132 -1
+1
nixos/tests/all-tests.nix
··· 349 349 invidious = handleTest ./invidious.nix {}; 350 350 oci-containers = handleTestOn ["aarch64-linux" "x86_64-linux"] ./oci-containers.nix {}; 351 351 odoo = handleTest ./odoo.nix {}; 352 + odoo15 = handleTest ./odoo.nix { package = pkgs.odoo15; }; 352 353 # 9pnet_virtio used to mount /nix partition doesn't support 353 354 # hibernation. This test happens to work on x86_64-linux but 354 355 # not on other platforms.
+2 -1
nixos/tests/odoo.nix
··· 1 - import ./make-test-python.nix ({ pkgs, lib, ...} : { 1 + import ./make-test-python.nix ({ pkgs, lib, package ? pkgs.odoo, ...} : { 2 2 name = "odoo"; 3 3 meta.maintainers = with lib.maintainers; [ mkg20001 ]; 4 4 ··· 11 11 12 12 services.odoo = { 13 13 enable = true; 14 + package = package; 14 15 domain = "localhost"; 15 16 }; 16 17 };
+128
pkgs/applications/finance/odoo/odoo15.nix
··· 1 + { stdenv, lib, fetchFromGitHub, fetchurl, python310, nodePackages, wkhtmltopdf 2 + , nixosTests }: 3 + 4 + let 5 + python = python310.override { 6 + packageOverrides = self: super: { 7 + pypdf2 = super.pypdf2.overridePythonAttrs (old: rec { 8 + version = "1.28.6"; 9 + format = "setuptools"; 10 + 11 + src = fetchFromGitHub { 12 + owner = "py-pdf"; 13 + repo = "pypdf"; 14 + rev = version; 15 + fetchSubmodules = true; 16 + hash = "sha256-WnRbsy/PJcotZqY9mJPLadrYqkXykOVifLIbDyNf4s4="; 17 + }; 18 + 19 + nativeBuildInputs = [ ]; 20 + 21 + nativeCheckInputs = with self; [ pytestCheckHook pillow ]; 22 + }); 23 + flask = super.flask.overridePythonAttrs (old: rec { 24 + version = "2.1.3"; 25 + src = old.src.override { 26 + inherit version; 27 + hash = "sha256-FZcuUBffBXXD1sCQuhaLbbkCWeYgrI1+qBOjlrrVtss="; 28 + }; 29 + }); 30 + werkzeug = super.werkzeug.overridePythonAttrs (old: rec { 31 + version = "2.1.2"; 32 + src = old.src.override { 33 + inherit version; 34 + hash = "sha256-HOCOgJPtZ9Y41jh5/Rujc1gX96gN42dNKT9ZhPJftuY="; 35 + }; 36 + }); 37 + }; 38 + }; 39 + 40 + odoo_version = "15.0"; 41 + odoo_release = "20230720"; 42 + in python.pkgs.buildPythonApplication rec { 43 + pname = "odoo15"; 44 + version = "${odoo_version}.${odoo_release}"; 45 + 46 + format = "setuptools"; 47 + 48 + # latest release is at https://github.com/odoo/docker/blob/master/15.0/Dockerfile 49 + src = fetchurl { 50 + url = 51 + "https://nightly.odoo.com/${odoo_version}/nightly/src/odoo_${version}.tar.gz"; 52 + name = "${pname}-${version}"; 53 + hash = "sha256-XH4cN2OrPvMjN3VcDJFxCacNxKkrN65jwhUN1dnGwgo="; # odoo 54 + }; 55 + 56 + unpackPhase = '' 57 + tar xfz $src 58 + cd odoo* 59 + ''; 60 + 61 + # needs some investigation 62 + doCheck = false; 63 + 64 + makeWrapperArgs = [ 65 + "--prefix" 66 + "PATH" 67 + ":" 68 + "${lib.makeBinPath [ wkhtmltopdf nodePackages.rtlcss ]}" 69 + ]; 70 + 71 + propagatedBuildInputs = with python.pkgs; [ 72 + babel 73 + chardet 74 + decorator 75 + docutils 76 + ebaysdk 77 + freezegun 78 + gevent 79 + greenlet 80 + idna 81 + jinja2 82 + libsass 83 + lxml 84 + markupsafe 85 + mock 86 + num2words 87 + ofxparse 88 + passlib 89 + pillow 90 + polib 91 + psutil 92 + psycopg2 93 + pydot 94 + pyopenssl 95 + pypdf2 96 + pyserial 97 + python-dateutil 98 + python-ldap 99 + python-stdnum 100 + pytz 101 + pyusb 102 + qrcode 103 + reportlab 104 + requests 105 + setuptools 106 + vobject 107 + werkzeug 108 + xlrd 109 + xlsxwriter 110 + xlwt 111 + zeep 112 + ]; 113 + 114 + # takes 5+ minutes and there are not files to strip 115 + dontStrip = true; 116 + 117 + passthru = { 118 + updateScript = ./update.sh; 119 + tests = { inherit (nixosTests) odoo15; }; 120 + }; 121 + 122 + meta = with lib; { 123 + description = "Open Source ERP and CRM"; 124 + homepage = "https://www.odoo.com/"; 125 + license = licenses.lgpl3Only; 126 + maintainers = with maintainers; [ mkg20001 ]; 127 + }; 128 + }
+1
pkgs/top-level/all-packages.nix
··· 6091 6091 }; 6092 6092 6093 6093 odoo = callPackage ../applications/finance/odoo { }; 6094 + odoo15 = callPackage ../applications/finance/odoo/odoo15.nix { }; 6094 6095 6095 6096 odafileconverter = libsForQt5.callPackage ../applications/graphics/odafileconverter { }; 6096 6097