Missing `mkSiteAssets` attribute on `pkgs` in this scope.
https://github.com/blaggacao/frappix/blob/1f2553179c06d3151f179caeba2db36913550ac6/src/nixos/main.nix#L248
Am I the only one experiencing this issue? I am using it on NixOS module. Below is my error.
… while evaluating the attribute 'value'
at /nix/store/4w6dn0aiyasb2dk8lr1fjj60d3hj82hr-source/lib/modules.nix:1083:7:
1082| // {
1083| value = addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
1084| inherit (res.defsFinal') highestPrio;
… while evaluating the option `services.frappe.combinedAssets':
… while evaluating the attribute 'mergedValue'
at /nix/store/4w6dn0aiyasb2dk8lr1fjj60d3hj82hr-source/lib/modules.nix:1130:5:
1129| # Type-check the remaining definitions, and merge them. Or throw if no definitions.
1130| mergedValue =
| ^
1131| if isDefined then
… while evaluating definitions from `/nix/store/jmznwkf19h2zas6agda5c17z8qgik2ny-incl/src/nixos/main.nix':
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: attribute 'mkSiteAssets' missing
at /nix/store/jmznwkf19h2zas6agda5c17z8qgik2ny-incl/src/nixos/main.nix:248:31:
247| # - preprocessed inputs
248| frappe.combinedAssets = pkgs.mkSiteAssets cfg.apps;
| ^
249| frappe.penv = cfg.package.pythonModule.buildEnv.override {extraLibs = cfg.apps;};
This means one way or another the overlay is not picked up.
Under normal conditions, the line that picks them up is this one: https://github.com/blaggacao/frappix/blob/main/examples%2Ftemplates%2Ffrappe%2Fapps%2Fpkgs.nix#L31
Which, under normal conditions is picked up by https://github.com/blaggacao/frappix/blob/main/examples%2Ftemplates%2Ffrappe%2Fflake.nix#L16
What I do then is:
inherit (inputs.cells.apps) pkgs;
You may feel adventurous and use divnix/hive to load your modules, but only as sugar for structure and consistency, if you want.
Thank you for your response.
This means one way or another the overlay is not picked up.
Yes, I was guessing that too.
I'm basically going to import this repo into my flake, since it offers nixosModule for Frappe and ERPNext services. Which I believe it is defined here: https://github.com/blaggacao/frappix/blob/1f2553179c06d3151f179caeba2db36913550ac6/src/nixos.nix#L4 . Regarding to the file I can see that the pkgs is coming from my inputs not from the overlays. Plus, I don't think this repo export overlayed pkgs (correct me if I'm wrong). And my goal is to combine this module with my nixosConfiguration of one of my machine to run Frappe/ERPNext.
I tried to hack it using cell.pkgs manually. But I bumped into another problem which cfg.combinedAssets is an empty attrs.
I can check out divnix/hive and see what it offers.
You could have a look at https://github.com/blaggacao/frappix/blob/main/src%2Foverlays%2Fdefault.nix for rhe structure of overlays and https://github.com/blaggacao/frappix/blob/main/examples%2Ftemplates%2Ffrappe%2Fapps%2Fpkgs.nix to gain an idea on how to load them into your own pkgs.