nixpkgs-architecture / pkgs-modules

Working group for using modules for packages
Creative Commons Attribution Share Alike 4.0 International
25 stars 3 forks source link

Document use case/goal: Changing the interface of a package separately from the implementation, e.g. for changing only the interface or only the implementation #10

Closed infinisil closed 1 year ago

infinisil commented 1 year ago

Packages currently have the interface and implementation together:

{ hello, enableFoo ? true }:
stdenv.mkDerivation {
  # ...
}

As a user I want to know what is the public API and what is internals.

infinisil commented 1 year ago

@edolstra says that modules aren't that great for that.

Can mark things as internal. Can use let or internal = true, but then still exposed.

DavHau commented 1 year ago

implemented in https://github.com/nixpkgs-architecture/pkgs-modules/pull/13