about summary refs log tree commit diff
path: root/pkgs/applications/finance
diff options
context:
space:
mode:
authorMaciej Krüger <mkg20001@gmail.com>2023-08-27 14:10:04 +0200
committerGitHub <noreply@github.com>2023-08-27 14:10:04 +0200
commitc3ed95307ef485a6d64bcdd9d47a092ea95cf817 (patch)
tree4bd362424434549ce984b31b4ef36ecee3f30c90 /pkgs/applications/finance
parent4525ce10b5ce3b95c0f07481e950ee5c229499fb (diff)
parent4eee509d25d5af666f05986a349ae8639c0adfcc (diff)
Merge pull request #251413 from karolinschlegel/init-odoo-v15
odoo15: init at 15.0-20230720
Diffstat (limited to 'pkgs/applications/finance')
-rw-r--r--pkgs/applications/finance/odoo/odoo15.nix128
1 files changed, 128 insertions, 0 deletions
diff --git a/pkgs/applications/finance/odoo/odoo15.nix b/pkgs/applications/finance/odoo/odoo15.nix
new file mode 100644
index 0000000000000..1ed0cf3160889
--- /dev/null
+++ b/pkgs/applications/finance/odoo/odoo15.nix
@@ -0,0 +1,128 @@
+{ stdenv, lib, fetchFromGitHub, fetchurl, python310, nodePackages, wkhtmltopdf
+, nixosTests }:
+
+let
+  python = python310.override {
+    packageOverrides = self: super: {
+      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=";
+        };
+
+        nativeBuildInputs = [ ];
+
+        nativeCheckInputs = with self; [ pytestCheckHook pillow ];
+      });
+      flask = super.flask.overridePythonAttrs (old: rec {
+        version = "2.1.3";
+        src = old.src.override {
+          inherit version;
+          hash = "sha256-FZcuUBffBXXD1sCQuhaLbbkCWeYgrI1+qBOjlrrVtss=";
+        };
+      });
+      werkzeug = super.werkzeug.overridePythonAttrs (old: rec {
+        version = "2.1.2";
+        src = old.src.override {
+          inherit version;
+          hash = "sha256-HOCOgJPtZ9Y41jh5/Rujc1gX96gN42dNKT9ZhPJftuY=";
+        };
+      });
+    };
+  };
+
+  odoo_version = "15.0";
+  odoo_release = "20230720";
+in python.pkgs.buildPythonApplication rec {
+  pname = "odoo15";
+  version = "${odoo_version}.${odoo_release}";
+
+  format = "setuptools";
+
+  # latest release is at https://github.com/odoo/docker/blob/master/15.0/Dockerfile
+  src = fetchurl {
+    url =
+      "https://nightly.odoo.com/${odoo_version}/nightly/src/odoo_${version}.tar.gz";
+    name = "${pname}-${version}";
+    hash = "sha256-XH4cN2OrPvMjN3VcDJFxCacNxKkrN65jwhUN1dnGwgo="; # odoo
+  };
+
+  unpackPhase = ''
+    tar xfz $src
+    cd odoo*
+  '';
+
+  # needs some investigation
+  doCheck = false;
+
+  makeWrapperArgs = [
+    "--prefix"
+    "PATH"
+    ":"
+    "${lib.makeBinPath [ wkhtmltopdf nodePackages.rtlcss ]}"
+  ];
+
+  propagatedBuildInputs = with python.pkgs; [
+    babel
+    chardet
+    decorator
+    docutils
+    ebaysdk
+    freezegun
+    gevent
+    greenlet
+    idna
+    jinja2
+    libsass
+    lxml
+    markupsafe
+    mock
+    num2words
+    ofxparse
+    passlib
+    pillow
+    polib
+    psutil
+    psycopg2
+    pydot
+    pyopenssl
+    pypdf2
+    pyserial
+    python-dateutil
+    python-ldap
+    python-stdnum
+    pytz
+    pyusb
+    qrcode
+    reportlab
+    requests
+    setuptools
+    vobject
+    werkzeug
+    xlrd
+    xlsxwriter
+    xlwt
+    zeep
+  ];
+
+  # takes 5+ minutes and there are not files to strip
+  dontStrip = true;
+
+  passthru = {
+    updateScript = ./update.sh;
+    tests = { inherit (nixosTests) odoo15; };
+  };
+
+  meta = with lib; {
+    description = "Open Source ERP and CRM";
+    homepage = "https://www.odoo.com/";
+    license = licenses.lgpl3Only;
+    maintainers = with maintainers; [ mkg20001 ];
+  };
+}