NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.61k stars 13.09k forks source link

package.nix / recipes #295027

Open tomberek opened 7 months ago

tomberek commented 7 months ago

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).

Artturin commented 7 months ago

Expose the original function directly.

https://github.com/NixOS/nixpkgs/pull/267792