nixpkgs/pkgs/applications/finance/odoo/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

134 lines
2.7 KiB
Nix
Raw Normal View History

2021-11-02 00:44:47 +00:00
{ stdenv
, lib
2023-03-26 01:54:58 +00:00
, fetchFromGitHub
2021-11-02 00:44:47 +00:00
, fetchurl
2023-03-26 01:54:58 +00:00
, python310
2021-11-03 07:01:17 +00:00
, nodePackages
2021-11-02 00:44:47 +00:00
, wkhtmltopdf
2022-05-15 06:51:07 +00:00
, nixosTests
2021-11-02 00:44:47 +00:00
}:
2022-02-01 12:25:06 +00:00
let
2023-03-26 01:54:58 +00:00
python = python310.override {
2022-05-15 03:52:41 +00:00
packageOverrides = self: super: {
2023-03-26 01:54:58 +00:00
pypdf2 = super.pypdf2.overridePythonAttrs (old: rec {
version = "1.28.6";
format = "setuptools";
src = fetchFromGitHub {
owner = "py-pdf";
repo = "pypdf";
rev = version;
fetchSubmodules = true;
hash = "sha256-WnRbsy/PJcotZqY9mJPLadrYqkXykOVifLIbDyNf4s4=";
2022-05-15 03:52:41 +00:00
};
2023-03-26 01:54:58 +00:00
nativeBuildInputs = [];
nativeCheckInputs = with self; [ pytestCheckHook pillow ];
2022-05-15 03:52:41 +00:00
});
flask = super.flask.overridePythonAttrs (old: rec {
2023-03-26 01:54:58 +00:00
version = "2.1.3";
2022-05-15 03:52:41 +00:00
src = old.src.override {
inherit version;
2023-03-26 01:54:58 +00:00
hash = "sha256-FZcuUBffBXXD1sCQuhaLbbkCWeYgrI1+qBOjlrrVtss=";
2022-05-15 03:52:41 +00:00
};
});
werkzeug = super.werkzeug.overridePythonAttrs (old: rec {
2023-03-26 01:54:58 +00:00
version = "2.1.2";
2022-05-15 03:52:41 +00:00
src = old.src.override {
inherit version;
2023-03-26 01:54:58 +00:00
hash = "sha256-HOCOgJPtZ9Y41jh5/Rujc1gX96gN42dNKT9ZhPJftuY=";
2022-05-15 03:52:41 +00:00
};
});
};
};
2021-11-02 00:44:47 +00:00
2022-05-15 06:46:30 +00:00
odoo_version = "15.0";
2023-03-26 01:54:58 +00:00
odoo_release = "20230317";
in python.pkgs.buildPythonApplication rec {
pname = "odoo";
2022-05-15 06:46:30 +00:00
version = "${odoo_version}.${odoo_release}";
2021-11-02 00:44:47 +00:00
2022-05-15 03:52:41 +00:00
format = "setuptools";
2021-11-02 00:44:47 +00:00
# latest release is at https://github.com/odoo/docker/blob/master/15.0/Dockerfile
src = fetchurl {
2022-05-15 06:46:30 +00:00
url = "https://nightly.odoo.com/${odoo_version}/nightly/src/odoo_${version}.tar.gz";
2021-11-02 00:44:47 +00:00
name = "${pname}-${version}";
2023-03-26 01:54:58 +00:00
hash = "sha256-nJEFPtZhq7DLLDCL9xt0RV75d/a45o6hBKsUlQAWh1U="; # odoo
2021-11-02 00:44:47 +00:00
};
2023-03-26 01:54:58 +00:00
unpackPhase = ''
tar xfz $src
cd odoo*
'';
2021-11-02 00:44:47 +00:00
# needs some investigation
doCheck = false;
2023-03-26 01:54:58 +00:00
makeWrapperArgs = [
"--prefix" "PATH" ":" "${lib.makeBinPath [ wkhtmltopdf nodePackages.rtlcss ]}"
];
2021-11-02 00:44:47 +00:00
2022-05-15 03:52:41 +00:00
propagatedBuildInputs = with python.pkgs; [
babel
2021-11-02 00:44:47 +00:00
chardet
decorator
docutils
ebaysdk
freezegun
gevent
greenlet
idna
jinja2
libsass
lxml
markupsafe
2021-11-30 22:18:59 +00:00
mock
2021-11-02 00:44:47 +00:00
num2words
ofxparse
passlib
pillow
polib
psutil
psycopg2
pydot
pyopenssl
pypdf2
pyserial
python-dateutil
python-ldap
2021-11-02 00:44:47 +00:00
python-stdnum
pytz
pyusb
qrcode
reportlab
requests
2023-03-26 01:54:58 +00:00
setuptools
2021-11-02 00:44:47 +00:00
vobject
2021-11-30 22:18:59 +00:00
werkzeug
2021-11-02 00:44:47 +00:00
xlrd
xlsxwriter
2021-11-02 00:44:47 +00:00
xlwt
zeep
];
2023-03-26 01:54:58 +00:00
# takes 5+ minutes and there are not files to strip
dontStrip = true;
2021-11-02 00:44:47 +00:00
2022-05-15 06:46:30 +00:00
passthru = {
updateScript = ./update.sh;
2022-05-15 06:51:07 +00:00
tests = {
inherit (nixosTests) odoo;
};
2022-05-15 06:46:30 +00:00
};
2021-11-02 00:44:47 +00:00
meta = with lib; {
description = "Open Source ERP and CRM";
homepage = "https://www.odoo.com/";
license = licenses.lgpl3Only;
2021-11-30 22:18:59 +00:00
maintainers = with maintainers; [ mkg20001 ];
2021-11-02 00:44:47 +00:00
};
}