Need help understanding\simplifying Nix-odoo Github

Hi all, kinda new to the Nix system and using github code from other people

I want to install\use the Nix-Odoo18 from Github, but every time it gives me errors and internet as a whole isnt of much help.

I want to install it local on my laptop and use it directly via app or local web, doesnt matter.

Thanks for taking the time to read it all and possibly help me out !
Chet

Can you share what you have tried so far and what errors you get?

Trying to set it up with pkgs in config.nix: added odoo to env.systempkgs and “qtwebkit-5.212.0-alpha4” to permitedInsecurepkgs
(was giving back an error otherwise as it lost support or something)

This is the “end of return” after sudo nixos-rebuild switch:

=================================== FAILURES ===================================
_____________________ test_response_body[RequestRedirect] ______________________

cls = <class ‘werkzeug.routing.exceptions.RequestRedirect’>

@pytest.mark.parametrize(
    "cls",
    sorted(
        (e for e in HTTPException.subclasses() if e.code),
        key=lambda e: e.code,  # type: ignore
    ),
)
def test_response_body(cls):
  exc = cls()

E TypeError: RequestRedirect.init() missing 1 required positional argument: ‘new_url’

tests/test_exceptions.py:166: TypeError
=========================== short test summary info ============================
FAILED tests/test_exceptions.py::test_response_body[RequestRedirect] - TypeError: RequestRedirect.init() missing 1 required positional argumen…
=========== 1 failed, 838 passed, 65 deselected in 60.34s (0:01:00) ============
xlsxwriter/test/comparison/test_properties05.py . [ 51%]
xlsxwriter/test/comparison/test_protect01.py . [ 51%]
xlsxwriter/test/comparison/test_protect02.py . [ 51%]
xlsxwriter/test/comparison/test_protect03.py . [ 51%]
xlsxwriter/test/comparison/test_protect04.py . [ 51%]
xlsxwriter/test/comparison/test_protect05.py . [ 52%]
xlsxwriter/test/comparison/test_protect06.py … [ 52%]
xlsxwriter/test/comparison/test_protect07.py . [ 52%]
xlsxwriter/test/comparison/test_protect08.py . [ 52%]
error: builder for ‘/nix/store/6br8aw7k5bhnv9zlfzk5ziijq6dmdra4-python3.10-werkzeug-2.3.7.drv’ failed with exit code 1
error: 1 dependencies of derivation ‘/nix/store/6a9c0aq4a7hyhj2wgrfn7hqc6l3q4v2j-odoo-16.0.20231024.drv’ failed to build
error: 1 dependencies of derivation ‘/nix/store/j93d3c09zcl3cmlwaq27hrprr3sblfgb-system-path.drv’ failed to build
error: 1 dependencies of derivation ‘/nix/store/z7nxp3gq51jmy8cb8h55jk4hmi0ynai8-nixos-system-nixos-24.05.7376.b134951a4c9f.drv’ failed to build

In your error message I see odoo 16.

/nix/store/6a9c0aq4a7hyhj2wgrfn7hqc6l3q4v2j-odoo-16.0.20231024.drv

But you want to use 18. The default pkgs.odoo is odoo18.

You might need to update your nixos channel if you are in the past and pkgs.odoo is still at 16

Try nix-channel --update and do a rebuild again.

But I notice odoo 18 is broken on nixos-unstable but works on 24.11, so make sure to use nixos stable (24.11)

Edit: odoo18 is building on unstable but odoo16, 17 are broken

2 Likes

Besides what @phanirithvij already says, you also should use services.odoo.* to enable and configure odoo.

environment.systemPackages is for software that doesn’t have a module, or when you know exactly why you do not want to use an existing module.

2 Likes