Nix considers legacyPackages a function

I’m trying to create a semi-flexible system to allow me to have my own derivations in my flake system configuration. Unfortunately I get this error:

The file it points to:

The place its imported from:

I have tried separating pkgs to its own variable, and inheriting that when passing (as suggested by someone I’ve already asked about this), but it didn’t change anything. Eg.:

pkgs = inputs.nixpkgs.legacyPackages.${system};
customPkgs = import ../packages {inherit pkgs;};

Solved, I was missing an empty set from the end of callPackage, I tried adding that once but I forgot that I needed () in lists.