odoo: update to 18.0, enable tests

Co-authored-by: Robert Schütz <github@dotlambda.de>
Signed-off-by: phanirithvij <phanirithvij2000@gmail.com>
This commit is contained in:
Phani Rithvij
2024-10-23 10:22:20 +05:30
committed by phanirithvij
co-authored by Robert Schütz
parent a1a6f4a1fb
commit 90f8329a38
2 changed files with 13 additions and 26 deletions
+8 -22
View File
@@ -1,29 +1,17 @@
{ lib
, fetchgit
, fetchzip
, python310
, python312
, rtlcss
, wkhtmltopdf
, nixosTests
, odoo_version ? "17.0"
, odoo_release ? "20240610"
}:
let
python = python310.override {
odoo_version = "18.0";
odoo_release = "20241010";
python = python312.override {
self = python;
packageOverrides = final: prev: {
# requirements.txt fixes docutils at 0.17; the default 0.21.1 tested throws exceptions
docutils-0_17 = prev.docutils.overridePythonAttrs (old: rec {
version = "0.17";
src = fetchgit {
url = "git://repo.or.cz/docutils.git";
rev = "docutils-${version}";
hash = "sha256-O/9q/Dg1DBIxKdNBOhDV16yy5ez0QANJYMjeovDoWX8=";
};
buildInputs = with prev; [setuptools];
});
};
};
in python.pkgs.buildPythonApplication rec {
pname = "odoo";
@@ -34,13 +22,10 @@ in python.pkgs.buildPythonApplication rec {
src = fetchzip {
# find latest version on https://nightly.odoo.com/${odoo_version}/nightly/src
url = "https://nightly.odoo.com/${odoo_version}/nightly/src/odoo_${version}.zip";
name = "${pname}-${version}";
hash = "sha256-blibGJyaz+MxMazOXhPbGBAJWZoGubirwSnjVYyLBJs="; # odoo
name = "odoo-${version}";
hash = "sha256-TUfLyB0m8XyEiS493Q/ECgSJutAd1rtWX93f3mwfOK0="; # odoo
};
# needs some investigation
doCheck = false;
makeWrapperArgs = [
"--prefix" "PATH" ":" "${lib.makeBinPath [ wkhtmltopdf rtlcss ]}"
];
@@ -50,7 +35,8 @@ in python.pkgs.buildPythonApplication rec {
chardet
cryptography
decorator
docutils-0_17 # sphinx has a docutils requirement >= 18
docutils
distutils
ebaysdk
freezegun
geoip2
+5 -4
View File
@@ -3,7 +3,8 @@
set -euo pipefail
VERSION="17.0" # must be incremented manually
VERSION="${1:-18.0}" # must be incremented manually
echo $VERSION
RELEASE="$(
curl "https://nightly.odoo.com/$VERSION/nightly/src/" |
@@ -21,6 +22,6 @@ fi
cd "$(dirname "${BASH_SOURCE[0]}")"
sed -ri "s| hash.+ # odoo| hash = \"$(nix-prefetch -q fetchzip --url "https://nightly.odoo.com/${VERSION}/nightly/src/odoo_${latestVersion}.zip")\"; # odoo|g" package.nix
sed -ri "s|, odoo_version \? .+|, odoo_version ? \"$VERSION\"|" package.nix
sed -ri "s|, odoo_release \? .+|, odoo_release ? \"$RELEASE\"|" package.nix
sed -ri "s| hash.+ # odoo| hash = \"$(nix-prefetch -q fetchzip --option extra-experimental-features flakes --url "https://nightly.odoo.com/${VERSION}/nightly/src/odoo_${latestVersion}.zip")\"; # odoo|g" package.nix
sed -ri "s|odoo_version = .+;|odoo_version = \"$VERSION\"|" package.nix
sed -ri "s|odoo_release = .+;|odoo_release = \"$RELEASE\"|" package.nix