Error performing nixos-rebuild boot --upgrade

I performed an install of NixOS into virtualbox and that has worked fine. I then wanted to make changes and modified configuration.nix to incorporate all of my settings, software that I wanted to be build for all users etc. When I perform - ‘nixos-rebuild boot --upgrade’ the following error is displayed:

building Nix...
building the system configuration...
error: required attribute 'name' missing, at /nix/store/l3kxj5bs023jkppblcny2bp4n6cgi17s-nix-2.3.16/share/nix/corepkgs/derivation.nix:8:12

I do not know that I have done wrong re the error message and would appreciate some help in tracking this issue down.

Remove all recent changes eg by commenting them out, then re-insert them one by one or in bisect-like bulks, rebuilding each time.

This will give you a rough idea about which change causes the issue, then we can help you debugging that.

@NobbZ - thank you for your reply and advice. I commented out all of my derivations and left only the Nix provided packages and settings. This worked and thus I am now in the process of debugging the derivations that I have written. I would appreciate some advice on how to resolve the following error message:

error: value is a string while a set was expected, at /etc/nixos/packages/iup/iup/iup-im.nix:54:14
(use '--show-trace' to show detailed location information)

The derivation causing the error is setting the ‘meta’ attribute by importing a generic file that has been parameterised. I am trying to make my files have common code in files like this. The meta data import file is as follows:

{
   lib,
   module,
   module_description
}:


{
  description = "The ${module} module for the IUP portable user interface";

  longDescription =
''
   The ${module} module implements the ${module_description} for IUP, the portable
   user interface GUI libraries.  The libraries can be accessed via C or LUA.
'';

  maintainers = with lib.maintainers; [ "xxxxx" ];

To me the text that would be returned looks like a set but maybe import treats it as a string. Then I have a series of files (will just show one, the others are virtually the same) that use the above to create a derivation specific meta data declaration. The part of the file that causes the error is:


      meta = import ./metadata-common.nix "IM" "Image Manipulation";

I have tried putting ‘{’ and ‘}’ characters around the import statement but that leads to another error re paths.
I would appreciate some help from anybody that has the time to help.

Your file contains a function that takes a single argument, a set with exactly the keys lib, module, and module_description, though you call it with 2 arguments, which are strings.

meta = import ./metadata-commin.nix {
  inherit lib;
  module = "IM";
  module_description = "Image Manipulation";
};

@NobbZ - thank you for another prompt reply. Now that I understand how to declare and use parameters better, I changed the derivations to be two parameters and apart from some issues with unpacking the tar files to build from, I think that I can move forward a bit.