odoo: 18.0 -> 19.0
Bump Odoo from the previous version 18.0-nightly to 19.0-nightly. Refines the Python runtime dependencies for Odoo 19.0-nightly: - Re-align `propagatedBuildInputs` with the upstream `requirements.txt`. - Adding `cbor2` and `asn1crypto`, which were found to be essential runtime dependencies for the `auth_passkey` (WebAuthn) module after end-to-end testing. Keep odoo 18.0 as odoo18
This commit is contained in:
@@ -8,8 +8,8 @@
|
||||
}:
|
||||
|
||||
let
|
||||
odoo_version = "18.0";
|
||||
odoo_release = "20250506";
|
||||
odoo_version = "19.0";
|
||||
odoo_release = "20260104";
|
||||
python = python312.override {
|
||||
self = python;
|
||||
};
|
||||
@@ -24,7 +24,7 @@ python.pkgs.buildPythonApplication rec {
|
||||
# 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 = "odoo-${version}";
|
||||
hash = "sha256-rNG0He+51DnRT5g1SovGZ9uiE1HWXtcmAybcadBMjY4="; # odoo
|
||||
hash = "sha256-JsbJ39zPZm4eyRTXkvdCMHwYaA08yUxZXcLglRn3kWs="; # odoo
|
||||
};
|
||||
|
||||
makeWrapperArgs = [
|
||||
@@ -38,13 +38,13 @@ python.pkgs.buildPythonApplication rec {
|
||||
];
|
||||
|
||||
propagatedBuildInputs = with python.pkgs; [
|
||||
asn1crypto
|
||||
babel
|
||||
cbor2
|
||||
chardet
|
||||
cryptography
|
||||
decorator
|
||||
docutils
|
||||
distutils
|
||||
ebaysdk
|
||||
docutils
|
||||
freezegun
|
||||
geoip2
|
||||
gevent
|
||||
@@ -62,7 +62,6 @@ python.pkgs.buildPythonApplication rec {
|
||||
polib
|
||||
psutil
|
||||
psycopg2
|
||||
pydot
|
||||
pyopenssl
|
||||
pypdf2
|
||||
pyserial
|
||||
@@ -82,9 +81,6 @@ python.pkgs.buildPythonApplication rec {
|
||||
xlsxwriter
|
||||
xlwt
|
||||
zeep
|
||||
|
||||
setuptools
|
||||
mock
|
||||
];
|
||||
|
||||
# takes 5+ minutes and there are not files to strip
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
{
|
||||
lib,
|
||||
fetchzip,
|
||||
python312,
|
||||
rtlcss,
|
||||
wkhtmltopdf,
|
||||
nixosTests,
|
||||
}:
|
||||
|
||||
let
|
||||
odoo_version = "18.0";
|
||||
odoo_release = "20250506";
|
||||
python = python312.override {
|
||||
self = python;
|
||||
};
|
||||
in
|
||||
python.pkgs.buildPythonApplication rec {
|
||||
pname = "odoo";
|
||||
version = "${odoo_version}.${odoo_release}";
|
||||
|
||||
format = "setuptools";
|
||||
|
||||
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 = "odoo-${version}";
|
||||
hash = "sha256-rNG0He+51DnRT5g1SovGZ9uiE1HWXtcmAybcadBMjY4="; # odoo
|
||||
};
|
||||
|
||||
makeWrapperArgs = [
|
||||
"--prefix"
|
||||
"PATH"
|
||||
":"
|
||||
"${lib.makeBinPath [
|
||||
wkhtmltopdf
|
||||
rtlcss
|
||||
]}"
|
||||
];
|
||||
|
||||
propagatedBuildInputs = with python.pkgs; [
|
||||
babel
|
||||
chardet
|
||||
cryptography
|
||||
decorator
|
||||
docutils
|
||||
distutils
|
||||
ebaysdk
|
||||
freezegun
|
||||
geoip2
|
||||
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
|
||||
rjsmin
|
||||
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) odoo;
|
||||
};
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Open Source ERP and CRM";
|
||||
homepage = "https://www.odoo.com/";
|
||||
license = lib.licenses.lgpl3Only;
|
||||
maintainers = with lib.maintainers; [
|
||||
mkg20001
|
||||
siriobalmelli
|
||||
];
|
||||
};
|
||||
}
|
||||
Executable
+32
@@ -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
|
||||
Reference in New Issue
Block a user