Skip to content

Commit 4b7c3e6

Browse files
committed
odoo17: init
Signed-off-by: phanirithvij <[email protected]>
1 parent 90f8329 commit 4b7c3e6

File tree

2 files changed

+122
-0
lines changed

2 files changed

+122
-0
lines changed

nixos/tests/all-tests.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,7 @@ in {
440440
pyload = handleTest ./pyload.nix {};
441441
oci-containers = handleTestOn ["aarch64-linux" "x86_64-linux"] ./oci-containers.nix {};
442442
odoo = handleTest ./odoo.nix {};
443+
odoo17 = handleTest ./odoo.nix { package = pkgs.odoo17; };
443444
odoo16 = handleTest ./odoo.nix { package = pkgs.odoo16; };
444445
odoo15 = handleTest ./odoo.nix { package = pkgs.odoo15; };
445446
# 9pnet_virtio used to mount /nix partition doesn't support

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

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
{
2+
lib,
3+
fetchgit,
4+
fetchzip,
5+
python310,
6+
rtlcss,
7+
wkhtmltopdf,
8+
nixosTests,
9+
}:
10+
11+
let
12+
odoo_version = "17.0";
13+
odoo_release = "20241010";
14+
python = python310.override {
15+
self = python;
16+
packageOverrides = final: prev: {
17+
# requirements.txt fixes docutils at 0.17; the default 0.21.1 tested throws exceptions
18+
docutils-0_17 = prev.docutils.overridePythonAttrs (old: rec {
19+
version = "0.17";
20+
src = fetchgit {
21+
url = "git://repo.or.cz/docutils.git";
22+
rev = "docutils-${version}";
23+
hash = "sha256-O/9q/Dg1DBIxKdNBOhDV16yy5ez0QANJYMjeovDoWX8=";
24+
};
25+
buildInputs = with prev; [ setuptools ];
26+
});
27+
};
28+
};
29+
in
30+
python.pkgs.buildPythonApplication rec {
31+
pname = "odoo";
32+
version = "${odoo_version}.${odoo_release}";
33+
34+
format = "setuptools";
35+
36+
# latest release is at https://github.com/odoo/docker/blob/master/17.0/Dockerfile
37+
src = fetchzip {
38+
url = "https://nightly.odoo.com/${odoo_version}/nightly/src/odoo_${version}.zip";
39+
name = "odoo-${version}";
40+
hash = "sha256-s4Fvzjwl2oM0V9G1WQdSoqo7kE7b8tJdluk9f7A06e8="; # odoo
41+
};
42+
43+
makeWrapperArgs = [
44+
"--prefix"
45+
"PATH"
46+
":"
47+
"${lib.makeBinPath [
48+
wkhtmltopdf
49+
rtlcss
50+
]}"
51+
];
52+
53+
propagatedBuildInputs = with python.pkgs; [
54+
babel
55+
chardet
56+
cryptography
57+
decorator
58+
docutils-0_17 # sphinx has a docutils requirement >= 18
59+
ebaysdk
60+
freezegun
61+
geoip2
62+
gevent
63+
greenlet
64+
idna
65+
jinja2
66+
libsass
67+
lxml
68+
lxml-html-clean
69+
markupsafe
70+
num2words
71+
ofxparse
72+
passlib
73+
pillow
74+
polib
75+
psutil
76+
psycopg2
77+
pydot
78+
pyopenssl
79+
pypdf2
80+
pyserial
81+
python-dateutil
82+
python-ldap
83+
python-stdnum
84+
pytz
85+
pyusb
86+
qrcode
87+
reportlab
88+
requests
89+
rjsmin
90+
urllib3
91+
vobject
92+
werkzeug
93+
xlrd
94+
xlsxwriter
95+
xlwt
96+
zeep
97+
98+
setuptools
99+
mock
100+
];
101+
102+
# takes 5+ minutes and there are not files to strip
103+
dontStrip = true;
104+
105+
passthru = {
106+
updateScript = ./update.sh;
107+
tests = {
108+
inherit (nixosTests) odoo;
109+
};
110+
};
111+
112+
meta = with lib; {
113+
description = "Open Source ERP and CRM";
114+
homepage = "https://www.odoo.com/";
115+
license = licenses.lgpl3Only;
116+
maintainers = with maintainers; [
117+
mkg20001
118+
siriobalmelli
119+
];
120+
};
121+
}

0 commit comments

Comments
 (0)