push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
diff --git a/odoo/http.py b/odoo/http.py
index f26dd52db235c..9689fc894b2b1 100644
--- a/odoo/http.py
+++ b/odoo/http.py
@@ -117,6 +117,7 @@
import glob
import hashlib
import hmac
+import importlib.metadata
import inspect
import json
import logging
@@ -256,7 +257,7 @@ def get_default_session():
'alias', 'host', 'methods',
}
-if parse_version(werkzeug.__version__) >= parse_version('2.0.2'):
+if parse_version(importlib.metadata.version('werkzeug')) >= parse_version('2.0.2'):
# Werkzeug 2.0.2 adds the websocket option. If a websocket request
# (ws/wss) is trying to access an HTTP route, a WebsocketMismatch
# exception is raised. On the other hand, Werkzeug 0.16 does not

View File

@@ -0,0 +1,105 @@
{
lib,
fetchzip,
python311,
rtlcss,
wkhtmltopdf,
nixosTests,
}:
let
odoo_version = "16.0";
odoo_release = "20250506";
python = python311.override {
self = python;
};
in
python.pkgs.buildPythonApplication rec {
pname = "odoo";
version = "${odoo_version}.${odoo_release}";
format = "setuptools";
# latest release is at https://github.com/odoo/docker/blob/master/16.0/Dockerfile
src = fetchzip {
url = "https://nightly.odoo.com/${odoo_version}/nightly/src/odoo_${version}.zip";
name = "odoo-${version}";
hash = "sha256-dBqRZ3cf4/udP9hm+u9zhuUCkH176uG2NPAy5sujyNc="; # odoo
};
patches = [ ./fix-test.patch ];
makeWrapperArgs = [
"--prefix"
"PATH"
":"
"${lib.makeBinPath [
wkhtmltopdf
rtlcss
]}"
];
propagatedBuildInputs = with python.pkgs; [
babel
chardet
cryptography
decorator
docutils
ebaysdk
freezegun
gevent
greenlet
idna
jinja2
libsass
lxml
lxml-html-clean
markupsafe
num2words
ofxparse
passlib
pillow
polib
psutil
psycopg2
pydot
pyopenssl
pypdf2
pyserial
python-dateutil
python-ldap
python-stdnum
pytz
pyusb
qrcode
reportlab
requests
urllib3
vobject
werkzeug
xlrd
xlsxwriter
xlwt
zeep
setuptools
mock
];
# takes 5+ minutes and there are not files to strip
dontStrip = true;
passthru = {
updateScript = ./update.sh;
tests = {
inherit (nixosTests) odoo16;
};
};
meta = {
description = "Open Source ERP and CRM";
homepage = "https://www.odoo.com/";
license = lib.licenses.lgpl3Only;
maintainers = with lib.maintainers; [ mkg20001 ];
};
}

View File

@@ -0,0 +1,32 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl gnused nix coreutils nix-prefetch
# shellcheck shell=bash
set -euo pipefail
SCRIPT_DIR="$(dirname "${BASH_SOURCE[0]}")"
PKG=$(basename "$SCRIPT_DIR")
LATEST="18" # increment manually
VERSION="${PKG/#odoo}"
VERSION="${VERSION:-$LATEST}.0"
RELEASE="$(
curl "https://nightly.odoo.com/$VERSION/nightly/src/" |
sed -nE 's/.*odoo_'"$VERSION"'.(20[0-9]{6}).tar.gz.*/\1/p' |
tail -n 1
)"
latestVersion="$VERSION.$RELEASE"
currentVersion=$(nix-instantiate --eval -E "with import ./. {}; $PKG.version or (lib.getVersion $PKG)" | tr -d '"')
if [[ "$currentVersion" == "$latestVersion" ]]; then
echo "$PKG is up-to-date: $currentVersion"
exit 0
fi
cd "$SCRIPT_DIR"
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