Skip to content

Commit 90f8329

Browse files
odoo: update to 18.0, enable tests
Co-authored-by: Robert Schütz <[email protected]> Signed-off-by: phanirithvij <[email protected]>
1 parent a1a6f4a commit 90f8329

File tree

2 files changed

+13
-26
lines changed

2 files changed

+13
-26
lines changed

pkgs/by-name/od/odoo/package.nix

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,17 @@
11
{ lib
22
, fetchgit
33
, fetchzip
4-
, python310
4+
, python312
55
, rtlcss
66
, wkhtmltopdf
77
, nixosTests
8-
, odoo_version ? "17.0"
9-
, odoo_release ? "20240610"
108
}:
119

1210
let
13-
python = python310.override {
11+
odoo_version = "18.0";
12+
odoo_release = "20241010";
13+
python = python312.override {
1414
self = python;
15-
packageOverrides = final: prev: {
16-
# requirements.txt fixes docutils at 0.17; the default 0.21.1 tested throws exceptions
17-
docutils-0_17 = prev.docutils.overridePythonAttrs (old: rec {
18-
version = "0.17";
19-
src = fetchgit {
20-
url = "git://repo.or.cz/docutils.git";
21-
rev = "docutils-${version}";
22-
hash = "sha256-O/9q/Dg1DBIxKdNBOhDV16yy5ez0QANJYMjeovDoWX8=";
23-
};
24-
buildInputs = with prev; [setuptools];
25-
});
26-
};
2715
};
2816
in python.pkgs.buildPythonApplication rec {
2917
pname = "odoo";
@@ -34,13 +22,10 @@ in python.pkgs.buildPythonApplication rec {
3422
src = fetchzip {
3523
# find latest version on https://nightly.odoo.com/${odoo_version}/nightly/src
3624
url = "https://nightly.odoo.com/${odoo_version}/nightly/src/odoo_${version}.zip";
37-
name = "${pname}-${version}";
38-
hash = "sha256-blibGJyaz+MxMazOXhPbGBAJWZoGubirwSnjVYyLBJs="; # odoo
25+
name = "odoo-${version}";
26+
hash = "sha256-TUfLyB0m8XyEiS493Q/ECgSJutAd1rtWX93f3mwfOK0="; # odoo
3927
};
4028

41-
# needs some investigation
42-
doCheck = false;
43-
4429
makeWrapperArgs = [
4530
"--prefix" "PATH" ":" "${lib.makeBinPath [ wkhtmltopdf rtlcss ]}"
4631
];
@@ -50,7 +35,8 @@ in python.pkgs.buildPythonApplication rec {
5035
chardet
5136
cryptography
5237
decorator
53-
docutils-0_17 # sphinx has a docutils requirement >= 18
38+
docutils
39+
distutils
5440
ebaysdk
5541
freezegun
5642
geoip2

pkgs/by-name/od/odoo/update.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
set -euo pipefail
55

6-
VERSION="17.0" # must be incremented manually
6+
VERSION="${1:-18.0}" # must be incremented manually
7+
echo $VERSION
78

89
RELEASE="$(
910
curl "https://nightly.odoo.com/$VERSION/nightly/src/" |
@@ -21,6 +22,6 @@ fi
2122

2223
cd "$(dirname "${BASH_SOURCE[0]}")"
2324

24-
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
25-
sed -ri "s|, odoo_version \? .+|, odoo_version ? \"$VERSION\"|" package.nix
26-
sed -ri "s|, odoo_release \? .+|, odoo_release ? \"$RELEASE\"|" package.nix
25+
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
26+
sed -ri "s|odoo_version = .+;|odoo_version = \"$VERSION\"|" package.nix
27+
sed -ri "s|odoo_release = .+;|odoo_release = \"$RELEASE\"|" package.nix

0 commit comments

Comments
 (0)