{system, pkgs}:

rec {
### Databases

  rooms = import ../pkgs/databases/rooms {
    inherit (pkgs) stdenv;
  };
  
  staff = import ../pkgs/databases/staff {
    inherit (pkgs) stdenv;
  };
  
  zipcodes = import ../pkgs/databases/zipcodes {
    inherit (pkgs) stdenv;
  };

### Web applications

  stafftracker = import ../pkgs/webapplications/stafftracker {
    inherit (pkgs) stdenv;
  };
}

{system, pkgs}:

let
  callPackage = pkgs.lib.callPackageWith (pkgs // self);
  
  self = {
  ### Databases

    rooms = callPackage ../pkgs/databases/rooms { };
  
    staff = callPackage ../pkgs/databases/staff { };
  
    zipcodes = callPackage ../pkgs/databases/zipcodes { };

  ### Web applications

    stafftracker = callPackage ../pkgs/webapplications/stafftracker { };
  };
in
self

Use callPackage for the top-level composition expression
Use callPackage for the top-level composition expression
