{ nixpkgs ? <nixpkgs> }:

let
  pkgs = import nixpkgs {};
in
rec {
  HelloLibrary = import ./HelloLibrary {
    inherit (pkgs) dotnetenv;
  };
  
  HelloWorldLibrary = import ./HelloWorldLibrary {
    inherit (pkgs) dotnetenv;
    inherit HelloLibrary;
  };
  
  HelloWorldApplication = import ./HelloWorldApplication {
    inherit (pkgs) dotnetenv;
    inherit HelloWorldLibrary;
  };
}

{ nixpkgs ? <nixpkgs> }:

let
  pkgs = import nixpkgs {};
  
  callPackage = pkgs.lib.callPackageWith (self // pkgs);
  
  self = {
    HelloLibrary = callPackage ./HelloLibrary { };
  
    HelloWorldLibrary = callPackage ./HelloWorldLibrary { };
  
    HelloWorldApplication = callPackage ./HelloWorldApplication { };
  };
in
self

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