Overriding after a callPackage is often fragile and error prone. Many use cases like cross-compiling or complex multi-layered derivations are difficult to use write after the callPackage. The idea is to expose the pkg-fun/recipe/pacakge.nix directly as the function that it is. This is often done by people doing an import (path + "/pkgs/misc/tools/path-to-somewhere/default.nix), but that makes the filesystem an API and has problems with pkgs/by-name.
Goal
Expose the original function directly. This can be done in the package set standardization effort, in the flake itself (top-level "recipes" output also solves the "system" problem and various re-use mechanisms).
Issue description
Overriding after a callPackage is often fragile and error prone. Many use cases like cross-compiling or complex multi-layered derivations are difficult to use write after the callPackage. The idea is to expose the pkg-fun/recipe/pacakge.nix directly as the function that it is. This is often done by people doing an
import (path + "/pkgs/misc/tools/path-to-somewhere/default.nix)
, but that makes the filesystem an API and has problems with pkgs/by-name.Goal
Expose the original function directly. This can be done in the package set standardization effort, in the flake itself (top-level "recipes" output also solves the "system" problem and various re-use mechanisms).