odoo: 16.0.20231024 -> 17.0.20240507

Preserve 'odoo16' on the same pattern as existing 'odoo15'

Signed-off-by: Sirio Balmelli <sirio@b-ad.ch>
This commit is contained in:
Sirio Balmelli 2024-06-19 13:35:20 +00:00
parent b906b68826
commit a972071a31
No known key found for this signature in database
GPG Key ID: 0437A96EFE4C426E
5 changed files with 135 additions and 23 deletions

View File

@ -822,3 +822,4 @@ Module System:
### Internal {#sec-release-24.05-lib-internal} ### Internal {#sec-release-24.05-lib-internal}
- `lib` now has [Readme for contributing](https://github.com/NixOS/nixpkgs/tree/master/lib#readme). - `lib` now has [Readme for contributing](https://github.com/NixOS/nixpkgs/tree/master/lib#readme).
- Some function's documentation is now written using the [accepted doc comment syntax](https://github.com/NixOS/rfcs/pull/145). - Some function's documentation is now written using the [accepted doc comment syntax](https://github.com/NixOS/rfcs/pull/145).
- `odoo` has been updated from `16.0.20231024` to `17.0.20240507`.

View File

@ -414,6 +414,7 @@ in {
pyload = handleTest ./pyload.nix {}; pyload = handleTest ./pyload.nix {};
oci-containers = handleTestOn ["aarch64-linux" "x86_64-linux"] ./oci-containers.nix {}; oci-containers = handleTestOn ["aarch64-linux" "x86_64-linux"] ./oci-containers.nix {};
odoo = handleTest ./odoo.nix {}; odoo = handleTest ./odoo.nix {};
odoo16 = handleTest ./odoo.nix { package = pkgs.odoo16; };
odoo15 = handleTest ./odoo.nix { package = pkgs.odoo15; }; odoo15 = handleTest ./odoo.nix { package = pkgs.odoo15; };
# 9pnet_virtio used to mount /nix partition doesn't support # 9pnet_virtio used to mount /nix partition doesn't support
# hibernation. This test happens to work on x86_64-linux but # hibernation. This test happens to work on x86_64-linux but

View File

@ -1,5 +1,6 @@
{ stdenv { stdenv
, lib , lib
, fetchgit
, fetchzip , fetchzip
, python310 , python310
, rtlcss , rtlcss
@ -9,40 +10,31 @@
let let
python = python310.override { python = python310.override {
packageOverrides = self: super: { packageOverrides = final: prev: {
flask = super.flask.overridePythonAttrs (old: rec { # requirements.txt fixes docutils at 0.17; the default 0.21.1 tested throws exceptions
version = "2.3.3"; docutils-0_17 = prev.docutils.overridePythonAttrs (old: rec {
src = old.src.override { version = "0.17";
inherit version; src = fetchgit {
hash = "sha256-CcNHqSqn/0qOfzIGeV8w2CZlS684uHPQdEzVccpgnvw="; url = "git://repo.or.cz/docutils.git";
rev = "docutils-${version}";
hash = "sha256-O/9q/Dg1DBIxKdNBOhDV16yy5ez0QANJYMjeovDoWX8=";
}; };
}); buildInputs = with prev; [setuptools];
werkzeug = super.werkzeug.overridePythonAttrs (old: rec {
version = "2.3.7";
src = old.src.override {
inherit version;
hash = "sha256-K4wORHtLnbzIXdl7butNy69si2w74L1lTiVVPgohV9g=";
};
disabledTests = old.disabledTests ++ [
"test_response_body"
];
}); });
}; };
}; };
odoo_version = "17.0";
odoo_version = "16.0"; odoo_release = "20240507";
odoo_release = "20231024";
in python.pkgs.buildPythonApplication rec { in python.pkgs.buildPythonApplication rec {
pname = "odoo"; pname = "odoo";
version = "${odoo_version}.${odoo_release}"; version = "${odoo_version}.${odoo_release}";
format = "setuptools"; format = "setuptools";
# latest release is at https://github.com/odoo/docker/blob/master/16.0/Dockerfile
src = fetchzip { src = fetchzip {
url = "https://nightly.odoo.com/${odoo_version}/nightly/src/odoo_${version}.zip"; url = "https://nightly.odoo.com/${odoo_version}/nightly/src/odoo_${version}.zip";
name = "${pname}-${version}"; name = "${pname}-${version}";
hash = "sha256-Ux8RfA7kWLKissBBY5wrfL+aKKw++5BxjP3Vw0JAOsk="; # odoo hash = "sha256-WdJBs1YgJhHmD+ip6UU2pwXrcZCsbjgOGjrZTRFQBFw="; # odoo
}; };
# needs some investigation # needs some investigation
@ -57,7 +49,7 @@ in python.pkgs.buildPythonApplication rec {
chardet chardet
cryptography cryptography
decorator decorator
docutils docutils-0_17 # sphinx has a docutils requirement >= 18
ebaysdk ebaysdk
freezegun freezegun
gevent gevent
@ -86,6 +78,7 @@ in python.pkgs.buildPythonApplication rec {
qrcode qrcode
reportlab reportlab
requests requests
rjsmin
urllib3 urllib3
vobject vobject
werkzeug werkzeug
@ -112,6 +105,6 @@ in python.pkgs.buildPythonApplication rec {
description = "Open Source ERP and CRM"; description = "Open Source ERP and CRM";
homepage = "https://www.odoo.com/"; homepage = "https://www.odoo.com/";
license = licenses.lgpl3Only; license = licenses.lgpl3Only;
maintainers = with maintainers; [ mkg20001 ]; maintainers = with maintainers; [ mkg20001 siriobalmelli ];
}; };
} }

View File

@ -0,0 +1,116 @@
{ stdenv
, lib
, fetchzip
, python310
, rtlcss
, wkhtmltopdf
, nixosTests
}:
let
python = python310.override {
packageOverrides = self: super: {
flask = super.flask.overridePythonAttrs (old: rec {
version = "2.3.3";
src = old.src.override {
inherit version;
hash = "sha256-CcNHqSqn/0qOfzIGeV8w2CZlS684uHPQdEzVccpgnvw=";
};
});
werkzeug = super.werkzeug.overridePythonAttrs (old: rec {
version = "2.3.7";
src = old.src.override {
inherit version;
hash = "sha256-K4wORHtLnbzIXdl7butNy69si2w74L1lTiVVPgohV9g=";
};
disabledTests = old.disabledTests ++ [
"test_response_body"
];
});
};
};
odoo_version = "16.0";
odoo_release = "20231024";
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 = "${pname}-${version}";
hash = "sha256-Ux8RfA7kWLKissBBY5wrfL+aKKw++5BxjP3Vw0JAOsk="; # odoo
};
# needs some investigation
doCheck = false;
makeWrapperArgs = [
"--prefix" "PATH" ":" "${lib.makeBinPath [ wkhtmltopdf rtlcss ]}"
];
propagatedBuildInputs = with python.pkgs; [
babel
chardet
cryptography
decorator
docutils
ebaysdk
freezegun
gevent
greenlet
idna
jinja2
libsass
lxml
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 = {
tests = {
inherit (nixosTests) odoo;
};
};
meta = with lib; {
description = "Open Source ERP and CRM";
homepage = "https://www.odoo.com/";
license = licenses.lgpl3Only;
maintainers = with maintainers; [ mkg20001 ];
};
}

View File

@ -5969,6 +5969,7 @@ with pkgs;
}; };
odoo = callPackage ../applications/finance/odoo { }; odoo = callPackage ../applications/finance/odoo { };
odoo16 = callPackage ../applications/finance/odoo/odoo16.nix { };
odoo15 = callPackage ../applications/finance/odoo/odoo15.nix { }; odoo15 = callPackage ../applications/finance/odoo/odoo15.nix { };
odafileconverter = libsForQt5.callPackage ../applications/graphics/odafileconverter { }; odafileconverter = libsForQt5.callPackage ../applications/graphics/odafileconverter { };